source: trunk/minix/man/man5/utmp.5@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 1.6 KB
Line 
1.TH UTMP 5
2.SH NAME
3utmp, wtmp \- logged in users, login and logout history
4.SH SYNOPSIS
5.nf
6.ft B
7#include <sys/types.h>
8#include <utmp.h>
9.SH DESCRIPTION
10.de SP
11.if t .sp 0.4
12.if n .sp
13..
14The files
15.B /etc/utmp
16and
17.B /usr/adm/wtmp
18respectively contain the currently logged in users, and the history of
19logins and logouts.
20.PP
21Each file is an array of the following structure defined in <utmp.h>:
22.PP
23.nf
24.ta +5n +15n +15n
25struct utmp {
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 */
30};
31.SP
32.ta +15n
33#define ut_name ut_user /* for compatibility with other systems */
34.fi
35.DT
36.PP
37The structure contains more fields than those listed, but they are only of
38interest to
39.B init
40and
41.BR login .
42Note that the
43.B ut_name
44field is a compatibility alias for
45.BR ut_user ,
46it is actually better to use it.
47.PP
48A login entry is completely specified. A logout entry has a null string for
49.BR ut_name .
50A shutdown or reboot entry has an
51.B ut_line
52field containing a "~" (tilde). The
53.B ut_name
54field is usually the name of the program that did the shutdown, or "reboot"
55at reboot. This is a bit confusing, but note that there should always be
56two such entries. If you see just one entry then the system has crashed, if
57you see two entries then the system was properly shut down and later
58rebooted.
59.SH FILES
60.TP 25n
61.B /etc/utmp
62Currently logged in users.
63.TP
64.B /usr/adm/wtmp
65History of logins and logouts.
66.SH "SEE ALSO"
67.BR who (1),
68.BR ttyslot (3).
69.SH AUTHOR
70Kees J. Bot (kjb@cs.vu.nl)
Note: See TracBrowser for help on using the repository browser.