MONITOR(1L)                                           MONITOR(1L)

     NAME
          monitor - display and update information about the AIX/6000
          system events and optionally top cpu processes

     SYNOPSIS
          monitor [-options]

     DESCRIPTION
          Monitor shows various system variables and updates the
          screen periodically. Monitor can also be used to show top
          cpu processes. The metrics can also be logged into a file to
          build historical performance information of your system.

          Monitor can be exited by typing 'q' or by typing ctrl-C
          (keyboard interrupt).  The running sample can be ended by
          pressing any key.  Typing ctrl-L ends the sample but also
          redraws the entire screen. Other interactive key commands
          are

          a    to toggle between normal and alternative display.

          d    to toggle full disk disk display in alternative
               display.

          n    to toggle full net display in alternative display.

          N    to toggle NFS display (mutually exclusive with AFS).

          B    to toggle AFS display (mutually exclusive with NFS).

          s    to toggle smp cpu display in alternate display.

          t    to toggle top processes display.

          u    to toggle between username and userid in top.

          r    to toggle between showing running or all processes.

          c, p, m, v
               to sort top processes on cpu usage, page faults, main
               memory usage or virtual memory usage.

          R    to toggle includeing root sessions in user
               count/activity.

          +, - to increase or decrease to sample time by one second.

          >, < to increase or decrease to sample time by five seconds.

     Page 1                                          (printed 6/23/01)

     MONITOR(1L)                                           MONITOR(1L)

          ?, h show this help message.

          All commands work in both normal and alternative display
          mode, but for example the d and n commands do not
          automatically switch between these display modes. The 't'
          command is special: it remembers top display status for both
          display modes seperately (although the other top related
          commands operate on both display modes at the same time.)

          Note: changing the sample time may influence the Sync
          option. When logmode is also on, sample time will never
          exceed the interval time.  The first two samples after a
          sample time change may seem to have strange sample times.
          This is normal.

          Note: Monitor has support for AFS, but this only works when
          you have AFS installed.

          AIX systems before version 3.2.4 do not calculate load
          averages. Monitor uses another process to calculate load
          average values in background. This process is started
          automatically first time some user tries to use this monitor
          or any other program which tries to get loadavgvalues with
          supplied getloadavg-subroutine.

          There are two output modes for monitor: on screen or to a
          file. Both can be active at the same time. Normally you use
          the screen output for real-time monitoring or ad hoc
          troubleshooting. The file output mode can be used for
          general performance monitoring and capacity planning.  When
          needed, both can be active at the same time.

     OPTIONS
          Note: all options and option arguments can be abbreviated to
          their first character except for the -smp option (as it
          overloads with -sample).  Options are given in alphabetical
          (ignoring case) order.

          -alternative
               Shows both system events and top cpu processes.  Note
               this will need higher window (eg. Xwindows xterm or
               aixterm).

          -Active_threshold seconds
               To calculate user activity, the terminal is checked on
               last modification date.  Terminals modified longer than
               seconds ago are counted as an inactive user. Default is
               60 seconds.

     Page 2                                          (printed 6/23/01)

     MONITOR(1L)                                           MONITOR(1L)

          -B   Show AFS information when AFS is running. This option
               is mutually exclusive with the -Nfs option. This only
               works if you have AFS, and monitor is compiled with AFS
               enabled.

          -compress [prog]
               When the filename for logmode changes, this option will
               compress the old logfile using prog as pipe. Default
               for prog is /usr/local/bin/gzip.  Note, compression
               only works for root or users in the system group, to
               avoid security leaks.

          -Count count
               Display/log only count screen refreshes/samples (Note:
               this counts samples not intervals!)

          -disk
               Show detailed disk information.

          -Disk [count]
               Sort disk information on read+write rate. When count is
               specified, only that number of disks are shown.

          -Filesys
               Also log non-local filesystem information like NFS and
               AFS. Beware:  This will request information from the
               NFS/AFS after every interval.

          -Highlight [none|reverse|bold|c#|m#|v#]
               Set highlighting mode of headers. Default is set during
               compilation, see monitor -h for your setting. c can be
               used to set a header color if your terminal supports
               color.  m can be used to specify metric name color if
               your terminal supports color.  v can be used to specify
               metric value color if your terminal supports color.
               For color terminals an array is filled with
               foreground/background pairs from which a setting can be
               chosen. If your system supports 8 colors, the first 8
               colors (starting from 0) have backgroundcolor 0, the
               second 8 have backgroundcolor 1 etc.

          -interval time
               Set interval length to time seconds for logmode.
               Default 900 seconds.

     Page 3                                          (printed 6/23/01)

     MONITOR(1L)                                           MONITOR(1L)

          -Interactive
               Enter screen mode. When the -log option is used, the -
               Interactive option is needed to do screen mode
               simultaneously. Otherwise this is default.

          -log logfile
               Switch on log mode. This will dump the measured data on
               interval basis to logfile.  The Logfile can be
               specified as a strftime(3) format string, based on
               start of interval time. The logfile will be
               opened/closed for every dump.  So when time passes, the
               logfilename may change depending on the strftime
               format. (see also -compress option).  Hint: The
               interval record in the logfile contains the weekday
               number with sunday being the first day of the week (day
               0). When logs are created on a weekly basis (I do), use
               %U instead of %W so logfiles are switched every sunday.
               Logmode implies synchronized intervals (see -Sync
               option).  During an interval, several samples will be
               taken (see -sample option). In logging mode, the
               maximum values of the sample data during the interval
               are also written to the logfile.

          -L   Dump samples data to the logfile if logmode is on.

          -net Show detailed network statistics.

          -Nfs Show nfs information when nfs is running. When AFS
               support is available this option is mutually exclusive
               with the -B option.

          -run Show only running processes or show those processes
               which have gained CPU time.

          -Rootinclude
               By default root sessions are ignored in user
               count/activity calculations.  This option will include
               them.

          -sample time
               Set the delay between screen updates to time seconds.
               The default delay is 10 seconds after first initial 1
               to 2 second delay (see also -Sync option). Note:
               smaller sampletimes take more cputime.

     Page 4                                          (printed 6/23/01)

     MONITOR(1L)                                           MONITOR(1L)

          -smp Show symmetric multiprocessing cpu information.

          -Sync
               Synchronise sample and interval time on day boundary.
               This means that when you specify an interval time of 15
               minutes (-i 900), the intervals will end at for 0:00,
               0:15, 0:30, 0:45, 1:00 etc. This option is implied by
               the -log option.

          -top [nproc]
               Shows top cpu processes and shows only summary of
               system variables. If extra parameter is given monitor
               will show that amount of processes.  If display is
               wider than 94 characters, top-display will show how
               user and system time distribute among processes. It
               also shows process status in terms of run sleep etc. In
               fromt of thes status indicator you my find an a
               terminal. Without the 'F' the process is backgrounded.

          -Toplog
               When log mode is on, also log top records to logfile.

          -user
               Show only uid from users. This could make the top
               display faster if your passwd database is not fast
               enough.  (Eg. you have more than 2000 passwd entries
               and you are not using passwd.pag/.dir databases made
               with mkpasswd-command).

     DISPLAY
          In default mode monitor will show the following information

          o    Hostname, date and time between display delay.

          o    Percentage distribution of cpu-load (system, wait, user
               and idle percentages) with graph where '=' means
               system, 'W' means wait, ">" means user and "." means
               idle time.

          o    Runnable processes value/second and load average values
               of 1, 5 and 15 minute times.

          o    Processes waiting to be swapped in.

          o    Both free and total from real and virtual memory, real
               memory is RAM-memory and virtual memory is paging
               space. For real memory the usage is shown for process

     Page 5                                          (printed 6/23/01)

     MONITOR(1L)                                           MONITOR(1L)

               and file pages. In AIX normal file accesses are done
               internally by mapping files to memory and thus memory
               seems to be always used.

          o    Paging information; pagefaults, pages to be paged in
               and out from user space and pages to be paged in and
               out from paging (swap) space, page size in AIX/6000 is
               4 kB.

          o    Various process and system events: process (context)
               switches, system call, read and write -calls, forks and
               execs, three interrupts rcvint, xmtint, mdmint.

          o    File and tty-IO variables; iget, namei and dirblk,
               amount of read and written kbytes, amount of tty-based
               characters handled.

          o    Disk-information, read and written bytes/second and
               amount of busy time.

          o    NFS RPC information of read,write and other access
               calls.

          o    Network (netw) information; amount of read and written
               kB  per second.

          When using -top option top lines will show:

          o    Hostname, load average values of 1, 5 and 15 minutes
               and date.

          o    Percentage distribution of cpu states (user, system,
               wait and idle time).

          o    For real and virtual memory the amount used, free and
               total memory.

          Following lines will show values of the top cpu time
          processes sorted by current cpu-usage as first sortkey and
          by second key the total amount cputime used.

          The display of processes is similar to ps(1). PID is the
          process id. USER is the username of the process owner.  PRI
          is the current priority of the process. NICE is the nice
          value for the process in the range -20 to 20 (note for
          kernel-processes the nice value is 21 which means that the
          process has fixed-priority and the nice value doesn't have
          any meaning). SIZE is the amount virtual memory used. RES is
          the amount of real memory used. STAT is the status of the
          process, a "F" in front of the STAT value indicates a
          foreground job. TIME is the amount of cputime used. When
          your screen is wide enough, the cputime is split in

     Page 6                                          (printed 6/23/01)

     MONITOR(1L)                                           MONITOR(1L)

          USER/SYSTIME: User mode processing and kernel mode
          processing. CPU% comes in two parts. The left part indicates
          the cputime distribution withing the interval and the right
          part is the cpu usage since startup of that process. COMMAND
          is the short-name of the process command. If process was
          kernel process "Kernel" is added to process name.

          Monitor -top will display both Kernel and user processes in
          process list. Kernel processes are displayed like which
          consumes all idle CPU cycles. See FAQ list for more types of
          kernel processes.

          On wider screens (more than 94 columns) the top display
          shows the user and system time distribution for each
          process.

     SECURITY
          To allow any user to run monitor it has to be setuid root or
          setgid system.  This is needed to access kernel information.
          As soon as the access pattern for this data is setup, root
          and system permissions are given up (this happens within the
          first few milliseconds).  Only after giving up, logfiles may
          be opened and the compress program may be run. As a
          consequence, logfiles can only be created where the real
          user has permissions and  ownership will be set to the real
          user!

     VERSION
          This manual page is for monitor version 2.1.5.

     AUTHOR
          Marcel Mol, MESA Consulting, The Netherlands
          Email: marcel@mesa.nl
          URL: http://www.mesa.nl/~marcel
          http://www.mesa.nl/pub/monitor
          ftp://ftp.mesa.nl/pub/monitor
          Jussi Maki, Center for Scientific Computing, Finland
          Email: jmaki@csc.fi
          URL: http://www.csc.fi/~jmaki

     SEE ALSO
          vmstat(1), ps(1), sar(1), iostat(1), nfsstat(1)

     Page 7                                          (printed 6/23/01)