]> granicus.if.org Git - procps-ng/commitdiff
library: fix kb_slab_*reclaimable names and export both
authorJaromir Capik <jcapik@redhat.com>
Tue, 22 Jul 2014 11:52:11 +0000 (13:52 +0200)
committerJaromir Capik <jcapik@redhat.com>
Tue, 22 Jul 2014 11:52:11 +0000 (13:52 +0200)
proc/libprocps.sym
proc/sysinfo.c
proc/sysinfo.h

index 77a658ba25b5e9f1cfa6a5cefdfd7564d9a02226..8b2bab52cdf8efc7d24e59732e346048c89c0392 100644 (file)
@@ -33,6 +33,8 @@ global:
        kb_main_shared;
        kb_main_total;
        kb_main_used;
+       kb_slab_reclaimable;
+       kb_slab_unreclaimable;
        kb_swap_free;
        kb_swap_total;
        kb_swap_used;
index c9b3241bc5ca27e29bd6694f0b4d36546126afa2..f9cb68ddee498b3d36fab5e8f619451d83938500 100644 (file)
@@ -610,8 +610,8 @@ 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_slab_reclaimable;
+unsigned long kb_slab_unreclaimable;
 
 void meminfo(void){
   char namebuf[16]; /* big enough to hold any row name */
@@ -644,8 +644,8 @@ void meminfo(void){
   {"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
-  {"SReclaimable", &kb_swap_reclaimable}, // "swap reclaimable" (dentry and inode structures)
-  {"SUnreclaim",   &kb_swap_unreclaimable},
+  {"SReclaimable", &kb_slab_reclaimable}, // "slab reclaimable" (dentry and inode structures)
+  {"SUnreclaim",   &kb_slab_unreclaimable},
   {"Shmem",        &kb_main_shared},  // kernel 2.6.32 and later
   {"Slab",         &kb_slab},         // kB version of vmstat nr_slab
   {"SwapCached",   &kb_swap_cached},
index 5847b6714b28d4d2d0a6c80895ea1847a4f7955d..69518d8423b1a6597bf7f5c7e798dd687cc5781a 100644 (file)
@@ -55,6 +55,9 @@ extern unsigned long kb_dirty;
 extern unsigned long kb_inactive;
 extern unsigned long kb_mapped;
 extern unsigned long kb_pagetables;
+// seen on 2.6.24-rc6-git12
+extern unsigned long kb_slab_reclaimable;
+extern unsigned long kb_slab_unreclaimable;
 
 #define BUFFSIZE (64*1024)
 typedef unsigned long long jiff;