79 lines
2.7 KiB
Diff
79 lines
2.7 KiB
Diff
| On Tue, Feb 19, 2008 at 7:53 PM, Albert Cahalan <acahalan@cs.uml.edu> wrote:
|
|
| > On Feb 18, 2008 10:55 AM, Bart Van Assche <bart.vanassche@gmail.com> 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.
|
|
|
|
|
|
|
|
--- proc/library.map
|
|
+++ proc/library.map 2009-05-11 12:30:56.561900807 +0200
|
|
@@ -18,6 +18,8 @@ global:
|
|
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_commit_limit;
|
|
+ kb_nfs_unstable; kb_swap_reclaimable; kb_swap_unreclaimable;
|
|
vm_pgpgin; vm_pgpgout; vm_pswpin; vm_pswpout;
|
|
free_slabinfo; put_slabinfo; get_slabinfo; get_proc_stats;
|
|
local: *;
|
|
--- proc/sysinfo.c
|
|
+++ proc/sysinfo.c 2009-05-11 12:32:54.873901042 +0200
|
|
@@ -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 <stdio.h>
|
|
#include <stdlib.h>
|
|
@@ -560,12 +562,12 @@ static unsigned long kb_vmalloc_chunk;
|
|
static unsigned long kb_vmalloc_total;
|
|
static unsigned long kb_vmalloc_used;
|
|
// seen on 2.6.24-rc6-git12
|
|
-static unsigned long kb_anon_pages;
|
|
-static unsigned long kb_bounce;
|
|
-static unsigned long kb_commit_limit;
|
|
-static unsigned long kb_nfs_unstable;
|
|
-static unsigned long kb_swap_reclaimable;
|
|
-static unsigned long kb_swap_unreclaimable;
|
|
+unsigned long kb_anon_pages;
|
|
+unsigned long kb_bounce;
|
|
+unsigned long kb_commit_limit;
|
|
+unsigned long kb_nfs_unstable;
|
|
+unsigned long kb_swap_reclaimable;
|
|
+unsigned long kb_swap_unreclaimable;
|
|
|
|
void meminfo(void){
|
|
char namebuf[16]; /* big enough to hold any row name */
|
|
@@ -645,6 +647,7 @@ nextline:
|
|
}
|
|
kb_swap_used = kb_swap_total - kb_swap_free;
|
|
kb_main_used = kb_main_total - kb_main_free;
|
|
+ kb_main_cached += kb_swap_reclaimable + kb_swap_cached + kb_nfs_unstable;
|
|
}
|
|
|
|
/*****************************************************************/
|
|
--- proc/sysinfo.h
|
|
+++ proc/sysinfo.h 2008-03-08 10:15:41.000000000 +0100
|
|
@@ -31,6 +31,11 @@ extern unsigned long kb_main_total;
|
|
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;
|