who.1 (2010 09)

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
utmps database 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, (the -W
option can be used to examine
the
/var/adm/wtmps
file) this option indicates when the accounting system was
turned on or off using the
startup or shutacct commands (see acctsh (1M)).
The name field is a dot (
.). The line field is acctg on, acctg off,orareason
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
utmps database or named utmp
like 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
gethostbyaddr() (IPv4) or
getipnodebyaddr() (IPv6) function is called
with the internet address of the host (see gethostent (3N)). The host name returned
by
gethostbyaddr() (IPv4) or
getipnodebyaddr() (IPv6) is displayed
unless it returns an error, in which case the truncated host name is displayed.
-W Gets the information from /var/adm/wtmps
file.
(UNIX Standard only, see standards (5). 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
For information about the UNIX Standard environment, see standards (5).
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
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010