GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SG_GET_PAGE_STATS (3)

NAME

sg_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 statistics

CONTENTS

Synopsis
Description
Bugs
Website

SYNOPSIS

#include <statgrab.h>

sg_page_stats *sg_get_page_stats \kx (size_t *entries);

sg_page_stats *sg_get_page_stats_r \kx (size_t *entries);

sg_page_stats *sg_get_page_stats_diff \kx (size_t *entries);

sg_page_stats *sg_get_page_stats_diff_between \kx (const sg_page_stats *cur, const sg_page_stats *last, size_t *entries);

sg_error sg_free_page_stats \kx (sg_page_stats *data);

DESCRIPTION

The 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

function returns data owner
sg_get_page_stats sg_page_stats * libstatgrab (thread local)
sg_get_page_stats_r sg_page_stats * caller
sg_get_page_stats_diff sg_page_stats * libstatgrab (thread local)
sg_get_page_stats_diff_between sg_page_stats * caller

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 VALUES

typedef struct{ unsigned long long pages_pagein; unsigned long long pages_pageout; time_t systime; }sg_page_stats;

pages_pagein
  The number of pages swapped into memory.
pages_pageout
  The number of pages swapped out of memory (to swap).
systime
  The timestamp when the above stats where collected in seconds since epoch or the time period over which pages_pagein and pages_pageout were transferred.

BUGS

Solaris 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 ALSO

statgrab(3)

WEBSITE

\(lahttp://www.i-scream.org/libstatgrab/\(ra
Search for    or go to Top of page |  Section 3 |  Main Index


i-scream SG_GET_PAGE_STATS (3) 2013-06-17

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.