a utmp and
a wtmp , the extended databases in
a utmpx and
a wtmpx reserve more space for logging hostnames, and also information on a process' ID, termination signal and exit status.
p The n utmpx.h header defines the structures and functions for logging user. Currently logged in users are tracked in
a /var/run/utmpx , a list of all logins and logouts, as well as all shutdowns, reboots and date changes, is kept in
a /var/log/wtmpx , and the last login of each user is noted in
p The interface to the .Nm utmpx file is described in .Xr getutxent 3 .
p The .Nm wtmpx file can grow rapidly on busy systems, and is normally rotated with .Xr newsyslog 8 .
p In the event of a date change, a shutdown, or a reboot, the following items are logged in the .Nm wtmpx file: l -tag -width shutdownxx -compact -offset indent t Li date The system time has been manually or automatically updated by .Xr date 1 . The command name .Em date is recorded in the field .Fa ut_name . In the field .Fa ut_line , the character .Ql \\*(Ba indicates the time prior to the change, and the character .Ql { indicates the new time. t Li reboot t Li shutdown A system reboot or shutdown has been initiated. The character .Ql ~ is placed in the field .Fa ut_line , and .Li reboot or .Li shutdown in the field .Fa ut_name (see .Xr shutdown 8 and .Xr reboot 8 ) , using .Xr logwtmpx 3 .
p .El .Sh FILES l -tag -width /var/log/lastlogx -compact t Pa /var/run/utmpx The .Nm utmpx file. t Pa /var/log/wtmpx The .Nm wtmpx file. t Pa /var/log/lastlogx The .Nm lastlogx file. .El .Sh SEE ALSO .Xr last 1 , .Xr login 1 , .Xr rwho 1 , .Xr w 1 , .Xr who 1 , .Xr endutxent 3 , .Xr logwtmpx 3 , .Xr utmp 5 , .Xr ac 8 , .Xr init 8 , .Xr newsyslog 8 , .Xr reboot 8