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_LOAD_STATS (3)

NAME

sg_get_load_stats, sg_get_load_stats_r, sg_free_load_stats - get system load

CONTENTS

Synopsis
Description
Website

SYNOPSIS

#include <statgrab.h>

sg_load_stats *sg_get_load_stats \kx (size_t *entries);

sg_load_stats *sg_get_load_stats_r \kx (size_t *entries);

sg_error sg_free_load_stats \kx (sg_load_stats *data);

DESCRIPTION

These calls returns a pointer to a buffer containing information about cumulated machine load.

API Shortcut

function returns data owner
sg_get_load_stats sg_load_stats * libstatgrab (thread local)
sg_get_load_stats_r sg_load_stats * caller

The sg_load_stats buffer received from sg_get_load_stats_r() must be freed using sg_free_load_stats() when not needed any more. The caller is responsible for doing it.

On most systems this function is just a wrapper to the getloadavg system call.

RETURN VALUES

The structure returned is of type sg_load_stats.

typedef struct{ double min1; double min5; double min15; time_t systime; }sg_load_stats;

min1
  The load average over 1 minute.
min5
  The load average over 5 minutes.
min15
  The load average over 15 minutes.
systime
  The timestamp when the above stats where collected in seconds since epoch

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_LOAD_STATS (3) 2013-06-17

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