procps/proc/libprocps.sym
Jim Warner d69a2b6899 library: normalize/standardize interface, <VMSTAT> api
This interface represented a 2nd generation attempt at
the opaque newlib approach. In other words, it did not
involve the 1st generation 'chains'. Instead, 'stacks'
were employed. But the interface wasn't user friendly.

Users were required to create their own stacks, before
calling 'getstack' to retrieve multiple results with a
single call. Even worse, sometimes 'read' was required
before calling 'get' when working with single results.

So this commit represents the 3rd generation approach.
We eliminate the burden of 'read' and creating stacks.
Rather, beyond those standard 'new', 'ref' and 'unref'
functions, we'll offer just 'get' (single result) plus
a 'select' function (for multiple results in 1 stack).

And along the way, this commit vastly expands the data
extracted from /proc/vmstat. All values that currently
exist (and their delta equivalents) are now available.
Deltas were included for everything because there's no
real runtime costs beyond using a little extra memory.

The only problem is a lack of documentation for all of
those fields, as is reflected in the references below.
Oh well, maybe someday someone will dig through kernel
sources & finally plug that rather large document gap.

[ as an aside, rather than using a 'strcmp' approach ]
[ when parsing the /proc/vmstat file, as is found in ]
[ the <meminfo> module, we exploit those hash search ]
[ provisions that are found in the <search.h> header ]

Reference(s):
http://www.spinics.net/lists/linux-man/msg09096.html
http://www.linuxinsight.com/proc_vmstat.html

Signed-off-by: Jim Warner <james.warner@comcast.net>
2016-06-07 21:04:43 +10:00

67 lines
1.4 KiB
Plaintext

LIBPROCPS_0 {
global:
escape_str;
fatal_proc_unmounted;
procps_cpu_count;
procps_diskstat_dev_count;
procps_diskstat_dev_get;
procps_diskstat_dev_getbyname;
procps_diskstat_dev_getname;
procps_diskstat_dev_isdisk;
procps_diskstat_new;
procps_diskstat_read;
procps_diskstat_ref;
procps_diskstat_unref;
procps_hertz_get;
procps_linux_version;
procps_loadavg;
procps_meminfo_new;
procps_meminfo_ref;
procps_meminfo_unref;
procps_meminfo_get;
procps_meminfo_select;
procps_ns_get_name;
procps_ns_get_id;
procps_ns_read_pid;
procps_pid_length;
procps_pids_new;
procps_pids_ref;
procps_pids_unref;
procps_pids_get;
procps_pids_reap;
procps_pids_reset;
procps_pids_select;
procps_pids_sort;
procps_slabinfo_new;
procps_slabinfo_read;
procps_slabinfo_ref;
procps_slabinfo_unref;
procps_slabs_get;
procps_slabs_getstack;
procps_slabnode_count;
procps_slabnode_getname;
procps_slabnode_get;
procps_slabnode_getstack;
procps_slabnode_stack_fill;
procps_slabnode_stack_alloc;
procps_slabnode_stacks_fill;
procps_slabnode_stacks_sort;
procps_slabnode_stacks_alloc;
procps_stat_new;
procps_stat_ref;
procps_stat_unref;
procps_stat_get;
procps_stat_reap;
procps_stat_select;
procps_uptime;
procps_uptime_sprint;
procps_uptime_sprint_short;
procps_vmstat_new;
procps_vmstat_ref;
procps_vmstat_unref;
procps_vmstat_get;
procps_vmstat_select;
local:
*;
};