UTMP(4) — Kubota Pacfic Computer Inc.
NAME
utmp, wtmp − utmp and wtmp entry formats
SYNOPSIS
#include <sys/types.h>
#include <utmp.h>
DESCRIPTION
These files, which hold user and accounting information for such commands as who(1), write(1), and login(1), use the following structure as defined by <utmp.h>:
#defineUTMP_FILE"/etc/utmp"
#defineWTMP_FILE"/etc/wtmp"
#defineut_nameut_user
structutmp {
charut_user[8];/∗ User login name ∗/
charut_id[4];/∗ /etc/inittab id (usually line #) ∗/
charut_line[12];/∗ device name (console, lnxx) ∗/
charut_host[16];/∗ host name, if remote login ∗/
shortut_pid;/∗ process id ∗/
shortut_type;/∗ type of entry ∗/
structexit_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_tut_time; /∗ time entry was made ∗/
};
/∗ Definitions for ut_type ∗/
#defineEMPTY0
#defineRUN_LVL1
#defineBOOT_TIME2
#defineOLD_TIME3
#defineNEW_TIME4
#defineINIT_PROCESS5/∗ Process spawned by "init" ∗/
#defineLOGIN_PROCESS6/∗ A "getty" process waiting for login ∗/
#defineUSER_PROCESS7/∗ A user process ∗/
#defineDEAD_PROCESS8
#defineACCOUNTING9
#defineUTMAXTYPEACCOUNTING/∗ Largest legal value of ut_type ∗/
#defineRUNLVL_MSG"run−level %c"
#defineBOOT_MSG"system boot"
#defineOTIME_MSG"old time"
#defineNTIME_MSG"new time"
FILES
/etc/utmp
/etc/wtmp
SEE ALSO
getut(3C), login(1), who(1), write(1)
September 02, 1992