Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ who(1) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

date(1)

login(1)

mesg(1)

su(1)

whoami(1)

init(1M)

wait(2)

inittab(4)

utmp(4)

who(1)                                                               who(1)

NAME
     who - show who is on the system

SYNOPSIS
     who [option ...] [file]                                       Format 1

     who -q [-n number] [--] [file]                                Format 2

     who am i                                                      Format 3

     who am I                                                      Format 4

DESCRIPTION
     who provides information on:

     -  the login and terminal name under which you are currently working

     -  the login name, login time, and terminal name for each current sys-
        tem user

     -  the process ID of the command interpreter (shell) being used

     -  the last time a terminal was used

     -  when logins, logouts, and system breakdowns have taken place since
        the /var/adm/wtmp file was cleared by the system administrator.

     -  the last time the system clock was changed

     -  the processes spawned by the init process

     Note:
        who normally gets its information from the/var/adm/utmp file. The
        information in this file is brought up to date every time a login
        is performed. In single-user mode no logins are performed. Thus
        after a shutdown to single-user mode who may not be able to supply
        accurate information about the current login status. Use who am i
        instead.

        To obtain the same information if the /var directory (or the direc-
        tory corresponding to it in your system configuration) is not
        mounted in the file system in single-user mode, you should proceed
        as follows: Call the who command giving the temporary files
        tmputmp and tmpwtmp as arguments. These files reside in the
        /stand directory.










Page 1                       Reliant UNIX 5.44                Printed 11/98

who(1)                                                               who(1)

OPTIONS
   Format 1: List detailed information

     who [option ...] [file]

     No option specified:
          who lists the following for every system user currently logged
          in:

          -  login name under which the user logged in

          -  name of the terminal on which the user logged in

          -  login time.

          The columns in the output are described below in Output.

     -a   (a - all) Turns on options -b, -d, -l, -p, -r, -t, -T and -u.

     -b   (b - boot) Shows the date and time of the last reboot.

     -d   (d - dead) Shows all processes that have terminated and not been
          respawned by init. Produces a list of dead processes together
          with their exit status and the number of the signal which ter-
          minated the process. This may be useful in determining why a pro-
          cess died.

     -H   (H - headings) Prints headings above the output columns.

     -l   (l - login) Lists the processes where the system is waiting for
          someone to log in. In such cases the entry in the NAME field is
          the name of the program (or LOGIN). The other fields have their
          usual meanings.

     -m   who only outputs information on the active terminal.

     -p   (p - process) Shows all processes spawned by the init process.
          The NAME field shows the name of the program executed by init as
          listed in /etc/inittab [see inittab(4)].

          The LINE field is irrelevant in conjunction with the -p option,
          so only a dot is output in this field. The COMMENTS field is not
          displayed unless you combine -p with -a or with -l and/or -u. In
          these cases the comment field contains the entry from the corre-
          sponding line in /etc/inittab [see inittab(4)].

     -r   (r -run level) Shows the current run level of the init process.
          The LINE field indicates the current run level, the TIME field
          the date it was entered.





Page 2                       Reliant UNIX 5.44                Printed 11/98

who(1)                                                               who(1)

          IDLE shows the current run level in numeric form, PID shows how
          often the system has been in this state before, and COMMENTS
          indicates the system's previous run level. The NAME field has no
          meaning with the -r option.

     -s   (s - standard) Lists the users who are currently logged in. The
          NAME field gives the login name, LINE is the device name (without
          the /dev/) of the terminal on which the user logged in. TIME
          shows when the user logged in.

          This option is the default. -s cannot be combined with -a, -d, or
          -T.

     -T   (T - terminal) The terminal state is output in addition to the
          default values. The LINE field shows whether other users can
          write to the terminal: a plus sign + indicates that they can, a
          minus sign - means that they cannot. The system administrator can
          write to any terminal. If it is not possible for the system to
          obtain this information, a question mark ? appears in this field.

     -t   (t - time) Shows the last time the system administrator changed
          the system clock (using the date command).

     -u   (u - user) Lists those users who are currently logged in. The
          NAME field is the user's login name. LINE is the device name
          (without the /dev/) of the terminal on which the user logged in.
          TIME shows when the user logged in.

          The IDLE field provides information on the last time there was
          activity on the terminal in question: a dot (.) indicates
          activity within the last minute. If the terminal has not been
          used for over 24 hours or since the system was last booted, the
          entry is marked old.

          The PID field indicates the process ID of the command interpreter
          (shell) the user is working with. COMMENTS is a comment about the
          terminal as contained in /etc/inittab [see inittab(4)]. This com-
          ment may provide information about where the terminal is located
          and similar topics.

     --   If file begins with a dash (-), the end of the command-line
          options must be marked with --.

     file Name of the file from which who obtains its information. file, if
          given, will typically be /var/adm/wtmp. who then provides infor-
          mation about logins, logouts and system breakdowns that have
          taken place since this file was last cleared by the system
          administrator.

          file not specified:

          who obtains its information from the file /var/adm/utmp.


Page 3                       Reliant UNIX 5.44                Printed 11/98

who(1)                                                               who(1)

   Output

     The following section lists the headings of the columns output by who
     and discusses the information displayed in each column.

     The output columns have different meanings in some cases with the -b,
     -d, -p, -r, and -t options.

     NAME Indicates the user's login name.

     LINE Gives the device name (without the /dev/) of the terminal on
          which the user logged in.

     TIME Shows when the user logged in.

     IDLE Provides information on the last time there was activity on the
          terminal in question: a dot (.) indicates activity within the
          last minute. If the terminal has not been used for over 24 hours
          or since the system was last booted, the entry is marked old.

     PID  Indicates the process ID of the command interpreter (shell) the
          user is working with.

     COMMENTS
          Contains a comment about the terminal as contained in
          /etc/inittab [see inittab(4)]. This comment may provide informa-
          tion about where the terminal is located and similar topics.

   Format 2: List concise information

     who -q [-n number] [--] [file]

     -q   (q - quick) who only outputs the names and number of users
          currently logged on. Additional options, with the exception of
          -n, are ignored.

     -n number
          who displays number users per line. number must be at least 1.

     --   If file begins with a dash (-), the end of the command-line
          options must be marked with --.

     file See Format 1.

   Format 3, Format 4: List information on the invoking user

     who am i

     who am I

     Identical to who -m. who lists:



Page 4                       Reliant UNIX 5.44                Printed 11/98

who(1)                                                               who(1)

     -  the login name under which you logged in

     -  the device name (without the /dev/) of the terminal on which you
        logged in

     -  the login time.

LOCALE
     The LCMESSAGES environment variable governs the language in which
     message texts are displayed.

     The LCTIME environment variable governs the format of date and time
     strings.

     If LCMESSAGES or LCTIME is undefined or is defined as the null
     string, it defaults to the value of LANG. If LANG is likewise unde-
     fined or null, the system acts as if it were not internationalized.

     The LCALL environment variable governs the entire locale. LCALL
     takes precedence over all the other environment variables which affect
     internationalization.

     If any of the locale variables has an invalid value, the system acts
     as if none of the variables were set.

EXAMPLES
     Example 1

     Listing general information on all users currently logged in by cal-
     ling who without options.

     $ who
     martin     tty001       Mar  7 10:53
     moira      tty002       Mar  7 11:10

     Example 2

     Listing detailed information with column headings on all users
     currently logged in by calling who with the -H and -u options.

     $ who -Hu
     NAME       LINE         TIME          IDLE    PID  COMMENTS
     martin     tty001       Mar  7 10:53   .     6252
     moira      tty002       Mar  7 11:10  0:22   6289










Page 5                       Reliant UNIX 5.44                Printed 11/98

who(1)                                                               who(1)

     Example 3

     Listing concise information on all users currently logged in by cal-
     ling who with the -q option.

     $ who -q
     martin    moira
     # users=2

     Example 4

     Listing information on the invoking user with who am i.

     $ who am i
     martin   tty001       Mar  7 10:53

FILES
     /var/adm/utmp
          File from which who obtains its information by default. This file
          records the latest status.

     /var/adm/wtmp
          This file can be used as an alternative to /var/adm/utmp. This
          file is regularly cleared by the system administrator.

     /etc/inittab
          Configuration file for the init system process.

SEE ALSO
     date(1), login(1), mesg(1), su(1), whoami(1), init(1M), wait(2),
     inittab(4), utmp(4).























Page 6                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026