BSD 4_3_Reno release
[unix-history] / usr / src / share / man / man5 / utmp.5
index 1cde2f8..6a0b625 100644 (file)
@@ -2,9 +2,9 @@
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
-.\"    @(#)utmp.5      4.1 (Berkeley) %G%
+.\"    @(#)utmp.5      6.6 (Berkeley) 6/23/90
 .\"
 .\"
-.TH UTMP 5 
+.TH UTMP 5  "June 23, 1990"
 .UC 4
 .SH NAME
 utmp, wtmp \- login records
 .UC 4
 .SH NAME
 utmp, wtmp \- login records
@@ -13,50 +13,57 @@ utmp, wtmp \- login records
 .SH DESCRIPTION
 The
 .I utmp
 .SH DESCRIPTION
 The
 .I utmp
-file allows one to discover information about who is currently
-using UNIX.
-The file is a sequence of entries with the following
-structure declared in the include file:
+file records information about who is currently using the system.
+The file is a sequence of entries with the following structure, as
+defined in the include file.
 .RS
 .PP
 .nf
 .RS
 .PP
 .nf
-.so /usr/include/utmp.h
+#define UT_NAMESIZE    8
+#define UT_LINESIZE    8
+#define UT_HOSTSIZE    16
+struct utmp {
+       char    ut_line[UT_NAMESIZE];
+       char    ut_name[UT_LINESIZE];
+       char    ut_host[UT_HOSTSIZE];
+       time_t  ut_time;
+};
+.ft R
+.ad
 .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
 .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
-.IR time (2).
+.IR time (3).
 .PP
 The
 .I wtmp
 file records all logins and logouts.
 .PP
 The
 .I wtmp
 file records all logins and logouts.
-Its format is exactly like
-.I utmp
-except that
-a null user name indicates a logout on the associated
-terminal.
-Furthermore, the terminal name `~' indicates that the
-system was rebooted at the indicated time;
-the adjacent pair of entries with terminal names
-`\^|\^' and `}' indicate the system-maintained time
-just before and just after a
+A null user name indicates a logout on the associated terminal.
+Furthermore, the terminal name `~' indicates that the system was
+rebooted at the indicated time; in such cases the name will be
+``shutdown''.  An adjacent pair of entries with terminal names
+`\^|\^' and `{' indicate the system-maintained time just before
+and just after a
 .I date
 .I date
-command has changed the system's idea of the time.
+command has changed the system's idea of the time.  The name for
+both entries will be ``date''.
 .PP
 .I Wtmp
 is maintained by
 .IR login (1)
 and
 .IR init (8).
 .PP
 .I Wtmp
 is maintained by
 .IR login (1)
 and
 .IR init (8).
-Neither of these programs creates the file,
-so if it is removed record-keeping is turned off.
-It is summarized by
+Neither of these programs creates the file, so if it is removed
+record-keeping is turned off.  It is summarized by
+.IR last (1)
+and
 .IR ac (8).
 .SH FILES
 .IR ac (8).
 .SH FILES
-/etc/utmp
+/var/run/utmp
 .br
 .br
-/usr/adm/wtmp
+/var/log/wtmp
 .SH "SEE ALSO"
 .SH "SEE ALSO"
-login(1), init(8), who(1), ac(8)
+last(1), login(1), who(1), ac(8), init(8)