| On Tue, Feb 19, 2008 at 7:53 PM, Albert Cahalan wrote: | > On Feb 18, 2008 10:55 AM, Bart Van Assche wrote: | > | > > This leads me to the question: if the layout of /proc/meminfo changes, | > > who communicates these changes to the procps maintainers ? | > | > Nobody ever informs me. :-( | | Albert, can you please review the patch below ? | | Thanks, | | Bart. | | --- procps-3.2.7/proc/library.map +++ procps-3.2.7/proc/library.map 2008-03-08 10:17:01.000000000 +0100 @@ -18,6 +18,8 @@ kb_main_free; kb_main_total; kb_main_used; kb_swap_free; kb_swap_total; kb_swap_used; kb_main_shared; kb_low_total; kb_low_free; kb_high_total; kb_high_free; + kb_swap_cached; kb_anon_pages; kb_bounce; kb_nfs_unstable; + kb_slab_reclaimable; kb_slab_unreclaimable; vm_pgpgin; vm_pgpgout; vm_pswpin; vm_pswpout; free_slabinfo; put_slabinfo; get_slabinfo; get_proc_stats; local: *; --- procps-3.2.7/proc/sysinfo.c +++ procps-3.2.7/proc/sysinfo.c 2008-03-08 10:30:14.000000000 +0100 @@ -8,6 +8,8 @@ // File for parsing top-level /proc entities. */ // // June 2003, Fabian Frederick, disk and slab info +// Copyright (c) 2003 Fabian Frederick. +// Copyright (c) 2008 Bart Van Assche. #include #include @@ -503,6 +505,11 @@ unsigned long kb_swap_free; unsigned long kb_swap_total; /* recently introduced */ +unsigned long kb_anon_pages; +unsigned long kb_bounce; +unsigned long kb_nfs_unstable; +unsigned long kb_slab_reclaimable; +unsigned long kb_slab_unreclaimable; unsigned long kb_high_free; unsigned long kb_high_total; unsigned long kb_low_free; @@ -539,6 +546,8 @@ char *tail; static const mem_table_struct mem_table[] = { {"Active", &kb_active}, // important + {"AnonPages", &kb_anon_pages}, + {"Bounce", &kb_bounce}, {"Buffers", &kb_main_buffers}, // important {"Cached", &kb_main_cached}, // important {"Committed_AS", &kb_committed_as}, @@ -556,10 +565,13 @@ {"MemFree", &kb_main_free}, // important {"MemShared", &kb_main_shared}, // important, but now gone! {"MemTotal", &kb_main_total}, // important + {"NFS_Unstable", &kb_nfs_unstable}, {"PageTables", &kb_pagetables}, // kB version of vmstat nr_page_table_pages {"ReverseMaps", &nr_reversemaps}, // same as vmstat nr_page_table_pages {"Slab", &kb_slab}, // kB version of vmstat nr_slab {"SwapCached", &kb_swap_cached}, + {"SReclaimable", &kb_slab_reclaimable}, + {"SUnreclaim", &kb_slab_unreclaimable}, {"SwapFree", &kb_swap_free}, // important {"SwapTotal", &kb_swap_total}, // important {"VmallocChunk", &kb_vmalloc_chunk}, @@ -603,6 +615,7 @@ } kb_swap_used = kb_swap_total - kb_swap_free; kb_main_used = kb_main_total - kb_main_free; + kb_main_cached += kb_slab_reclaimable + kb_swap_cached + kb_nfs_unstable; } /*****************************************************************/ --- procps-3.2.7/proc/sysinfo.h +++ procps-3.2.7/proc/sysinfo.h 2008-03-08 10:15:41.000000000 +0100 @@ -30,6 +30,11 @@ extern unsigned long kb_swap_free; extern unsigned long kb_swap_total; /* recently introduced */ +extern unsigned long kb_anon_pages; +extern unsigned long kb_bounce; +extern unsigned long kb_nfs_unstable; +extern unsigned long kb_slab_reclaimable; +extern unsigned long kb_slab_unreclaimable; extern unsigned long kb_high_free; extern unsigned long kb_high_total; extern unsigned long kb_low_free;