|
NAMEsg_get_page_stats, sg_get_page_stats_r, sg_get_page_stats_diff, sg_get_page_stats_diff_between, sg_free_page_stats - get paging statisticsSYNOPSIS#include <statgrab.h>
DESCRIPTIONThe page stats module deliver the number of pages swapped in and out, either since the machine has been booted (by the sg_get_page_stats() and sg_get_page_stats_r() functions) or the difference between two measured statistics (by the sg_get_page_stats_diff() and sg_get_page_stats_diff_between() functions).The sg_get_page_stats_diff() function calculates the difference between the last call to the function sg_get_page_stats() in this thread (the statistics of the earlier call are saved and sg_get_page_stats() is called immediately after this). API Shortcut
The sg_page_stats buffer received from sg_get_page_stats_r() and the sg_get_page_stats_diff_between() must be freed using sg_free_page_stats() when not needed any more. The caller is responsible for doing it. RETURN VALUEStypedef struct{ unsigned long long pages_pagein; unsigned long long pages_pageout; time_t systime; }sg_page_stats;
BUGSSolaris doesn't seem to report accurately. It reports the number of pages swapped into memory, not necessarily from swap. This feature isn't deemed entirely reliable.SEE ALSOstatgrab(3)WEBSITE⟨https://libstatgrab.org/⟩
Visit the GSP FreeBSD Man Page Interface. |