.po 1i
.TH UTMP 5 Bell
.V 08/15/84 17:36:16
.\" @[$]utmp.5	1.4 08/15/84 17:36:16 - Zilog Inc.
.ad
.fi
.SH NAME
utmp, wtmp \- login records
.SH SYNOPSIS
.B #include <utmp.h>
.SH DESCRIPTION
The
.B utmp
file contains information about who is currently using ZEUS.
The file is a sequence of entries with the following
structure declared in the include file:
.RS
.PP
.nf
.\".SO /usr/include/utmp.h
/* @[$]utmp.h	1.1  12/11/81 17:09:29 - Zilog Inc */
struct utmp {
	char	ut_line[8];		/* tty name */
	char	ut_name[8];		/* user id */
	long	ut_time;		/* time on */
};


.fi
.RE
.PP
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
.BR time (2).
.PP
The
.B wtmp
file records all logins and logouts.
Its format is exactly like
.B utmp
except that
a null user name indicates a logout on the associated
terminal.
The adjacent pair of entries with terminal names | and { indicate the
system-maintained time just before and just after a
.BR date (1)
command has changed the system's time.
.PP
.B Wtmp
is maintained by
.BR login (1)
and
.BR getty (M).
Neither of these programs creates the file,
so if it is removed, record-keeping is turned off.
It is summarized by
.BR acct (M).
.SH FILES
/etc/utmp
.br
/usr/adm/wtmp
.SH SEE ALSO
acct(M),
login(1),
who(1),
getty(M).
