Multics > Library > Articles
08 Sep 1997

The who command

History | People | Library | Sites | About

The who command is derived from the CTSS command of the same name, written by Noel Morris in 1965. It lists the users logged in. I wrote the original Multics who command when we were first debugging the answering service in 1967 or 1968; it took its data from the segment >sc1>answer_table, the primary database for information about logged-in users. Later, we decided to create a separate segment for who's use, >sc1>whotab. (The as_who tool was used by system administrators who had permission to look at the segment >sc1>answer_table.)


Here is the output of who -lg -a from 1997:

    Multics MR12.3b; DOCKMASTER
    Load = 15.0 out of 140.0 units; users = 15, 2 interactive, 13 daemons.
    Absentee users = 0 background; Max background absentee users = 3
    System up since 09/03/97  1253.9 edt Wed
    Last crash was at 09/03/97  1130.0 edt Wed

	Login at      TTY  Load   User ID

    09/03/97  12:54  bk    1.0   Backup.SysDaemon 
	      12:54  ut    1.0   Utility.SysDaemon 
	      12:54  mon   1.0   Monitor.SysDaemon 
	      12:54  mt    1.0   Metering.Daemon 
	      12:54  gand  1.0   Gandalf.Daemon 
	      12:54  mida  1.0   Midas.Daemon 
	      12:55  auth  1.0   Authenticate.Daemon 
	      13:07  cord  1.0   IO.SysDaemon 
	      13:07  prtb  1.0   IO.SysDaemon 
	      15:11  in    1.0   Internet.Daemon 
	      15:13  ns    1.0   Network_Server.Daemon 
	      15:13  nm    1.0   Network_Mailer.Daemon 
	      16:57  vcom  1.0   Volume_Dumper.Daemon 
	      17:08  3106  1.0   Mestman.Novell1 
	      19:23  none  1.0   VanVleck.MWM 

This command was issued while I was logged in via TELNET to the DOCKMASTER system in September 1997. The column titled TTY lists the "terminal id" for the device the user is logged in on. The various daemons are connected to the system via the message coordinator. Notice that there are two IO.SysDaemons, one coordinator process and a driver for printer B. (The distinction between the "SysDaemon" and "Daemon" processes is one of access; the "Daemon" project does not have access to hphcs_, but "SysDaemon" does.) The "Load" column was used on heavily loaded systems; certain process overseers were assigned non-unit weights if users could present more or less than average load. For example, limited service subsystem users might be assigned a load of 0.5.

Info seg for who

Here is the output of help who -a:

    >doc>info>   (70 lines in info)
    03/01/85  who

    Syntax as a command:  who {User_ids} {-control_args}

    Syntax as an active function:  [who {User_ids} {-control_args}]

    Function: lists the number, identification, and status of all users of
    the system; it prints out a header and lists the name and project of
    each user.  The header consists of the system name, the total number of
    users, the current system load, the maximum load, the current number of
    absentee users, and the maximum number of absentee users.  (See the
    how_many_users command to print only the header.)

       are match names, where:
	  lists users with the name Person_id.
	  lists users with the project name Project_id.
	  lists users with the specified person and project.

    Control arguments:
    -absentee, -as
       lists absentee users (see "Notes").
    -all, -a
       lists all the interactive, absentee, and daemon users.
    -brief, -bf
       suppresses the printing of the header.  Not allowed for the active
    -daemon, -dmn
       lists daemon users (see "Notes").
    -interactive, -ia
       lists interactive users (see "Notes").

    -long, -lg
       prints the date and time logged in, the terminal identification, and
       the load units, name, and project of each user.  The header includes
       installation identification and the time the system was brought up.
       If available, the time of the next scheduled shutdown, the time when
       service will resume after the shutdown, and the time of the previous
       shutdown are printed.  Not allowed for the active function.
    -name, -nm
       sorts the output by the name (Person_id) of each user.
    -project, -pj
       sorts the output by the Project_id of each user.

    Notes: If you supply none of -interactive, -absentee, or -daemon and
    give no User_ids, then all interactive and absentee users are listed;
    but if you specify User_ids, then all matching users are listed.  If
    you provide one or more of -interactive, -absentee, or -daemon, only
    processes of the selected type(s) are listed; if you also select
    User_ids, then only users matching those control arguments and the
    User_ids are listed.

    Absentee users are denoted in the list by an asterisk following

    If you omit -name and -project, the output is sorted on login time.
    You can't use both arguments together because the sort is performed on
    one key at a time.

    If you supply a User_id, the header is suppressed even if you give
    -long.  If you use who with no arguments, the system responds with a
    two-line header followed by a list of interactive users sorted
    according to login time.

    Sometimes a Person_id.Project_id returned by the command is followed by
    a "D" and/or an "S", where "D" refers to a disconnected process and "S"
    refers to a suspended process.

    You can prevent your own name from being listed by all users'
    invocations of who; to do this, see your project administrator.

    Notes on active function: The active function returns a list of
    Person_id.Project_id pairs, requoted and separated by spaces.  You can
    use control arguments to select and sort.


Bernie points out that the very existence of the who command shows the existence of an online community. Knowing who's logged in is useful if you want to contact other users with send_message, mail, or phone, to share information or ask questions. That is, the who command contains the tacit assumption that the users of the Multics installation are all reasonable colleagues, with some shared set of values. This assumption is less valid in today's world of on-line service providers that support thousands of strangers.


Source as of MR10 (1982) is available on this site.

[THVV] Source code for bound_info_rtns_, including the who command, as of MR12.5 (1999) is available online at MIT.