|
NAMEsg_get_host_info, sg_get_host_info_r, sg_free_host_info - get general operating system statisticsSYNOPSIS#include <statgrab.h>
DESCRIPTIONThese calls return details on the operating system and the machine it's running on.API Shortcut
The sg_host_info buffer received from sg_get_host_info_r() must be freed using sg_free_host_info() when not needed any more. The caller is responsible for doing it. RETURN VALUESThe structure returned is of type sg_host_info.typedef enum { sg_unknown_configuration = 0, sg_physical_host, sg_virtual_machine, sg_paravirtual_machine, sg_hardware_virtualized } sg_host_state; typedef struct{ char *os_name; char *os_release; char *os_version; char *platform; char *hostname; unsigned bitwidth; sg_host_state host_state; unsigned ncpus; unsigned maxcpus; time_t uptime; time_t systime; }sg_host_info;
SEE ALSOstatgrab(3)WEBSITE⟨https://libstatgrab.org/⟩
Visit the GSP FreeBSD Man Page Interface. |