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

NAME

statgrab, libstatgrab - get system statistics

CONTENTS

Synopsis
Description
Website

SYNOPSIS

#include <statgrab.h>

sg_error sg_init \kx (int ignore_init_errors);

sg_error sg_shutdown \kx (void);

sg_error sg_drop_privileges \kx (void);

sg_error sg_get_error \kx (void);

const char *sg_get_error_arg \kx (void);

int sg_get_error_errno \kx (void);

const char *sg_str_error \kx (sg_error code);

sg_error sg_get_error_details \kx (sg_error_details *err_details);

char *sg_strperror \kx (char **buf, const sg_error_details * const err_details);

size_t sg_get_nelements \kx (const void *data);

sg_error sg_free_stats_buf \kx (void *data);

sg_error sg_lock_mutex \kx (const char *mutex_name);

sg_error sg_unlock_mutex \kx (const char *mutex_name);

sg_cpu_percents *sg_get_cpu_percents \kx (void);

sg_cpu_percents *sg_get_cpu_percents_of \kx (sg_cpu_percent_source cps);

sg_cpu_percents *sg_get_cpu_percents_r \kx (const sg_cpu_stats *whereof);

void sg_free_cpu_percents \kx (sg_cpu_percents *data);

sg_cpu_stats *sg_get_cpu_stats \kx (void);

sg_cpu_stats *sg_get_cpu_stats_diff \kx (void);

sg_cpu_stats *sg_get_cpu_stats_r \kx (void);

sg_cpu_stats *sg_get_cpu_stats_diff_between \kx (const sg_cpu_stats *cpu_now, const sg_cpu_stats *cpu_last);

sg_error sg_free_cpu_stats \kx (sg_cpu_stats *data);

sg_disk_io_stats *sg_get_disk_io_stats \kx (size_t *entries);

sg_disk_io_stats *sg_get_disk_io_stats_r \kx (size_t *entries);

sg_disk_io_stats *sg_get_disk_io_stats_diff \kx (size_t *entries);

sg_disk_io_stats *sg_get_disk_io_stats_diff_between \kx (const sg_disk_io_stats *cur, const sg_disk_io_stats *last, size_t *entries);

sg_error sg_free_disk_io_stats \kx (sg_disk_io_stats *data);

sg_fs_stats *sg_get_fs_stats \kx (size_t *entries);

sg_fs_stats *sg_get_fs_stats_r \kx (size_t *entries);

sg_error sg_free_fs_stats \kx (sg_fs_stats *data);

const char **sg_get_valid_filesystems \kx (size_t *entries);

sg_error sg_set_valid_filesystems \kx (const char *valid_fs[]);

sg_host_info *sg_get_host_info \kx (void);

sg_host_info *sg_get_host_info_r \kx (void);

sg_error sg_free_host_info \kx (sg_host_info *data);

sg_load_stats *sg_get_load_stats \kx (void);

sg_load_stats *sg_get_load_stats \kx (void);

sg_error sg_free_load_stats \kx (sg_load_stats *data);

sg_mem_stats *sg_get_mem_stats \kx (void);

sg_mem_stats *sg_get_mem_stats_r \kx (void);

sg_error sg_free_mem_stats \kx (sg_mem_stats *data);

sg_swap_stats *sg_get_swap_stats \kx (void);

sg_swap_stats *sg_get_swap_stats_r \kx (void);

sg_error sg_free_swap_stats \kx (sg_swap_stats *data);

sg_network_iface_stats *sg_get_network_iface_stats \kx (size_t *entries);

sg_network_iface_stats *sg_get_network_iface_stats_r \kx (size_t *entries);

sg_error sg_free_network_iface_stats \kx (sg_network_iface_stats *data);

sg_network_io_stats *sg_get_network_io_stats \kx (size_t *entries);

sg_network_io_stats *sg_get_network_io_stats_r \kx (size_t *entries);

sg_network_io_stats *sg_get_network_io_stats_diff \kx (size_t *entries);

sg_network_io_stats *sg_get_network_io_stats_diff_between \kx (const sg_network_io_stats *cur, const sg_network_io_stats *last, size_t *entries);

sg_error sg_free_network_io_stats \kx (sg_network_iface_stats *data);

sg_page_stats *sg_get_page_stats \kx (void);

sg_page_stats *sg_get_page_stats_r \kx (void);

sg_page_stats *sg_get_page_stats_diff \kx (void);

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

sg_error sg_free_page_stats \kx (sg_page_stats *data);

sg_process_stats *sg_get_process_stats \kx (size_t *entries);

sg_process_stats *sg_get_process_stats_r \kx (size_t *entries);

sg_error sg_free_process_stats \kx (sg_process_stats *data);

sg_process_count *sg_get_process_count \kx (void);

sg_process_count *sg_get_process_count_of \kx (sg_process_count_source pcs);

sg_process_count *sg_get_process_count_r \kx (sg_process_stats const *whereof);

sg_error sg_free_process_count \kx (sg_process_count *data);

sg_user_stats *sg_get_user_stats \kx (size_t *entries);

sg_user_stats *sg_get_user_stats_r \kx (size_t *entries);

sg_error sg_free_user_stats \kx (sg_user_stats *data);

DESCRIPTION

The statgrab library provides a cross-platform interface to get several system statistics. System statistics aren’t standardised, so the statgrab library tries to choose the most important values over all supported operating systems. This implies that some values might not be available on every OS while some specific values are missing when there are no counterparts on any other OS.

The libstatgrab is organised in components, each for interrelated statistics.

component statistics
cpu sg_cpu_stats, sg_cpu_percents
disk sg_disk_io_stats, sg_fs_stats
load sg_load_stats
mem sg_mem_stats
network sg_network_io_stats, sg_network_iface_stats
os sg_host_info
page sg_page_stats
process sg_process_stats, sg_process_count
swap sg_swap_stats
user sg_user_stats

The library was originally written to support the i-scream central monitoring system, but has since become a standalone package. It has been ported to work on Linux, NetBSD, FreeBSD, OpenBSD, DragonFly BSD, Solaris, HP-UX, AIX and Cygwin.

SEE ALSO

sg_intro(3) sg_get_cpu_stats(3) sg_get_disk_io_stats(3) sg_get_fs_stats(3) sg_get_host_info(3) sg_get_load_stats(3) sg_get_mem_stats(3) sg_get_network_io_stats(3) sg_get_network_iface_stats(3) sg_get_page_stats(3) sg_get_process_stats(3) sg_get_swap_stats(3) sg_get_user_stats(3) sg_get_error(3) sg_internal-intro(3)

WEBSITE

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


i-scream LIBSTATGRAB (3) 2013-06-07

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