]> git.saurik.com Git - apple/libc.git/blame - gen/NetBSD/utmpx.5
Libc-1439.100.3.tar.gz
[apple/libc.git] / gen / NetBSD / utmpx.5
CommitLineData
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
39In contrast to
40.Pa utmp
41and
42.Pa wtmp ,
43the extended databases in
44.Pa utmpx
45and
46.Pa wtmpx
47reserve more space for logging hostnames, and also
48information on a process' ID, termination signal and exit status.
49.Pp
3d9156a7
A
50The
51.Aq Pa utmpx.h
52header defines the structures and functions for logging user.
53Currently logged in users are tracked in
ad3c9f2a 54.Pa /var/run/utmpx .
3d9156a7
A
55The interface to the
56.Nm utmpx
57file is described in
ad3c9f2a
A
58.Xr endutxent 3 .
59The file is not automatically created if they do not exist; it
60must be created manually.
3d9156a7 61.Pp
ad3c9f2a
A
62Traditionally, separate files would be used to store the running log of
63the logins and logouts
64.Pf ( Pa wtmpx ) ,
65and the last login of each user
66.Pf ( Pa lastlogx ) .
67With the availability of the Apple system log facility
68.Xr asl 3 ,
69these separate files can be replace with log entries, which are automatically
70generated when
71.Nm utmpx
72entries are written.
73The API to access the logins and logouts is described in
74.Xr endutxent_wtmp 3
75while the last login info is accessible with
76.Xr getlastlogx 3 .
3d9156a7 77.Pp
ad3c9f2a
A
78For compatibility, changes to
79.Nm utmpx
80are reflected in
81.Xr utmp 3
82(in the
83.Pa utmp ,
84.Pa wtmp
3d9156a7 85and
ad3c9f2a
A
86.Pa lastlog
87files),
88but 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
92The
93.Nm utmpx
94file.
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