[users at i-scream] libstatgrab on Linux: page stats are incorrect

Anderson Carlos Trindade anderson.trindade at optimode.com.br
Mon Jan 5 14:05:24 GMT 2015


Hi List,

I’m using libstagrab, function sg_get_page_stats_diff() to get the number of pages paged in and out from/to swap area in a Linux box, but the <> statistics returned by this function are very different from output from vmstat command. <>

In my test server, the swap is not being used as we can se from /proc/vmstat below: 

$cat vmstat | grep -e pg -e swp
pgpgin 328668
pgpgout 94306
pswpin 0
pswpout 0
pgalloc_dma 1
pgalloc_dma32 596309
pgalloc_normal 0
pgalloc_movable 0
pgfree 895803
pgactivate 25792
pgdeactivate 0
pgfault 870500
pgmajfault 738
pgrefill_dma 0
pgrefill_dma32 0
pgrefill_normal 0
pgrefill_movable 0
pgsteal_dma 0
pgsteal_dma32 0
pgsteal_normal 0
pgsteal_movable 0
pgscan_kswapd_dma 0
pgscan_kswapd_dma32 0
pgscan_kswapd_normal 0
pgscan_kswapd_movable 0
pgscan_direct_dma 0
pgscan_direct_dma32 0
pgscan_direct_normal 0
pgscan_direct_movable 0
pginodesteal 0
pgrotated 1
unevictable_pgs_culled 715
unevictable_pgs_scanned 0
unevictable_pgs_rescued 0
unevictable_pgs_mlocked 1961
unevictable_pgs_munlocked 0
unevictable_pgs_cleared 0
unevictable_pgs_stranded 0
unevictable_pgs_mlockfreed 0

It seems the function sg_get_page_stats_diff() is returning values from pgpin/pgpout instead of pswpin/pswpout. Is this a bug or an expected behavior for this function?




 <>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.i-scream.org/pipermail/users/attachments/20150105/1f7f8a75/attachment.html>


More information about the users mailing list