3 utmp, wtmp \- logged in users, login and logout history
18 respectively contain the currently logged in users, and the history of
21 Each file is an array of the following structure defined in <utmp.h>:
26 char ut_user[8]; /* user name */
27 char ut_line[12]; /* terminal name */
28 char ut_host[16]; /* host name, when remote */
29 time_t ut_time; /* login/logout time */
33 #define ut_name ut_user /* for compatibility with other systems */
37 The structure contains more fields than those listed, but they are only of
44 field is a compatibility alias for
46 it is actually better to use it.
48 A login entry is completely specified. A logout entry has a null string for
50 A shutdown or reboot entry has an
52 field containing a "~" (tilde). The
54 field is usually the name of the program that did the shutdown, or "reboot"
55 at reboot. This is a bit confusing, but note that there should always be
56 two such entries. If you see just one entry then the system has crashed, if
57 you see two entries then the system was properly shut down and later
62 Currently logged in users.
65 History of logins and logouts.
70 Kees J. Bot (kjb@cs.vu.nl)