sg_get_host_info — get general operating system statistics
#include <statgrab.h>
sg_host_info *sg_get_host_info();
This call returns details on the operating system.
It returns a pointer to a static buffer of sg_host_info.
The structure returned is of type sg_host_info.
typedef struct{
char *os_name;
char *os_release;
char *os_version;
char *platform;
char *hostname;
time_t uptime;
}sg_host_info;
the operating system name. (eg. SunOS or Linux)
the operating system release. (eg. 5.8 or 5.9 or Solaris)
the version level of the OS.
the hardware platform (architecture) the OS runs on.
the name of the machine.
the uptime of the machine in seconds.