utmp(4) — FILE FORMATS
NAME
utmp, wtmp − utmp and wtmp entry formats
SYNOPSIS
#include <utmp.h>
DESCRIPTION
These files, which hold user and accounting information for such commands as who, write, and login, have the following structure, defined in utmp.h for the M88000 family of processors reference platform:
| #define | UTMP_FILE | "/var/adm/utmp" |
| #define | WTMP_FILE | "/var/adm/wtmp" |
| #define | ut_name | ut_user |
| struct exit_status | |||
| { | |||
| short e_termination ; /∗ Process termination status ∗/ | |||
| short e_exit ; /∗ Process exit status ∗/ | |||
| }; | |||
| struct utmp { | |||
| char ut_user[8]; /∗ user login name ∗/ | |||
| char ut_id[4]; /∗ /etc/inittab id (created by ∗/ | |||
| /∗ process that puts entry in utmp) ∗/ | |||
| char ut_line[12]; /∗ device name (console, lnxx) ∗/ | |||
| pid_t ut_pid; /∗ process id ∗/ | |||
| short ut_type; /∗ type of entry ∗/ | |||
| #ifdef m88k | |||
| short ut_pad ; /∗ BCS 10.1 ∗/ | |||
| #endif /∗ m88k ∗/ | |||
| struct exit_status ut_exit; /∗ exit status of a process | |||
| ∗ marked as DEAD_PROCESS | |||
| ∗/ | |||
| time_t ut_time; /∗ time entry was made ∗/ | |||
| #ifdef m88k | |||
| char ut_host[24]; /∗ hostname, if remote(BCS) ∗/ | |||
| #endif /∗ m88k ∗/ | |||
| }; |
/∗ 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 ACOUNTING 9 | |||
| #ifdef m88k | |||
| #define FTP 128 | |||
| #define REMOTE_LOGIN 129 | |||
| #define REMOTE_PROCESS 130 | |||
| #endif /∗ m88k ∗/ | |||
| #ifdef m88k | |||
| #define UTMAXTYPE REMOTE_PROCESS /∗ Largest legal value of ut_type / | |||
| #endif /∗ m88k ∗/ | |||
| #ifdef m68k | |||
| #define UTMAXTYPE ACCOUNTING /∗ Largest legal value of ut_type / | |||
| #endif /∗ m68k ∗/ |
/∗ Below are 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 character in length. ∗/
| #define | RUNLVL_MSG | "run−level %c" |
| #define | BOOT_MSG | "system boot" |
| #define | OTIME_MSG | "old time" |
| #define | NTIME_MSG | "new time" |
FILES
/var/adm/utmp
/var/adm/wtmp