HP-UX Reference (11i v1 05/09) - 1 User Commands N-Z (vol 2)

w
who(1) who(1)
-d This option displays all processes that have expired and have not been respawned by
init. The exit field appears for dead processes and contains the termination and exit
values of the dead process (as returned by
wait() see wait(2)). This can be useful
in determining why a process terminated.
-b Indicates the time and date of the last reboot.
-r Indicates the current run-level of the
init process. The last three fields contain the
current state of
init, the number of times that state has been previously entered,
and the previous state. These fields are updated each time
init changes to a
different run state.
-t Indicates the last change to the system clock (via the
date command) by root. See
su(1).
-a Processes
/etc/utmp or the named file with all options turned on.
-s Default. Lists only the name, line, and time fields.
-A When the /var/adm/wtmp
file is specified, this option indicates when the account-
ing system was turned on or off using the
startup or shutacct commands (see
acctsh(1M)). The name field is .. The line field is acctg on,
acctg off,ora
reason that was given as an option to the
shutacct command. The time is the time
that the on/off activity occurred.
-R Displays the user’s host name. If the user is logged in on a tty,
who displays the
string returned from
gethostname() (see gethostname(2)). If the user is not
logged in on a tty and the host name stored in the
/etc/utmp or named file has not
been truncated when stored (meaning that the entire host name was stored with no
loss of information), it is displayed as it was stored. Otherwise, the
gethost-
byaddr()
function is called with the internet address of the host (see
gethostent(3N)). The host name returned by gethostbyaddr()
is displayed
unless it returns an error, in which case the truncated host name is displayed.
(XPG4 only. The
-s option can not be used with -d, -a or -T options. If
-u option is used with -T, the
idle time is added to the end of the
-T format.)
EXTERNAL INFLUENCES
Environment Variables
LANG determines the locale to use for the locale categories when both LC_ALL and the corresponding
environment variable (beginning with LC_) do not specify a locale. If LANG is not set or is set to the
empty string, a default of "C" (see lang(5)) is used.
LC_CTYPE determines the locale for interpretation of sequences of bytes of text data as characters (e.g.,
single- verses multibyte characters in arguments and input files).
LC_TIME determines the format and contents of date and time strings.
LC_MESSAGES determines the language in which messages are displayed.
If any internationalization variable contains an invalid setting,
who behaves as if all internationalization
variables are set to "C". See environ(5).
International Code Set Support
Single- and multi-byte character code sets are supported.
EXAMPLES
Check who is logged in on the system:
who
Check whether or not you can write to the terminal that another user is using:
who -T
and look for a plus (+) after the user ID.
AUTHOR
who was developed by AT&T and HP.
HP-UX 11i Version 1: September 2005 2 Hewlett-Packard Company Section 11063