1 '\" te
   2 .\" Copyright (c) 2004, Sun Microsystems, Inc.  All Rights Reserved
   3 .\" Copyright 1989 AT&T
   4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   7 .TH UTMPD 1M "Jun 4, 2008"
   8 .SH NAME
   9 utmpd \- utmpx monitoring daemon
  10 .SH SYNOPSIS
  11 .LP
  12 .nf
  13 \fButmpd\fR [\fB-debug\fR]
  14 .fi
  15 
  16 .SH DESCRIPTION
  17 .sp
  18 .LP
  19 The \fButmpd\fR daemon monitors the \fB/var/adm/utmpx\fR file. See
  20 \fButmpx\fR(4) (and \fButmp\fR(4) for historical information).
  21 .sp
  22 .LP
  23 \fButmpd\fR receives requests from \fBpututxline\fR(3C) by way of a named pipe.
  24 It maintains a table of processes and uses \fBpoll\fR(2) on \fB/proc\fR files
  25 to detect process termination. When \fButmpd\fR detects that a process has
  26 terminated, it checks that the process has removed its \fButmpx\fR entry from
  27 \fB/var/adm/utmpx\fR. If the process' \fButmpx\fR entry has not been removed,
  28 \fButmpd\fR removes the entry. By periodically scanning the
  29 \fB/var/adm/utmpx\fR file, \fButmpd\fR also monitors processes that are not in
  30 its table.
  31 .SH OPTIONS
  32 .sp
  33 .ne 2
  34 .na
  35 \fB\fB-debug\fR\fR
  36 .ad
  37 .sp .6
  38 .RS 4n
  39 Run in debug mode, leaving the process connected to the controlling terminal.
  40 Write debugging information to standard output.
  41 .RE
  42 
  43 .SH EXIT STATUS
  44 .sp
  45 .LP
  46 The following exit values are returned:
  47 .sp
  48 .ne 2
  49 .na
  50 \fB\fB0\fR\fR
  51 .ad
  52 .sp .6
  53 .RS 4n
  54 Successful completion.
  55 .RE
  56 
  57 .sp
  58 .ne 2
  59 .na
  60 \fB\fB>0\fR\fR
  61 .ad
  62 .sp .6
  63 .RS 4n
  64 An error occurred.
  65 .RE
  66 
  67 .SH FILES
  68 .sp
  69 .ne 2
  70 .na
  71 \fB\fB/etc/default/utmpd\fR\fR
  72 .ad
  73 .sp .6
  74 .RS 4n
  75 You can set default values for the flags listed below. For example:
  76 \fBSCAN_PERIOD=600\fR
  77 .sp
  78 .ne 2
  79 .na
  80 \fB\fBSCAN_PERIOD\fR\fR
  81 .ad
  82 .sp .6
  83 .RS 4n
  84 The number of seconds that \fButmpd\fR sleeps between checks of \fB/proc\fR to
  85 see if monitored processes are still alive. The default is 300.
  86 .RE
  87 
  88 .sp
  89 .ne 2
  90 .na
  91 \fB\fBMAX_FDS\fR\fR
  92 .ad
  93 .sp .6
  94 .RS 4n
  95 The maximum number of processes that \fButmpd\fR attempts to monitor. The
  96 default value is 4096.
  97 .RE
  98 
  99 .sp
 100 .ne 2
 101 .na
 102 \fB\fBWTMPX_UPDATE_FREQ\fR\fR
 103 .ad
 104 .sp .6
 105 .RS 4n
 106 The number of seconds that \fButmpd\fR sleeps between read accesses of the
 107 \fBwtmpx\fR file. The \fBwtmpx\fR file's last access time is used by
 108 \fBinit\fR(1M) on reboot to determine when the operating system became
 109 unavailable. The default is 60.
 110 .RE
 111 
 112 .RE
 113 
 114 .sp
 115 .ne 2
 116 .na
 117 \fB\fB/var/adm/utmpx\fR\fR
 118 .ad
 119 .sp .6
 120 .RS 4n
 121 File containing user and accounting information for commands such as
 122 \fBwho\fR(1), \fBwrite\fR(1), and \fBlogin\fR(1).
 123 .RE
 124 
 125 .sp
 126 .ne 2
 127 .na
 128 \fB\fB/proc\fR\fR
 129 .ad
 130 .sp .6
 131 .RS 4n
 132 Directory containing files for processes whose \fButmpx\fR entries are being
 133 monitored.
 134 .RE
 135 
 136 .SH SEE ALSO
 137 .sp
 138 .LP
 139 \fBsvcs\fR(1), \fBinit\fR(1M), \fBsvcadm\fR(1M), \fBpoll\fR(2),
 140 \fBpututxline\fR(3C), \fBproc\fR(4), \fButmp\fR(4), \fButmpx\fR(4),
 141 \fBattributes\fR(5), \fBsmf\fR(5)
 142 .SH NOTES
 143 .sp
 144 .LP
 145 If the filesystem holding \fB/var/adm/wtmpx\fR is mounted with options which
 146 inhibit or defer access time updates, an unknown amount of error will be
 147 introduced into the \fButmp\fR \fBDOWN_TIME\fR record's timestamp in the event
 148 of an uncontrolled shutdown (for example, a crash or loss of power ).
 149 Controlled shutdowns will update the modify time of \fB/var/adm/wtmpx\fR, which
 150 will be used on the next boot to determine when the previous shutdown ocurred,
 151 regardless of access time deferral or inhibition.
 152 .sp
 153 .LP
 154 The \fButmpd\fR service is managed by the service management facility,
 155 \fBsmf\fR(5), under the service identifier:
 156 .sp
 157 .in +2
 158 .nf
 159 svc:/system/utmp:default
 160 .fi
 161 .in -2
 162 .sp
 163 
 164 .sp
 165 .LP
 166 Administrative actions on this service, such as enabling, disabling, or
 167 requesting restart, can be performed using \fBsvcadm\fR(1M). The service's
 168 status can be queried using the \fBsvcs\fR(1) command.