/proc/vmstat

  • Post author:
  • Post category:其他


This file shows detailed virtual memory statistics from the kernel. Most of the counters explained below are available only if you have kernel compiled with VM_EVENT_COUNTERS config option turned on. That’s so because most of the parameters below have no function for the kernel itself, but are useful for debugging and statistics purposes.

Number of pages that are dirty, under writeback or unstable:



nr_dirty 1550

nr_writeback 0

nr_unstable 0



Number of pages allocated to page tables, mapped by files or allocated by the kernel slab allocator:



nr_page_table_pages 699

nr_mapped 139596

nr_slab 42723



Number of pageins and pageouts (since the last boot):



pgpgin 33754195


pgpgout 38985992

(disk io 监控可以从这两个值分析到,如读取/proc/vmstat文件得出最近240秒内pgpgin的增量,把pgpgin的增量再除以240得到每秒的平均增量,即为平均每秒把数据从硬盘读到物理内存的数据量。pgpgout同理,可以得出平均每秒把数据从物理内存写到硬盘的数据量。

Number of swapins and swapouts (since the last boot):



pswpin 2473


pswpout 2995

swap si/so,平均每秒把数据从磁盘交换区装入内存的数据量,可以这么计算:读取/proc/vmstat文件得出最近240秒内pswpin的增量,把pswpin的增量再除以240得到每秒的平均增量。同理可以计算:平均每秒把数据从内存转储到磁盘交换区的数据量






Number of page allocations per zone (since the last boot):



pgalloc_high 0

pgalloc_normal 110123213

pgalloc_dma32 0

pgalloc_dma 415219



Number of page frees, activations and deactivations (since the last boot):



pgfree 110549163

pgactivate 4509729

pgdeactivate 2136215



Number of minor and major page faults (since the last boot):



pgfault 80663722

pgmajfault 49813



Number of page refills (per zone, since the last boot):



pgrefill_high 0

pgrefill_normal 5817500

pgrefill_dma32 0

pgrefill_dma 149176



Number of page steals (per zone, since the last boot):



pgsteal_high 0

pgsteal_normal 10421346

pgsteal_dma32 0

pgsteal_dma 142196



Number of pages scanned by the kswapd daemon (per zone, since the last boot):



pgscan_kswapd_high 0

pgscan_kswapd_normal 10491424

pgscan_kswapd_dma32 0

pgscan_kswapd_dma 156130



Number of pages reclaimed directly (per zone, since the last boot):



pgscan_direct_high 0

pgscan_direct_normal 11904

pgscan_direct_dma32 0

pgscan_direct_dma 225



Number of pages reclaimed via inode freeing (since the last boot):



pginodesteal 11



Number of slab objects scanned (since the last boot):



slabs_scanned 8926976



Number of pages reclaimed by kswapd (since the last boot):



kswapd_steal 10551674



Number of pages reclaimed by kswapd via inode freeing (since the last boot):



kswapd_inodesteal 338730



Number of kswapd’s calls to page reclaim (since the last boot):



pageoutrun 181908



Number of direct reclaim calls (since the last boot):



allocstall 160



Miscellaneous statistics:



pgrotated 3781

nr_bounce 0