Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ wtmp(4) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                                  utmp(4)



        _________________________________________________________________
        utmp, wtmp                                            File Format
        utmp and wtmp entry formats
        _________________________________________________________________


        SYNTAX

        #include <sys/types.h>
        #include <limits.h>
        #include <utmp.h>


        DESCRIPTION

        These files, which hold user and accounting information for such
        commands as who(1), write(1), and login(1), have the following
        structure as defined by <utmp.h>:

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

        struct utmp {
               char       ut_user[USR_NAME]; /* User login name */
               char       ut_id[4];          /* /etc/inittab id (usually line #) */
               char       ut_line[12];       /* device name (console, lnxx) */
               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 as DEAD_PROCESS. */
               time_t     ut_time;           /* time entry was made */
               char       ut_host[16];       /* hostname, if remote */
        };

















        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)





                                                                  utmp(4)



        /*  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          /* Process spawned by "init" */
        #define LOGIN_PROCESS 6          /* A "getty" process waiting for login */
        #define USER_PROCESS  7          /* A user process */
        #define DEAD_PROCESS  8
        #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"


        FILES

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


        SEE ALSO

        limits.h(4), getut(3c).
        login(1), who(1), write(1) in the User's Reference for the DG/UX
        System.



















        DG/UX 4.00                                                 Page 2
               Licensed material--property of copyright holder(s)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026