Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ who(1) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

date

init

login

mesg

su

wait

ports

utmp

who

PURPOSE

     Identifies the users currently logged in.

SYNOPSIS
     who [-uTldbtas] [ file ]

     who am i


DESCRIPTION

     The who command  with no flags writes  to standard output
     the login name,  work station name, and date  and time of
     login for  all users currently  on the system.  who  am i
     gives this information only for you.

     With flags, who  can also display the  elapsed time since
     line  activity occurred,  the process-ID  of the  command
     interpreter  (shell),  logins,   logouts,  restarts,  and
     changes to the  system clock, as well  as other processes
     generated by the init process.

     The general format of the output of who is as follows:

       name [state] line time activity pid [location] [exit]

     where:

     o   "name" is the user's login name.
     o   "state" indicates whether or not the line is readable
         by everyone (see the -T flag).
     o   "line" is the name of the line as found in the direc-
         tory /dev.
     o   "time" is the time that user logged in.
     o   "activity" is  the hours  and minutes  since activity
         last occurred  on that user's  line.  A dot  (.) here
         indicates line  activity within the last  minute.  If
         the line has been quiet more than 24 hours or has not
         been used since the last system startup, the entry is
         marked old.
     o   "pid" is the process-ID of the user's shell.
     o   "location" is the location  associated with this line
         as found  in file /etc/ports.  This  file can contain
         information about where the  work station is located,
         the telephone number of the dataset, the type of work
         station if direct-connected, and other related infor-
         mation.

     o   "exit" is the exit status of ended processes (see the
         -d flag).

     To   obtain  its   information,  who   normally  examines
     /etc/utmp.  If you specify another file, who examines the
     named   file  instead.    This  file   will  usually   be
     /usr/adm/wtmp, which  contains the history of  all logins
     since the file was last created or /etc/.ilog, which con-
     tains the history of  invalid logins.  Only someone oper-
     ating with superuser authority or  a member of the system
     group can examine /etc/.ilog

     Note:  This  command only  identifies users on  the local
     node.

FLAGS

     -a   Processes /etc/utmp or the named file with all flags
          on.
     -b   Indicates  the  time and  date  of  the most  recent
          system startup.  The  NLTIME and NLLDATE environment
          variables control  the format of the  login time and
          date.
     -d    Displays  all processes  that have  expired without
          being regenerated  by init.  The exit  field appears
          for dead processes and  contains the termination and
          exit  values  (as  returned  by wait)  of  the  dead
          process.  (This flag is useful for determining why a
          process ended.)
     -l   Lists only work stations not in use.  The name field
          is LOGIN in  such cases.  Other fields  are the same
          as  for user  entries  except that  the state  field
          doesn't appear.
     -p   Lists any  active process  that is  currently active
          and has been previously generated by init.
     -r   Indicates the current run-level of the process.
     -s   Lists only  the name, line, and  time fields.  (This
          is  the default;  thus, who  and who  -s are  equiv-
          alent.)   The NLTIME  environment variable  controls
          the format of the time.
     -t   Indicates the last change to the system clock by the
          superuser using the date  command.  The NLTIME envi-
          ronment variable controls the format of the time.
     -T   Displays  the state  of  the work  station line  and
          indicates  who can  write  to that  work station  as
          follows:
          +  writable by anyone
          -  writable only by the superuser or its owner
          ?  bad line encountered.
     -u   Displays  the user  name, work  station name,  login
          time, line activity, and  process-ID of each current
          user.  The NLTIME  environment variable controls the
          format of the login time.

EXAMPLES

     1.  To display information about who is using the system:

           who

         This  lists the  user  name, work  station name,  and
         login time of all users currently using the system.
     2.  To display your user name:

           who am i

         This displays the user name you typed when you logged
         in, the name  of the work station you  are using, and
         the time you logged in.   Your login user name may be
         different  from your  current user  name if  you have
         used the su command.
     3.  To  display  a  history of  logins,  logouts,  system
         startups, and system shutdowns:

           who  /usr/adm/wtmp

FILES

     /etc/utmp
     /usr/adm/wtmp
     /etc/ports

RELATED INFORMATION

     The  following  commands:    "date,"   "init,"  "login,"
     "mesg," and  "su."

     The wait system call and the  ports and utmp files in AIX
     Operating System Technical Reference.

     "Overview of International Character Support" in Managing
     the AIX Operating System.

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