.\" .\" Manual page for ompsinfo. .\" .\" This file has been written by Moreno 'baro' Baricevic .\" freely "inspired" by 'ps' and 'mps' manpages (and a lot more). .\" .\" It may be distributed under the GNU Public License, version 2, or .\" any higher version. See section COPYING of the GNU Public license .\" for conditions under which this file may be redistributed. .\" .\" =========================================================================== .TH OMPSINFO 1 "November 30, 2003" "openMosix" "openMosix tools User's Manual" .\" =========================================================================== . . .\" =========================================================================== .SH NAME .\" =========================================================================== . .B ompsinfo - report openMosix related process status . . .\" =========================================================================== .SH SYNOPSIS .\" =========================================================================== . .B ompsinfo .RI [ options ] .BI ompsinfo " " .B ompsinfo [ \fB-C\fR \fI\fR | \fB-p\fR \fI\fR | \fI\fR ] [ \fB-u\fR \fI\fR | \fB-A\fR ] [ \fB-U\fR ] [ \fB-N\fR ] [ \fB-l\fR | \fB-o\fR pid= ] [ \fB-a\fR \fIINFO1,INFO2,...\fR ] [ \fB-h\fR | \fB-H\fR ] . . .\" =========================================================================== .SH DESCRIPTION .\" =========================================================================== . \fBompsinfo\fR gives a snapshot of the current processes. Displayed informations come from openMosix related proc files like \fIwhere\fR, \fInmigs\fR, \fIlock\fR, \fIcantmove\fR (and, obviously, some informations from \fIstat\fR). \fIcwd\fR and \fI/proc/mounts\fR are used (when "\fB-a\fR mfs" is given) in order to check if a job is running on the openMosix filesystem mount point (EXPERIMENTAL). . . .\" =========================================================================== .SH OPTIONS .\" =========================================================================== . The original version of \fBompsinfo\fR was based on minimal version of \fBps\fR. Where possible, this program mantains the compatibility with \fBps\fR 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 (\fBadd\fR, \fBhelp\fR, \fBusage\fR, \fBversion\fR). Options of different types may be freely mixed. .\" - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - PROCESS SELECTION BY LIST .PD 0 .TP 20 .B -A select all users and processes (adds USER header to format) .TP .BI -C " " select by command name .TP .BI -p " " select by PID .TP .BI -u " " select by username .P .\" - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - SWITCH .PD 0 .TP 20 .B -U use effective user ID (default is real user ID) .PP .\" - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - SELECTION WEIRD MODIFIERS (on composed selections the output may be not what you expect, see \fB'N' truth table\fR section) .PD 0 .TP 20 .B -N negate "composed" selection .TP .BI -NC " " negate command selection (not UX98, not the same of "-N -C") .TP .BI -Nu " " negate user selection (not UX98, not the same of "-N -u") .PP .\" - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - OUTPUT FORMAT CONTROL .PD 0 .TP 20 .B -l long format .TP .BI -o " " user-defined format (limited support, accepts only "pid="). Here for compatibility reasons. .TP .BI -a|--add " INFO,..." add info to output format ('\fB-a\fR help' to see a short list of allowed arguments). See \fB'ADD' OUTPUT\fR section. .PP .\" - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - OUTPUT MODIFIERS .PD 0 .TP 20 .B -h no header .TP .B -H one header per page .PP .\" - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - INFORMATION .PD 0 .TP 20 .B -V,--version display program version .TP .B --help display this message .TP .B --usage display short usage message .PP . .\" =========================================================================== .SH HEADERS .\" =========================================================================== . .PD 0 .TP 10 .B default .I "CMD PID NODE NMIGS LOCK CANTMOVE" .TP .B -p .I "CMD NODE NMIGS LOCK CANTMOVE" (no PID, PID is argument) .TP .B -C .I "PID NODE NMIGS LOCK CANTMOVE" (no CMD, CMD is argument) .TP .B -l .I "USER PID PPID PRI NI S NODE NMIGS LOCK CNTM TIME COMMAND" (long, CANTMOVE as FLAG: '1'|'0') .TP .B -A \fIUSER\fR will be added to output format (unless already present or \fB-o\fR specified) .TP .B -N* \fIUSER\fR and \fICMD\fR .\" \fIPID\fR (not implemented) will be added to output format (unless already present or \fB-o\fR specified) .TP .B -a\fR mfs \fIMFS\fR will be added to output format .PP . .\" =========================================================================== .SH \'ADD\' OUTPUT .\" =========================================================================== . ARGUMENTS: .RS 4 .BR U ser, .BR CM d, .BR PI d, .BR PP id, .BR PR iority, .BR NI ce, .BR S tat, .RB "(" NO de| W "here)," .BR NM igs, .RB "(" O mfs| M "fs)," .BR L ock, .RB "(" CANTF lag| CN "tm)," .BR CANTM ove, .BR T ime, .BR CO mmand .RE Use at least the upper case letters reported above, only those letters are parsed. String is not case sensitive. DELIMITER is "\fB,\fR" (comma). Valid strings can be "\fIuser,cmd,pid\fR", "\fIu,cm,pi\fR", "\fIUS,cM,Pi\fR". Order has no influence, the labels will be displayed in the same order reported above. "\fInode\fR" and "\fIwhere\fR" are equivalent. "\fIcmd\fR" and "\fIcommand\fR" report the same information but on different position. Note that with "\fItime\fR" or "\fIcommand\fR", "\fIcantmove\fR" can mess up these columns, use "\fIcantflag\fR" instead. .TP 5 .RB ' - ' remove following info (\fB--add\fR "user,\fB-\fRcmd,\fB-\fRpid,command"). .TP .RB ' = ' as first character set the header exactly as defined by your argument (\fB--add\fR "\fB=\fRuser,cmd,pid"). .PP "\fImfs\fR" reports if the \fBcwd\fR of the process match the \fBoMFS\fR mount point. Is only added by explicit user's request (\fB-a\fR mfs). Response flag may be: .RS 4 .TP 5 - oMFS not mounted (or some error condition while reading \fI/proc/mounts\fR) .TP / local filesystem (not on oMFS) .TP .I # oMFS node number, the job is running on the oMFS mount point path (CWD=/mfs/\fI#\fR/...) .TP = the process is running exactly with CWD = oMFS_mount_point (CWD=/mfs) .TP ? error on readlink() (cwd owned by zombie?) .TP ?? the process is running on oMFS mount point but not on a oMFS node (CWD=/mfs/[^0-9]*, not /mfs/#...) .RE . .\" =========================================================================== .SH NOTES .\" =========================================================================== . If no "selection" option is given (\fB-A\fR,\fB-u\fR,\fB-C\fR,\fB-p\fR,\fB-N?\fR), owner uid is used for selection. The \fB\-h\fR option totally disable the header. The \fB\-H\fR option prints the header on each "page" of output. The number of lines is acquired from tty and \fBLINES\fR environment variable, otherwise standard 80x24 size is assumed. See \fBENVIRONMENT VARIABLES\fR section. Options \fB\-C\fR and \fB\-p\fR, \fB\-A\fR and \fB\-u\fR, \fB\-l\fR and \fB\-o\fR, \fB\-h\fR and \fB\-H\fR are mutually exclusives. Options accept only one argument (one PID, one username, one command, ...). \fIPRI\fR assumes 60 as base priority (long format output or "\fB-a\fR pri"). "\fB-o\fR pid=" implies \fB-h\fR \fI\fR implies \fB-p\fR \fB-N\fR need at least \fB-C\fR or \fB-u\fR \fB-\fR\fIX\fR and \fB-N\fR\fIX\fR are mutually exclusives. Compose \fB-N*\fR options at your own risk! %-) . .\" =========================================================================== .SH EXAMPLES .\" =========================================================================== . To see your processes on the system (short output): \fBompsinfo\fR .P To see every process on the system (short output): \fBompsinfo\fR \fB\-A\fR .P To see every process on the system (long output): \fBompsinfo\fR \fB\-A\fR \fB\-l\fR .P To see every process running as root (real ID) \fBompsinfo\fR \fB\-u\fR root .P To see every process running as root (effective ID) \fBompsinfo\fR \fB\-u\fR root \fB\-U\fR .P To see every process named "foo" (long format, reporting effective ID) \fBompsinfo\fR \fB\-C\fR \fIfoo\fR \fB\-l\fR \fB\-U\fR .P To see every process named "foo" and owned by (real) user "bar" \fBompsinfo\fR \fB\-C\fR \fIfoo\fR \fB\-u\fR \fIbar\fR .P To see every process but NOT processes owned by root (real ID) \fBompsinfo\fR \fB\-Nu\fR root .P To see every process but NOT processes owned by root and NOT processes named "command" (real ID) \fBompsinfo\fR \fB\-Nu\fR root \fB\-NC\fR \fIcommand\fR .P To see every process but NOT processes named "command" owned by root (real ID) \fBompsinfo\fR \fB\-u\fR root \fB\-C\fR \fIcommand\fR \fB\-N\fR .P Print only the process IDs of syslogd: \fBompsinfo\fR \fB\-C\fR syslogd \fB\-o\fR pid= .P Print only info about process with pid 1 (init), long format: \fBompsinfo\fR \fB\-p\fR 1 \fB\-l\fR .P Add \fBuser\fR info to the output format: \fBompsinfo\fR \fB\-a\fR user .P Change the output format to user-defined one: \fBompsinfo\fR \fB\-a\fR =user,pid,nmigs,command .P Add \fBppid\fR, remove \fBlock\fR, add \fBcantf\fR (cantmove as flag): \fBompsinfo\fR \fB\-a\fR ppid,-lock,cantf .P openMosix infos about all processes (reporting (o)MFS flag) \fBompsinfo\fR \fB\-A\fR \fB\-a\fR mfs .P Help message \fBompsinfo\fR \fB\-\-help\fR .P Short usage message (displayed also on usage errors) \fBompsinfo\fR \fB\-\-usage\fR . .\" =========================================================================== .SH 'N' TRUTH TABLE .\" =========================================================================== . .TP 31 u \fB|\fR u \fIuser\fR's processes .TP Nu \fB|\fR !u every process but NOT \fIuser\fR's processes, implies \fB-A\fR .TP C \fB|\fR C every process named \fIcommand\fR, implies \fB-A\fR .TP NC \fB|\fR !C every process but NOT processes named \fIcommand\fR, implies \fB-A\fR .TP u C \fB|\fR u&C every process named \fIcommand\fR owned by \fIuser\fR .TP Nu C \fB|\fR (!u)&C every process named \fIcommand\fR but NOT owned by \fIuser\fR, implies \fB-A\fR .TP u NC \fB|\fR u&(!C) every process owned by \fIuser\fR but NOT processes named \fIcommand\fR .TP Nu NC \fB|\fR (!u)&(!C) = !(u|C) every process but NOT processes owned by \fIuser\fR and NOT processes named \fIcommand\fR, implies \fB-A\fR .TP .B --------+--------------------- .TP u N \fB|\fR !u NOT \fIuser\fR's processes, implies \fB-A\fR (eq. \fB-Nu\fR) .TP Nu N \fB|\fR !(!u) = u \fIuser\fR's processes (eq. \fB-u\fR) .TP C N \fB|\fR !C every process but NOT processes named \fIcommand\fR, implies \fB-A\fR (eq. \fB-NC\fR) .TP NC N \fB|\fR !(!C) = C every process named \fIcommand\fR, implies \fB-A\fR (eq. \fB-C\fR) .TP u C N \fB|\fR !(u&C) = (!u)|(!C) every process but NOT (processes named \fIcommand\fR owned by \fIuser\fR), implies \fB-A\fR .TP Nu C N \fB|\fR !((!u)&C) = u|(!C) every process but NOT processes named \fIcommand\fR unless owned by \fIuser\fR, implies \fB-A\fR .TP u NC N \fB|\fR !(u&(!C)) = (!u)|C every process but NOT \fIuser\fR's processes unless named \fIcommand\fR, implies \fB-A\fR .TP Nu NC N \fB|\fR !((!u)&(!C)) = u|C every process owned by \fIuser\fR or named \fIcommand\fR .PP Take a look at http://www.democritos.it/~baro/sw/ompsinfo/doc/ . .\" =========================================================================== .SH FILES .\" =========================================================================== . .PD 0 .TP 22 .I /proc location of the proc file system .TP .I /proc/hpc location of the openMosix proc interface .TP .I /proc//stat status information about the process .TP .I /proc//where where the process is currently being computed .TP .I /proc//nmigs how many times the process migrated .TP .I /proc//lock if a process is locked to its home node .TP .I /proc//cantmove reason why a process cannot be migrated .TP .I /proc//cwd symlink to the current working directory of the process .TP .I /proc/mounts shows mounted filesystems [device mpoint fstype options flags...] .PP . .\" =========================================================================== .SH ENVIRONMENT VARIABLES .\" =========================================================================== . When \fB-H\fR options is given, \fBompsinfo\fR's behaviour is affected by \fBLINES\fR environment variable. .P You can use something like "\fBLINES=20 ompsinfo -H ...\fR" in order to force \fBompsinfo\fR to evaluate a different \fBLINES\fR value. . .\" =========================================================================== .SH 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. . .\" =========================================================================== .SH BUGS .\" =========================================================================== . Sorry for my awful english, feel free to correct any kind of error you may find. Please send bug reports, suggestions, insults, to or . . .\" =========================================================================== .SH VERSIONS & HISTORY .\" =========================================================================== . The first version of \fBompsinfo\fR was a bash script. It works well but sometimes slow (obviously). The first C version, v1.0.1, was based on \fBminimal.c\fR. As the author, Albert Cahalan, comments about \fBminimal.c\fR: "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 \fBps\fR style options the program was heavily modified, almost rewritten. Version 1.1.0 is the first stable release available in the \fBopenMosix-userland-tools\fR package. It is a bit heavier than the 1.0.1 version, but much more flexible. However you can find all versions on the cvs tree of the tools (http://cvs.sourceforge.net/viewcvs.py/openmosix/userspace-tools) or on my homepage (http://www.democritos.it/~baro/sw/ompsinfo). . .\" =========================================================================== .SH AUTHOR & (UN)RESTRICTIONS .\" =========================================================================== . \fBompsinfo\fR was hacked by Moreno 'baro' Baricevic . .P The "minimal" \fBps\fR (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.sourceforge.net). .P \fBompsinfo\fR, its source (\fBompsinfo.c\fR) and this manpage (\fBompsinfo.1\fR) are distributed under the terms of the GNU GPL. . .\" =========================================================================== .SH SEE ALSO .\" =========================================================================== . .BR openmosix (1), .BR mps (1), .BR mtop (1), .BR ps (1), .BR top (1), .BR pstree (1), .BR proc (5). .\" EOF