library: fix kb_slab_*reclaimable names and export both

This commit is contained in:
Jaromir Capik 2014-07-22 13:52:11 +02:00
parent c437faf8d3
commit cdc95efe74
3 changed files with 9 additions and 4 deletions

View 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;

View 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},

View 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;