I need to gather the following page-related system statistics in a C program in
ID: 3914578 • Letter: I
Question
I need to gather the following page-related system statistics in a C program in a Linux environment (centOS). I need to use libraries (#include <..>), not command line commands (system calls), since the code is intended to be part of a static system call.
The info I need:
1. the current number of free pages (over all memory zones);
2. the current number of pages used by slab allocator (over all memory zones);
3. the current number of pages in the active list (over all memory zones);
4. the current number of pages in the inactive list (over all memory zones);
5. the current number of pages in the active list whose reference bits are set (over all memory zones);
6. the current number of pages in the inactive list whose reference bits are set (over all memory zones);
7. the cumulative number of pages moved from the active list to the inactive list (since the last machine boot);
8. the cumulative number of pages evicted from the inactive list (since the last machine boot);