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

개요

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

sg_get_user_stats(3)

sg_get_user_stats(3)                                      sg_get_user_stats(3)



NAME
       sg_get_user_stats,  sg_get_user_stats_r,  sg_free_user_stats  - get the
       current logged in users

SYNOPSIS
       #include <statgrab.h>


       sg_user_stats *sg_get_user_stats (size_t *entries);

       sg_user_stats *sg_get_user_stats_r (size_t *entries);

       sg_error sg_free_user_stats (sg_user_stats *data);

DESCRIPTION
       The user statistics module delivers some information  about  logged  on
       users.  Each logon is treated separately. Both statistic get functions,
       sg_get_user_stats()  and  sg_get_user_stats_r(),  return  a  vector  of
       sg_user_stats with entries elements.

       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_user_stats  T}   T{  sg_user_stats  *
       T}   T{  libstatgrab  (thread  local) T} T{ sg_get_user_stats_r T}   T{
       sg_user_stats * T}   T{ caller T}

       The sg_user_stats vector received from  sg_get_user_stats_r()  must  be
       freed  using  sg_free_user_stats() when not needed any more. The caller
       is responsible for doing it.

RETURN VALUES
       The structure returned is of type sg_user_stats.

       typedef struct {
               char *login_name;
               char *record_id;
               size_t record_id_size;
               char *device;
               char *hostname;
               pid_t pid;
               time_t login_time;
               time_t systime;
       } sg_user_stats;


       login_name
              The username which was used to log in

       record_id
              Record identifier of host database containing login  information
              (not necessarily 0-terminated)

       record_id_size
              Size of the record identifier

       device Device  name (eg. "pts/0") of the tty assigned to the login ses‐
              sion

       hostname
              (remote) Hostname from where the user is logged  on,  eg.   "in‐
              foterm7.some.kind.of.domain.local", "localhost", "10.42.17.4" or
              ":0.0" (in case it's a local logon via new xterm)

       pid    Process identifier of the process which made the  entry  to  the
              logged on users database

       login_time
              Timestamp (time in seconds since epoch) when the user logged on

       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_user_stats(3)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3