From cdc95efe7462ba353239905a8190e5dbca3f32b3 Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Tue, 22 Jul 2014 13:52:11 +0200 Subject: [PATCH] library: fix kb_slab_*reclaimable names and export both --- proc/libprocps.sym | 2 ++ proc/sysinfo.c | 8 ++++---- proc/sysinfo.h | 3 +++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/proc/libprocps.sym b/proc/libprocps.sym index 77a658ba..8b2bab52 100644 --- a/proc/libprocps.sym +++ b/proc/libprocps.sym @@ -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; diff --git a/proc/sysinfo.c b/proc/sysinfo.c index c9b3241b..f9cb68dd 100644 --- a/proc/sysinfo.c +++ b/proc/sysinfo.c @@ -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}, diff --git a/proc/sysinfo.h b/proc/sysinfo.h index 5847b671..69518d84 100644 --- a/proc/sysinfo.h +++ b/proc/sysinfo.h @@ -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; -- 2.40.0