OMPSINFO(1)       openMosix tools User's Manual       OMPSINFO(1)  >>

NAME

       ompsinfo - report openMosix related process status


SYNOPSIS

       ompsinfo [options]

       ompsinfo <PID>

       ompsinfo  [  -C  <COMMAND_NAME>  | -p <PID> | <PID> ] [ -u
       <USERNAME> | -A ] [ -U ] [ -N ] [ -l |  -o  pid=  ]  [  -a
       INFO1,INFO2,... ] [ -h | -H ]


DESCRIPTION

       ompsinfo  gives a snapshot of the current processes.  Dis-
       played informations come from openMosix related proc files
       like  where,  nmigs,  lock, cantmove (and, obviously, some
       informations from stat).

       cwd and /proc/mounts are used (when "-a mfs" is given)  in
       order  to  check  if  a  job  is  running on the openMosix
       filesystem mount point (EXPERIMENTAL).


OPTIONS

       The original version of ompsinfo was based on minimal ver-
       sion of ps. Where possible, this program mantains the com-
       patibility with ps Unix98 options.

       Unix options can be grouped (I discourage it) and must  be
       preceeded  by  a  dash,  option  and  argument  cannot  be
       grouped.  BSD options are not  supported.   Few  GNU  long
       options are supported (add, help, usage, version).

       Options of different types may be freely mixed.

       PROCESS SELECTION BY LIST
       -A                  select  all  users and processes (adds
                           USER header to format)
       -C <COMMAND_NAME>   select by command name
       -p <PID>            select by PID
       -u <USERNAME>       select by username

       SWITCH
       -U                  use effective user ID (default is real
                           user ID)

       SELECTION WEIRD MODIFIERS (on composed selections the out-
       put may be not what you expect, see 'N' truth  table  sec-
       tion)
       -N                  negate "composed" selection
       -NC <COMMAND_NAME>  negate  command  selection  (not UX98,
                           not the same of "-N -C")
       -Nu <USERNAME>      negate user  selection     (not  UX98,
                           not the same of "-N -u")

       OUTPUT FORMAT CONTROL
       -l                  long format
       -o <FORMAT>         user-defined  format (limited support,
                           accepts only "pid="). Here for compat-
                           ibility reasons.
       -a|--add INFO,...   add  info  to output format ('-a help'
                           to see a short list of  allowed  argu-
                           ments). See 'ADD' OUTPUT section.

       OUTPUT MODIFIERS
       -h                  no header
       -H                  one header per page

       INFORMATION
       -V,--version        display program version
       --help              display this message
       --usage             display short usage message


HEADERS

       default   CMD PID NODE NMIGS LOCK CANTMOVE
       -p        CMD  NODE  NMIGS  LOCK  CANTMOVE (no PID, PID is
                 argument)
       -C        PID NODE NMIGS LOCK CANTMOVE  (no  CMD,  CMD  is
                 argument)
       -l        USER PID PPID PRI NI S NODE NMIGS LOCK CNTM TIME
                 COMMAND (long, CANTMOVE as FLAG: '1'|'0')
       -A        USER will be  added  to  output  format  (unless
                 already present or -o specified)
       -N*       USER  and  CMD  will  be  added to output format
                 (unless already present or -o specified)
       -a mfs    MFS will be added to output format


'ADD' OUTPUT

       ARGUMENTS:
           User,  CMd,   PId,   PPid,   PRiority,   NIce,   Stat,
           (NOde|Where),    NMigs,   (Omfs|Mfs),   Lock,   (CANT-
           Flag|CNtm), CANTMove, Time, COmmand

       Use at least the upper case letters reported  above,  only
       those letters are parsed. String is not case sensitive.

       DELIMITER is "," (comma).

       Valid    strings   can   be   "user,cmd,pid",   "u,cm,pi",
       "US,cM,Pi".  Order has no influence, the  labels  will  be
       displayed in the same order reported above.

       "node" and "where" are equivalent.

       "cmd"  and  "command"  report  the same information but on
       different position.

       Note that with "time" or "command", "cantmove" can mess up
       these columns, use "cantflag" instead.

       '-'  remove  following  info  (--add  "user,-cmd,-pid,com-
            mand").

       '='  as first character set the header exactly as  defined
            by your argument (--add "=user,cmd,pid").

       "mfs"  reports  if  the  cwd of the process match the oMFS
       mount point. Is only added by explicit user's request  (-a
       mfs).  Response flag may be:
           -    oMFS  not  mounted (or some error condition while
                reading /proc/mounts)
           /    local filesystem (not on oMFS)
           #    oMFS node number, the job is running on the  oMFS
                mount point path (CWD=/mfs/#/...)
           =    the   process  is  running  exactly  with  CWD  =
                oMFS_mount_point (CWD=/mfs)
           ?    error on readlink() (cwd owned by zombie?)
           ??   the process is running on oMFS  mount  point  but
                not   on   a  oMFS  node  (CWD=/mfs/[^0-9]*,  not
                /mfs/#...)


NOTES

       If no "selection" option is given (-A,-u,-C,-p,-N?), owner
       uid is used for selection.

       The -h option totally disable the header.

       The  -H option prints the header on each "page" of output.
       The number of lines is acquired from tty and  LINES  envi-
       ronment   variable,   otherwise  standard  80x24  size  is
       assumed. See ENVIRONMENT VARIABLES section.

       Options -C and -p, -A and -u, -l and -o,  -h  and  -H  are
       mutually exclusives.

       Options  accept  only one argument (one PID, one username,
       one command, ...).

       PRI assumes 60 as base priority (long format output or "-a
       pri").

       "-o pid=" implies -h

       <PID> implies -p

       -N need at least -C or -u

       -X and -NX are mutually exclusives.

       Compose -N* options at your own risk!  %-)


EXAMPLES

       To see your processes on the system (short output):
           ompsinfo
       To see every process on the system (short output):
           ompsinfo -A
       To see every process on the system (long output):
           ompsinfo -A -l
       To see every process running as root (real ID)
           ompsinfo -u root
       To see every process running as root (effective ID)
           ompsinfo -u root -U
       To  see  every process named "foo" (long format, reporting
       effective ID)
           ompsinfo -C foo -l -U
       To see every process named "foo" and owned by (real)  user
       "bar"
           ompsinfo -C foo -u bar
       To see every process but NOT processes owned by root (real
       ID)
           ompsinfo -Nu root
       To see every process but NOT processes owned by  root  and
       NOT processes named "command" (real ID)
           ompsinfo -Nu root -NC command
       To  see  every  process  but NOT processes named "command"
       owned by root (real ID)
           ompsinfo -u root -C command -N
       Print only the process IDs of syslogd:
           ompsinfo -C syslogd -o pid=
       Print only info about process with pid 1 (init), long for-
       mat:
           ompsinfo -p 1 -l
       Add user info to the output format:
           ompsinfo -a user
       Change the output format to user-defined one:
           ompsinfo -a =user,pid,nmigs,command
       Add ppid, remove lock, add cantf (cantmove as flag):
           ompsinfo -a ppid,-lock,cantf
       openMosix  infos  about  all  processes  (reporting (o)MFS
       flag)
           ompsinfo -A -a mfs
       Help message
           ompsinfo --help
       Short usage message (displayed also on usage errors)
           ompsinfo --usage


'N' TRUTH TABLE

        u      |  u                   user's processes
       Nu      | !u                   every   process   but   NOT
                                      user's  processes,  implies
                                      -A
           C   |  C                   every  process  named  com-
                                      mand, implies -A
          NC   | !C                   every  process but NOT pro-
                                      cesses    named    command,
                                      implies -A
        u  C   | u&C                  every process named command
                                      owned by user
       Nu  C   | (!u)&C               every process named command
                                      but   NOT  owned  by  user,
                                      implies -A
        u NC   | u&(!C)               every process owned by user
                                      but   NOT  processes  named
                                      command
       Nu NC   | (!u)&(!C) = !(u|C)   every process but NOT  pro-
                                      cesses  owned  by  user and
                                      NOT  processes  named  com-
                                      mand, implies -A
       --------+---------------------
        u    N | !u                   NOT    user's    processes,
                                      implies -A (eq. -Nu)
       Nu    N | !(!u) = u            user's processes (eq. -u)
           C N | !C                   every process but NOT  pro-
                                      cesses    named    command,
                                      implies -A (eq. -NC)
          NC N | !(!C) = C            every  process  named  com-
                                      mand, implies -A (eq. -C)
        u  C N | !(u&C) = (!u)|(!C)   every process but NOT (pro-
                                      cesses named command  owned
                                      by user), implies -A
       Nu  C N | !((!u)&C) = u|(!C)   every  process but NOT pro-
                                      cesses named command unless
                                      owned by user, implies -A
        u NC N | !(u&(!C)) = (!u)|C   every   process   but   NOT
                                      user's   processes   unless
                                      named command, implies -A
       Nu NC N | !((!u)&(!C)) = u|C   every process owned by user
                                      or named command

       Take        a        look        at        http://www.dem-
       ocritos.it/~baro/sw/ompsinfo/doc/


FILES

       /proc                 location of the proc file system
       /proc/hpc             location   of   the  openMosix  proc
                             interface
       /proc/<PID>/stat      status information about the process
       /proc/<PID>/where     where the process is currently being
                             computed
       /proc/<PID>/nmigs     how many times the process migrated
       /proc/<PID>/lock      if a process is locked to  its  home
                             node
       /proc/<PID>/cantmove  reason   why  a  process  cannot  be
                             migrated
       /proc/<PID>/cwd       symlink  to  the   current   working
                             directory of the process
       /proc/mounts          shows  mounted  filesystems  [device
                             mpoint fstype options flags...]


ENVIRONMENT VARIABLES

       When -H options is given, ompsinfo's behaviour is affected
       by LINES environment variable.
       You  can  use something like "LINES=20 ompsinfo -H ..." in
       order to force ompsinfo  to  evaluate  a  different  LINES
       value.


DIAGNOSTICS

       On success, exit status is zero (EXIT_SUCCESS).  On error,
       1 is returned (EXIT_FAILURE).  Usage  function  returns  a
       short line describing the error occurred.


BUGS

       Sorry  for my awful english, feel free to correct any kind
       of error you may find.

       Please  send  bug  reports,   suggestions,   insults,   to
       <baro@democritos.it> or <mirko@mcaserta.com>.


VERSIONS & HISTORY

       The  first version of ompsinfo was a bash script. It works
       well but sometimes slow (obviously).  The first C version,
       v1.0.1,  was  based  on  minimal.c.  As the author, Albert
       Cahalan, comments about minimal.c:

            "This is a minimal ps designed to be smaller than the
       old  ps  while still supporting some of the more important
       features of the new ps. (for total size, note that this ps
       does  not  need  libproc)  It  is suitable for Linux-on-a-
       floppy systems only."

       It was really fast  and  simple,  but  did  not  offers  a
       friendly  and  configurable "interface". While adding some
       ps style options the program was heavily modified,  almost
       rewritten.   Version  1.1.0  is  the  first stable release
       available in the openMosix-userland-tools package.  It  is
       a bit heavier than the 1.0.1 version, but much more flexi-
       ble.  However you can find all versions on the cvs tree of
       the   tools   (http://cvs.sourceforge.net/viewcvs.py/open-
       mosix/userspace-tools) or on my homepage  (http://www.dem-
       ocritos.it/~baro/sw/ompsinfo).


AUTHOR & (UN)RESTRICTIONS

       ompsinfo  was hacked by Moreno 'baro' Baricevic <baro@dem-
       ocritos.it>.
       The "minimal" ps (on which  this  program  was  based)  is
       copyright by Albert Cahalan, distributed under GPL and was
       taken from  procps-3.1.13  package  (http://procps.source-
       forge.net).
       ompsinfo,   its   source  (ompsinfo.c)  and  this  manpage
       (ompsinfo.1) are distributed under the terms  of  the  GNU
       GPL.


SEE ALSO

       openmosix(1),  mps(1),  mtop(1), ps(1), top(1), pstree(1),
       proc(5).




openMosix               November 30, 2003             OMPSINFO(1)  >>