]> git.saurik.com Git - apple/libc.git/blob - gen/utmpx.5
Libc-763.13.tar.gz
[apple/libc.git] / gen / utmpx.5
1 .\" $NetBSD: utmpx.5,v 1.7 2008/04/30 13:10:57 martin Exp $
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.
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 .\"
30 .Dd January 31, 2007
31 .Dt UTMPX 5
32 .Os
33 .Sh NAME
34 .Nm utmpx
35 .Nd user accounting database
36 .Sh SYNOPSIS
37 .In utmpx.h
38 .Sh DESCRIPTION
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
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
54 .Pa /var/run/utmpx .
55 The interface to the
56 .Nm utmpx
57 file is described in
58 .Xr endutxent 3 .
59 The file is not automatically created if they do not exist; it
60 must be created manually.
61 .Pp
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 .
77 .Pp
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
85 and
86 .Pa lastlog
87 files),
88 but not the other way around.
89 .Sh FILES
90 .Bl -tag -width /var/log/utmpx -compact
91 .It Pa /var/run/utmpx
92 The
93 .Nm utmpx
94 file.
95 .El
96 .Sh SEE ALSO
97 .Xr asl 3 ,
98 .Xr endutxent 3 ,
99 .Xr endutxent_wtmp 3 ,
100 .Xr getlastlogx 3 ,
101 .Xr utmp 5