utmpx(4)
NAME
utmpx, wtmpx − utmpx and wtmpx entry formats
SYNOPSIS
#include <utmpx.h>
DESCRIPTION
utmpx(4) is an extended version of utmp(4).
utmpx and wtmpx hold user and accounting information for commands such as who, write, and login. These files have the following structure as defined by <utmpx.h>:
#defineUTMPX_FILE"/var/adm/utmpx"
#defineWTMPX_FILE"/var/adm/wtmpx"
#defineut_nameut_user
#defineut_xtimeut_tv.tv_sec
struct utmpx {
charut_user[32];/∗ user login name ∗/
charut_id[4];/∗ inittab id ∗/
charut_line[32];/∗ device name ∗/
/∗ (console, lnxx) ∗/
pid_tut_pid;/∗ process id ∗/
shortut_type;/∗ type of entry ∗/
structexit_status ut_exit;/∗ process termination/exit ∗/
/∗ status ∗/
structtimeval ut_tv;/∗ time entry was made ∗/
longut_session;/∗ session ID, used for ∗/
/∗ windowing ∗/
longpad[5];/∗ reserved for future use ∗/
shortut_syslen;/∗ significant length of ∗/
/∗ ut_host ∗/
/∗ including terminating null ∗/
charut_host[257];/∗ remote host name ∗/
};
/∗ 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
#defineUTMAXTYPE ACCOUNTING /∗ Largest legal value ∗/
/∗ of ut_type ∗/
/∗ 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. ∗/
#defineRUNLVL_MSG"run-level %c"
#defineBOOT_MSG"system boot"
#defineOTIME_MSG"old time"
#defineNTIME_MSG"new time"
#defineMOD_WIN10
FILES
/var/adm/utmpx
/var/adm/wtmpx
SEE ALSO
SunOS 5.4 — Last change: 3 Jul 1990