]>
Commit | Line | Data |
---|---|---|
1f2f436a A |
1 | --- utmpx.5.orig 2009-11-06 10:28:19.000000000 -0800 |
2 | +++ utmpx.5 2009-11-06 10:29:23.000000000 -0800 | |
3 | @@ -31,9 +31,7 @@ | |
3d9156a7 A |
4 | .Dt UTMPX 5 |
5 | .Os | |
6 | .Sh NAME | |
7 | -.Nm utmpx , | |
8 | -.Nm wtmpx , | |
9 | -.Nm lastlogx | |
10 | +.Nm utmpx | |
11 | .Nd user accounting database | |
12 | .Sh SYNOPSIS | |
13 | .In utmpx.h | |
1f2f436a | 14 | @@ -53,88 +51,51 @@ The |
3d9156a7 | 15 | .Aq Pa utmpx.h |
224c7076 | 16 | header defines the structures and functions for logging user. |
3d9156a7 A |
17 | Currently logged in users are tracked in |
18 | -.Pa /var/run/utmpx , | |
19 | -a list of all logins and logouts, as well as all shutdowns, reboots | |
20 | -and date changes, is kept in | |
21 | -.Pa /var/log/wtmpx , | |
22 | -and the last login of each user is noted in | |
23 | -.Pa /var/log/lastlogx . | |
224c7076 | 24 | -.Pp |
3d9156a7 | 25 | +.Pa /var/run/utmpx . |
224c7076 | 26 | The interface to the |
3d9156a7 A |
27 | .Nm utmpx |
28 | file is described in | |
1f2f436a A |
29 | -.Xr getutxent 3 . |
30 | +.Xr endutxent 3 . | |
224c7076 A |
31 | +The file is not automatically created if they do not exist; it |
32 | +must be created manually. | |
33 | .Pp | |
3d9156a7 A |
34 | -The |
35 | -.Nm wtmpx | |
36 | -file can grow rapidly on busy systems, and is normally rotated with | |
37 | -.Xr newsyslog 8 . | |
224c7076 A |
38 | +Traditionally, separate files would be used to store the running log of |
39 | +the logins and logouts | |
40 | +.Pf ( Pa wtmpx ) , | |
41 | +and the last login of each user | |
42 | +.Pf ( Pa lastlogx ) . | |
43 | +With the availability of the Apple system log facility | |
44 | +.Xr asl 3 , | |
45 | +these separate files can be replace with log entries, which are automatically | |
46 | +generated when | |
47 | +.Nm utmpx | |
48 | +entries are written. | |
49 | +The API to access the logins and logouts is described in | |
50 | +.Xr endutxent_wtmp 3 | |
51 | +while the last login info is accessible with | |
52 | +.Xr getlastlogx 3 . | |
53 | .Pp | |
3d9156a7 A |
54 | -In the event of a date change, a shutdown, or a reboot, the following |
55 | -items are logged in the | |
56 | -.Nm wtmpx | |
57 | -file: | |
58 | -.Bl -tag -width shutdownxx -compact -offset indent | |
59 | -.It Li date | |
60 | -The system time has been manually or automatically updated by | |
61 | -.Xr date 1 . | |
62 | -The command name | |
63 | -.Em date | |
64 | -is recorded in the field | |
65 | -.Fa ut_name . | |
66 | -In the field | |
67 | -.Fa ut_line , | |
68 | -the character | |
69 | -.Ql \\*(Ba | |
70 | -indicates the time prior to the change, and the character | |
71 | -.Ql \&{ | |
72 | -indicates the new time. | |
73 | -.It Li reboot | |
74 | -.It Li shutdown | |
75 | -A system reboot or shutdown has been initiated. | |
76 | -The character | |
77 | -.Ql \&~ | |
78 | -is placed in the field | |
79 | -.Fa ut_line , | |
80 | -and | |
81 | -.Li reboot | |
82 | -or | |
83 | -.Li shutdown | |
84 | -in the field | |
85 | -.Fa ut_name | |
86 | -(see | |
87 | -.Xr shutdown 8 | |
224c7076 A |
88 | +For compatibility, changes to |
89 | +.Nm utmpx | |
90 | +are reflected in | |
91 | +.Xr utmp 3 | |
92 | +(in the | |
93 | +.Pa utmp , | |
94 | +.Pa wtmp | |
95 | and | |
3d9156a7 A |
96 | -.Xr reboot 8 ) , |
97 | -using | |
98 | -.Xr logwtmpx 3 . | |
99 | -.Pp | |
100 | -.El | |
224c7076 A |
101 | +.Pa lastlog |
102 | +files), | |
3d9156a7 A |
103 | +but not the other way around. |
104 | .Sh FILES | |
105 | -.Bl -tag -width /var/log/lastlogx -compact | |
106 | +.Bl -tag -width /var/log/utmpx -compact | |
107 | .It Pa /var/run/utmpx | |
108 | The | |
109 | .Nm utmpx | |
110 | file. | |
111 | -.It Pa /var/log/wtmpx | |
112 | -The | |
113 | -.Nm wtmpx | |
114 | -file. | |
115 | -.It Pa /var/log/lastlogx | |
116 | -The | |
117 | -.Nm lastlogx | |
118 | -file. | |
119 | .El | |
120 | .Sh SEE ALSO | |
121 | -.Xr last 1 , | |
122 | -.Xr login 1 , | |
123 | -.Xr rwho 1 , | |
124 | -.Xr w 1 , | |
125 | -.Xr who 1 , | |
224c7076 | 126 | +.Xr asl 3 , |
3d9156a7 A |
127 | .Xr endutxent 3 , |
128 | -.Xr logwtmpx 3 , | |
1f2f436a | 129 | -.Xr utmp 5 , |
3d9156a7 A |
130 | -.Xr ac 8 , |
131 | -.Xr init 8 , | |
132 | -.Xr newsyslog 8 , | |
133 | -.Xr reboot 8 | |
224c7076 A |
134 | +.Xr endutxent_wtmp 3 , |
135 | +.Xr getlastlogx 3 , | |
3d9156a7 | 136 | +.Xr utmp 5 |