]>
Commit | Line | Data |
---|---|---|
1f2f436a | 1 | .\" $NetBSD: utmpx.5,v 1.7 2008/04/30 13:10:57 martin Exp $ |
3d9156a7 A |
2 | .\" |
3 | .\" Copyright (c) 2002 The NetBSD Foundation, Inc. | |
4 | .\" All rights reserved. | |
5 | .\" | |
6 | .\" This code is derived from software contributed to The NetBSD Foundation | |
7 | .\" by Thomas Klausner. | |
8 | .\" | |
9 | .\" Redistribution and use in source and binary forms, with or without | |
10 | .\" modification, are permitted provided that the following conditions | |
11 | .\" are met: | |
12 | .\" 1. Redistributions of source code must retain the above copyright | |
13 | .\" notice, this list of conditions and the following disclaimer. | |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
15 | .\" notice, this list of conditions and the following disclaimer in the | |
16 | .\" documentation and/or other materials provided with the distribution. | |
3d9156a7 A |
17 | .\" |
18 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS | |
19 | .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
20 | .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
21 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
22 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
23 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
24 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
25 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
26 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
27 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
28 | .\" POSSIBILITY OF SUCH DAMAGE. | |
29 | .\" | |
1f2f436a | 30 | .Dd January 31, 2007 |
3d9156a7 A |
31 | .Dt UTMPX 5 |
32 | .Os | |
33 | .Sh NAME | |
ad3c9f2a | 34 | .Nm utmpx |
3d9156a7 A |
35 | .Nd user accounting database |
36 | .Sh SYNOPSIS | |
37 | .In utmpx.h | |
38 | .Sh DESCRIPTION | |
1f2f436a A |
39 | In contrast to |
40 | .Pa utmp | |
41 | and | |
42 | .Pa wtmp , | |
43 | the extended databases in | |
44 | .Pa utmpx | |
45 | and | |
46 | .Pa wtmpx | |
47 | reserve more space for logging hostnames, and also | |
48 | information on a process' ID, termination signal and exit status. | |
49 | .Pp | |
3d9156a7 A |
50 | The |
51 | .Aq Pa utmpx.h | |
52 | header defines the structures and functions for logging user. | |
53 | Currently logged in users are tracked in | |
ad3c9f2a | 54 | .Pa /var/run/utmpx . |
3d9156a7 A |
55 | The interface to the |
56 | .Nm utmpx | |
57 | file is described in | |
ad3c9f2a A |
58 | .Xr endutxent 3 . |
59 | The file is not automatically created if they do not exist; it | |
60 | must be created manually. | |
3d9156a7 | 61 | .Pp |
ad3c9f2a A |
62 | Traditionally, separate files would be used to store the running log of |
63 | the logins and logouts | |
64 | .Pf ( Pa wtmpx ) , | |
65 | and the last login of each user | |
66 | .Pf ( Pa lastlogx ) . | |
67 | With the availability of the Apple system log facility | |
68 | .Xr asl 3 , | |
69 | these separate files can be replace with log entries, which are automatically | |
70 | generated when | |
71 | .Nm utmpx | |
72 | entries are written. | |
73 | The API to access the logins and logouts is described in | |
74 | .Xr endutxent_wtmp 3 | |
75 | while the last login info is accessible with | |
76 | .Xr getlastlogx 3 . | |
3d9156a7 | 77 | .Pp |
ad3c9f2a A |
78 | For compatibility, changes to |
79 | .Nm utmpx | |
80 | are reflected in | |
81 | .Xr utmp 3 | |
82 | (in the | |
83 | .Pa utmp , | |
84 | .Pa wtmp | |
3d9156a7 | 85 | and |
ad3c9f2a A |
86 | .Pa lastlog |
87 | files), | |
88 | but not the other way around. | |
3d9156a7 | 89 | .Sh FILES |
ad3c9f2a | 90 | .Bl -tag -width /var/log/utmpx -compact |
3d9156a7 A |
91 | .It Pa /var/run/utmpx |
92 | The | |
93 | .Nm utmpx | |
94 | file. | |
3d9156a7 A |
95 | .El |
96 | .Sh SEE ALSO | |
ad3c9f2a | 97 | .Xr asl 3 , |
3d9156a7 | 98 | .Xr endutxent 3 , |
ad3c9f2a A |
99 | .Xr endutxent_wtmp 3 , |
100 | .Xr getlastlogx 3 , | |
101 | .Xr utmp 5 |