


      UUUUTTTTMMMMPPPP((((4444))))                     ((((UUUUNNNNIIIIXXXX 5555....0000))))                    UUUUTTTTMMMMPPPP((((4444))))



      NNNNAAAAMMMMEEEE
           utmp, wtmp - utmp and wtmp entry formats

      SSSSYYYYNNNNTTTTAAAAXXXX
           ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
           ####iiiinnnncccclllluuuuddddeeee <<<<uuuuttttmmmmpppp....hhhh>>>>

      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
           These files, which hold user and accounting information for
           such commands as _w_h_o(1), _w_r_i_t_e(1), and _l_o_g_i_n(1), have the
           following structure as defined by <<<<uuuuttttmmmmpppp....hhhh>>>>:

           #define    UTMP_FILE    "/etc/utmp"
           #define    WTMP_FILE    "/etc/wtmp"
           #define    ut_name      ut_user

           struct utmp {
                  char    ut_user[8];         /* User login name */
                  char    ut_id[4];           /* /etc/inittab id (usually line#) */
                  char    ut_line[12];        /* Device name (console, lnxx) */
                  char    ut_host[16];        /* Hostname if remote */
                  short   ut_pid;             /* Process id */
                  short   ut_type;       /* Type of entry */
                  struct  exit_status {
                      short    e_termination;      /* Process termination status */
                      short    e_exit;             /* Process exit status */
                  } ut_exit;                  /* The exit status of a process
                                         /* marked DEAD_PROCESS. */
                 time_t   ut_time;       /* Time entry was made */
           };

           /*  Definitions for ut_type */
           #define EMPTY       0
           #define RUN_LVL          1
           #define BOOT_TIME        2
           #define OLD_TIME         3
           #define NEW_TIME         4
           #define INIT_PROCESS     5
           #define LOGIN_PROCESS    6    /* Process spawned by "init" */
           #define USER_PROCESS     7    /* A "getty" process waiting for login */
           #define DEAD_PROCESS     8    /* A user process */
           #define ACCOUNTING  9
           #define UTMAXTYPE   ACCOUNTING     /* Largest legal value of ut_type */

           /* Special strings or formats used in the "ut_line" field when */
           /* accounting for something other than a process.              */
           /* No string for the ut_line field can be more than 11 chars + */
           /* a NULL in length.                                           */
           #define RUNLVL_MSG "run-level %c"
           #define BOOT_MSG   "system boot"
           #define OTIME_MSG  "old time"
           #define NTIME_MSG  "new time"



      Page 1                                                   (9010-E)






      UUUUTTTTMMMMPPPP((((4444))))                     ((((UUUUNNNNIIIIXXXX 5555....0000))))                    UUUUTTTTMMMMPPPP((((4444))))



      FFFFIIIILLLLEEEESSSS
           /usr/include/utmp.h
           /etc/utmp
           /etc/wtmp

      SSSSEEEEEEEE AAAALLLLSSSSOOOO
           login(1), who(1), write(1), getut(3C).
















































      Page 2                                                   (9010-E)



