159a92d18SAlex Hornung.\" $NetBSD: utmpx.5,v 1.7 2008/04/30 13:10:57 martin Exp $ 259a92d18SAlex Hornung.\" 359a92d18SAlex Hornung.\" Copyright (c) 2002 The NetBSD Foundation, Inc. 459a92d18SAlex Hornung.\" All rights reserved. 559a92d18SAlex Hornung.\" 659a92d18SAlex Hornung.\" This code is derived from software contributed to The NetBSD Foundation 759a92d18SAlex Hornung.\" by Thomas Klausner. 859a92d18SAlex Hornung.\" 959a92d18SAlex Hornung.\" Redistribution and use in source and binary forms, with or without 1059a92d18SAlex Hornung.\" modification, are permitted provided that the following conditions 1159a92d18SAlex Hornung.\" are met: 1259a92d18SAlex Hornung.\" 1. Redistributions of source code must retain the above copyright 1359a92d18SAlex Hornung.\" notice, this list of conditions and the following disclaimer. 1459a92d18SAlex Hornung.\" 2. Redistributions in binary form must reproduce the above copyright 1559a92d18SAlex Hornung.\" notice, this list of conditions and the following disclaimer in the 1659a92d18SAlex Hornung.\" documentation and/or other materials provided with the distribution. 1759a92d18SAlex Hornung.\" 1859a92d18SAlex Hornung.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 1959a92d18SAlex Hornung.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2059a92d18SAlex Hornung.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2159a92d18SAlex Hornung.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2259a92d18SAlex Hornung.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2359a92d18SAlex Hornung.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2459a92d18SAlex Hornung.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2559a92d18SAlex Hornung.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2659a92d18SAlex Hornung.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2759a92d18SAlex Hornung.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2859a92d18SAlex Hornung.\" POSSIBILITY OF SUCH DAMAGE. 2959a92d18SAlex Hornung.\" 3025606b42SSascha Wildner.Dd September 11, 2019 3159a92d18SAlex Hornung.Dt UTMPX 5 3259a92d18SAlex Hornung.Os 3359a92d18SAlex Hornung.Sh NAME 3459a92d18SAlex Hornung.Nm utmpx , 3559a92d18SAlex Hornung.Nm wtmpx , 3659a92d18SAlex Hornung.Nm lastlogx 3759a92d18SAlex Hornung.Nd user accounting database 3859a92d18SAlex Hornung.Sh SYNOPSIS 3959a92d18SAlex Hornung.In utmpx.h 4059a92d18SAlex Hornung.Sh DESCRIPTION 4125606b42SSascha WildnerIn contrast to the formerly used legacy 4259a92d18SAlex Hornung.Pa utmp 4359a92d18SAlex Hornungand 4459a92d18SAlex Hornung.Pa wtmp , 4559a92d18SAlex Hornungthe extended databases in 4659a92d18SAlex Hornung.Pa utmpx 4759a92d18SAlex Hornungand 4859a92d18SAlex Hornung.Pa wtmpx 4959a92d18SAlex Hornungreserve more space for logging hostnames, and also 5059a92d18SAlex Hornunginformation on a process' ID, termination signal and exit status. 5159a92d18SAlex Hornung.Pp 5259a92d18SAlex HornungThe 5359a92d18SAlex Hornung.In utmpx.h 5459a92d18SAlex Hornungheader defines the structures and functions for logging user. 5559a92d18SAlex HornungCurrently logged in users are tracked in 5659a92d18SAlex Hornung.Pa /var/run/utmpx , 5759a92d18SAlex Hornunga list of all logins and logouts, as well as all shutdowns, reboots 5859a92d18SAlex Hornungand date changes, is kept in 5959a92d18SAlex Hornung.Pa /var/log/wtmpx , 6059a92d18SAlex Hornungand the last login of each user is noted in 6159a92d18SAlex Hornung.Pa /var/log/lastlogx . 6259a92d18SAlex Hornung.Pp 6359a92d18SAlex HornungThe interface to the 6459a92d18SAlex Hornung.Nm utmpx 6559a92d18SAlex Hornungfile is described in 6659a92d18SAlex Hornung.Xr getutxent 3 . 6759a92d18SAlex Hornung.Pp 6859a92d18SAlex HornungThe 6959a92d18SAlex Hornung.Nm wtmpx 7059a92d18SAlex Hornungfile can grow rapidly on busy systems, and is normally rotated with 7159a92d18SAlex Hornung.Xr newsyslog 8 . 7259a92d18SAlex Hornung.Pp 7359a92d18SAlex HornungIn the event of a date change, a shutdown, or a reboot, the following 7459a92d18SAlex Hornungitems are logged in the 7559a92d18SAlex Hornung.Nm wtmpx 7659a92d18SAlex Hornungfile: 7759a92d18SAlex Hornung.Bl -tag -width shutdownxx -compact -offset indent 7859a92d18SAlex Hornung.It Li date 7959a92d18SAlex HornungThe system time has been manually or automatically updated by 8059a92d18SAlex Hornung.Xr date 1 . 8159a92d18SAlex HornungThe command name 8259a92d18SAlex Hornung.Em date 8359a92d18SAlex Hornungis recorded in the field 8459a92d18SAlex Hornung.Fa ut_name . 8559a92d18SAlex HornungIn the field 8659a92d18SAlex Hornung.Fa ut_line , 8759a92d18SAlex Hornungthe character 8859a92d18SAlex Hornung.Ql \\*(Ba 8959a92d18SAlex Hornungindicates the time prior to the change, and the character 9059a92d18SAlex Hornung.Ql \&{ 9159a92d18SAlex Hornungindicates the new time. 9259a92d18SAlex Hornung.It Li reboot 9359a92d18SAlex Hornung.It Li shutdown 9459a92d18SAlex HornungA system reboot or shutdown has been initiated. 9559a92d18SAlex HornungThe character 9659a92d18SAlex Hornung.Ql \&~ 9759a92d18SAlex Hornungis placed in the field 9859a92d18SAlex Hornung.Fa ut_line , 9959a92d18SAlex Hornungand 10059a92d18SAlex Hornung.Li reboot 10159a92d18SAlex Hornungor 10259a92d18SAlex Hornung.Li shutdown 10359a92d18SAlex Hornungin the field 10459a92d18SAlex Hornung.Fa ut_name 10559a92d18SAlex Hornung(see 10659a92d18SAlex Hornung.Xr shutdown 8 10759a92d18SAlex Hornungand 10859a92d18SAlex Hornung.Xr reboot 8 ) , 10959a92d18SAlex Hornungusing 11059a92d18SAlex Hornung.Xr logwtmpx 3 . 11159a92d18SAlex Hornung.El 11259a92d18SAlex Hornung.Sh FILES 11359a92d18SAlex Hornung.Bl -tag -width /var/log/lastlogx -compact 11459a92d18SAlex Hornung.It Pa /var/run/utmpx 11559a92d18SAlex HornungThe 11659a92d18SAlex Hornung.Nm utmpx 11759a92d18SAlex Hornungfile. 11859a92d18SAlex Hornung.It Pa /var/log/wtmpx 11959a92d18SAlex HornungThe 12059a92d18SAlex Hornung.Nm wtmpx 12159a92d18SAlex Hornungfile. 12259a92d18SAlex Hornung.It Pa /var/log/lastlogx 12359a92d18SAlex HornungThe 12459a92d18SAlex Hornung.Nm lastlogx 12559a92d18SAlex Hornungfile. 12659a92d18SAlex Hornung.El 12759a92d18SAlex Hornung.Sh SEE ALSO 12859a92d18SAlex Hornung.Xr last 1 , 12959a92d18SAlex Hornung.Xr login 1 , 13059a92d18SAlex Hornung.Xr rwho 1 , 13159a92d18SAlex Hornung.Xr w 1 , 13259a92d18SAlex Hornung.Xr who 1 , 133*7f41abeaSSascha Wildner.Xr wtmpcvt 1 , 13459a92d18SAlex Hornung.Xr endutxent 3 , 13559a92d18SAlex Hornung.Xr logwtmpx 3 , 13659a92d18SAlex Hornung.Xr ac 8 , 13759a92d18SAlex Hornung.Xr init 8 , 13859a92d18SAlex Hornung.Xr newsyslog 8 , 13959a92d18SAlex Hornung.Xr reboot 8 140