sg_get_host_info(3) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

sg_get_host_info(3)

sg_get_host_info(3)                                        sg_get_host_info(3)



NAME
       sg_get_host_info,  sg_get_host_info_r,  sg_free_host_info - get general
       operating system statistics

SYNOPSIS
       #include <statgrab.h>


       sg_host_info *sg_get_host_info (size_t *entries);

       sg_host_info *sg_get_host_info_r (size_t *entries);

       sg_error sg_free_host_info (sg_host_info *data);

DESCRIPTION
       These calls return details on the operating system and the machine it's
       running on.

       API Shortcut

       allbox  ; l | l | l.  T{ function T}   T{ returns T}   T{ data owner T}
       l | l | l l | l  |  l.   T{  sg_get_host_info  T}   T{  sg_host_info  *
       T}   T{  libstatgrab  (thread  local)  T} T{ sg_get_host_info_r T}   T{
       sg_host_info * T}   T{ caller T}

       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 VALUES
       The 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;


       os_name
              The operating system name.  (eg. SunOS or Linux)

       os_release
              The operating system release.  (eg. 5.8 or 5.9 or Solaris)

       os_version
              The version level of the OS.

       platform
              The hardware platform (architecture) the OS runs on.

       hostname
              The name of the machine.

       uptime The uptime of the machine in seconds.

       systime
              The timestamp when the above stats where  collected  in  seconds
              since epoch

SEE ALSO
       statgrab(3)

WEBSITE
       ⟨https://libstatgrab.org/⟩



libstatgrab                       2019-03-08               sg_get_host_info(3)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3