UTMP( 5) FILE FORMATS UTMP(5) 0 NAME utmp, wtmp - login records SYNOPSIS DESCRIPTION #include The utmp file records information about who is currently using the system. The file is a sequence of entries with the following structure declared in the include file: @(#)utmp.h 1.1 8'1/12/20 SMI; from UCB 4.2 83/05/22 Structure of utmp and wtmp files. * • Assuming the number 8 is unwise. struct utmp { char char char long uUine[8]; ut_name[8]; ut_host[l6]; ut_time; tty name user id host name, if remote time on•/ }; This structure gives the name of the special file associated with the user's terminal, the user's login name, and the time of the login in the form of time(3C).
0 The wtmp file records all logins and logouts. A null user name indicates a logout on the associ- ated terminal. Furthermore, the terminal name ,-, indicates that the system was rebooted at the indicated time; the adjacent pair of entries with terminal names T and '}' indicate the system- maintained time just before and just after a date command has changed the system's idea of the time. Wtmp is maintained by login(!) and init(B). Neither of these programs creates the file, so if it is removed record-keeping is turned off. It is summarized by ac(8). FILES /etc/utmp /usr /adm/wtmp SEE ALSO login(l), init(8), who(!), ac(8) 0 Sun Release 1.4 Last change: 26 June 1983 75a