Use this command to display information about current processes, or entry
control blocks (ECBs), in the system that were created by a
tpf_fork function call.
Requirements and Restrictions
- The parameters for this command are case-sensitive. You
must enter the parameters exactly as shown in the syntax
diagram.
- You can enter this command only in CRAS state or higher.
Format
- -f
- displays information about the ECBs using the full-listing format.
The full-listing format includes the PID, PPID,
PROG, STIME, TIME, and USER column
headers. See Table 10 for a description and summary of fields the ZFILE ps command
supports.
- -l
- displays information about the ECBs using the long-listing format.
The long-listing format includes the ADDR, PID,
PPID, PROG, TIME, USER, and
VSZ column headers. See Table 10 for a description and summary of fields the ZFILE ps
command supports.
- -G realgrouplist
- displays information for specified ECBs, where realgrouplist is
the list of real group identifiers (GIDs) for the ECBs you want information
about. If more than one GID is specified, they are separated with
commas and the ZFILE ps command will connect them using a logical OR
statement.
- -o
- customizes the display based on what information you want to know about
the ECBs.
- field
- is the name of the field to display, where field is any of the
field names supported by the ZFILE ps command. See Table 10 for a list of these names and a description of the
information that field name will display. The table also includes
information about default column headers and alias names of the
display.
- field=
- indicates that there will be no column header for the field name specified
in the field parameter. If all of the field names are
specified with an equal sign (=), the column header line is omitted
completely. See Table 10 for default column header information.
- field=heading
- indicates that for the field name specified in field, the column
header will be what is specified in heading rather than the
default. See Table 10 for default column header information.
- -p proclist
- displays information for specified ECBs, where proclist is the
list of process identifier (process ID) numbers for the ECBs you want
information about. If more than one process ID is specified, they are
separated with commas and the ZFILE ps command will connect them using a
logical OR statement.
- -P programlist
- displays information for specified ECBs, where programlist is the
list of 1- to 4-character program names for the ECBs you want information
about. For example, ZFILE ps -P cfj will find all ECBs that
have a program name that begins with cfj. This parameter is
TPF-specific. If more than one program name is specified, they are
separated with commas and the ZFILE ps command will connect them using a
logical OR statement.
- -t termlist
- displays information for specified ECBs, where termlist is the
list of 3-byte hexadecimal terminal addresses for the ECBs you want
information about. If more than one terminal address is specified, they
are separated with commas and the ZFILE ps command will connect them using a
logical OR statement.
- -u effectiveuserlist
- displays information for specified ECBs, where effectiveuserlist
is the list of effective user identifiers (UIDs) for the ECBs you want
information about. If more than one UID is specified, they are
separated with commas and the ZFILE ps command will connect them using a
logical OR statement.
- -U realuserlist
- displays information for specified ECBs, where realuserlist is
the list of real user identifiers (UIDs) for the ECBs you want information
about. If more than one UID is specified, they are separated with
commas and the ZFILE ps command will connect them using a logical OR
statement.
- -L
- displays a list of valid field names for the -o field
parameter. Each field name is shown on a separate line and is followed
by valid alias names in parentheses (()). You can also refer to Table 10 for the list of field names and their alias names.
Additional Information
- Online help information is available for this command. To display
the help information, enter one of the following:
ZFILE HELP ps
ZFILE HELP
ZFILE ?
In addition, the correct command syntax is displayed if you enter the syntax
incorrectly.
- Only processes created by a tpf_fork function and parent
processes with active child processes are displayed.
- When entered without any parameters specified, the ZFILE ps command
displays a listing of all current ECBs in the default format, which includes
the PID, PROG, ELAPSED and TIME
headers. See Table 10 for a summary of fields the ZFILE ps command
supports.
- Only processes on the current central processing unit (CPU) are
displayed.
- Process information is highly volatile and can change while the ZFILE ps
command is running. The display may be out-of-date by the time it is
shown.
- Items specified in -o field, -o field=, -o
field=heading, -G realgrouplist, -p
proclist, -P programlist, -t termlist, -u
effectiveuserlist, and -U realuserlist can be separated by a
comma or a blank. If blanks are used, the list of items must be
enclosed in single quotation marks (' ') or double quotation marks
(").
- If you specify more than one parameter, you can specify these parameters
separately or together. For example, you can enter one of the
following:
- ZFILE ps -f -o field
- ZFILE ps -fo field
- The following table summarizes the supported display fields for the ZFILE
ps command:
Table 10. Summary of Supported Display Fields for the ZFILE ps Command
Field Name
| Default Header
| Alias Names
| Options
| Description
|
addr
| ADDR
| sva
| -l
| The system virtual address (SVA) of the ECB.
|
etime
| ELAPSED
| elapsed
| default
| The elapsed time in
[dd-]hh:mm:ss
format.
|
group
| GROUP
| gname
|
| The effective group identifier (GID). The decimal GID number is
displayed if the group name is unavailable.
|
pgid
| PGID
|
|
| The parent group identifier in decimal format.
|
pid
| PID
|
| default, -f, -l
| The process identifier in decimal format.
|
ppid
| PPID
|
| -f, -l
| The parent process identifier in decimal format.
|
prog
| PROG
| pgm
| default, -f, -l
| The 4-character program name.
|
rgroup
| RGROUP
|
|
| The real group identifier. The decimal group identifier number
(GID) is displayed if the group name is unavailable.
|
ruser
| RUSER
| runame
|
| The real user identifier. The decimal user identifier number (UID)
is displayed if the user name is unavailable.
|
stime
| STIME
| start, started
| -f
| The starting time of the process in [Mmm dd
]hh:mm:ss format.
|
time
| TIME
| cputime
| default, -f, -l
| The cumulative run time for the process in
[dd-]hh:mm:ss
format.
|
tty
| TT
| lniata, longtname, tname, tt
|
| The 3-byte hexadecimal terminal address.
|
user
| USER
| uname
| -f, -l
| The effective user identifier. The decimal user identifier number
(UID) is displayed if the user name is unavailable.
|
vsz
| VSZ
| memory, vsize
| -l
| The amount of virtual memory used for heap, stack storage, and TPF blocks
combined, displayed as a decimal number in kilobytes (KB).
|
- You can use a vertical bar, or pipe (|), to direct data so the output from
one process becomes the input to another process. This type of one-way
communication allows you to combine ZFILE commands on one line to create a
pipeline. For example, the following pipeline uses the standard output
(stdout) stream from the ZFILE ls command and redirects it to the
standard input (stdin) stream of the ZFILE grep command to search
for those lines containing the word Jan.
ZFILE ls -l | grep Jan
The result is filtered output from the ZFILE ls command displaying only
the lines containing the word Jan in any position.
You can use pipes only with a combination of ZFILE commands where the
command on the left-hand side of the pipe provides data through
stdout and the right-hand side accepts data through
stdin.
- This command does not read from the standard input (stdin)
stream.
You can redirect the standard output (stdout) stream from the
display terminal to a file by specifying one of the redirection characters
(> or >>) followed by the file name to which you want
the output written. The > character writes the output to a
file. The >> character appends the output to an existing
file.
You can redirect the standard error (stderr) stream from the
display terminal to a file by specifying one of the redirection characters
(2> or 2>>) followed by the file name to which you want
the error output written. The 2> character writes the error
output to a file. The 2>> character appends the error output
to an existing file.
- Note:
- When you use the > or 2> character, if the file that
you are redirecting data to already exists, the file is overwritten and any
data in that file is lost. If you do not want to overwrite the file,
ensure that you use the >> or 2>> character.
- The ZFILE ps command is based on a subset of the ps utility of the
Portable Operating System Interface for Computer Environments (POSIX)
standards.
- This command supports the following three quoting mechanisms, which allow
you to override the special meaning of some characters:
- escape character (\)
- preserves the literal value of the character that follows. To
ignore the special meaning of a character, escape it by placing a backslash
(\) in front of it. In the example that follows, environment
variable PATH is /bin:/usr/bin:., the first
dollar sign ($) is escaped because of the preceding backslash, and the
second dollar sign takes on a special meaning.
User: ZFILE echo \$PATH is $PATH
System: $PATH is /bin:/usr/bin:.
- single quotation marks (' ')
- preserves the literal value of all characters between the opening single
quotation mark and the closing single quotation mark. For example,
entering ZFILE echo '*' displays an asterisk
character (*). Without the single quotation marks, the files
in the current working directory are displayed.
- double quotation marks (" ")
- preserves the literal value of all characters between the opening double
quotation mark and the closing double quotation mark except the dollar sign
($), the backquote (`), and the backslash (\).
This allows you to use the escape character inside double quotation marks,
which you cannot do in single quotation marks.
For example, entering ZFILE echo "\$PATH is \"$PATH\""
displays $PATH is "/bin:/usr/bin:."
If you want to use the literal meaning of any of the following
characters, you must always use a quoting mechanism:
left angle bracket (<)
| right angle bracket (>)
| ampersand (&)
|
backquote (`)
| backslash (\)
| dollar sign ($)
|
double quotation mark (")
| new-line (\n)
| left parenthesis ( ( )
|
right parenthesis ( ) )
| semicolon (;)
| single quotation mark (')
|
blank space
| tab
| vertical bar (|)
|
In addition, use a quoting mechanism when any of the following characters are
used in a way that takes on a special meaning but you want to use the literal
meaning:
asterisk (*)
| equal sign (=)
| left square bracket ( [ )
|
number sign (#)
| question mark (?)
| tilde (~)
|
Examples
The following example shows the default display format.
+--------------------------------------------------------------------------------+
|User: zfile ps |
| |
|System: FILE0001I 19.03.30 START OF DISPLAY FROM ps |
| PID PROG ELAPSED TIME |
| 1077215431 CFJP 00:00:00 00:00:00 |
| 1077215446 CFIM 00:00:04 00:00:00 |
| 1077215480 CFIX 00:00:01 00:00:00 |
| 1076691213 CLTX 00:23:17 00:00:03 |
| 1076625897 CLTW 00:23:58 00:00:02 |
| END OF DISPLAY |
+--------------------------------------------------------------------------------+
The following example shows the long-listing display format.
+--------------------------------------------------------------------------------+
|User: zfile ps -l |
| |
|System: FILE0001I 19.04.00 START OF DISPLAY FROM ps -l |
| USER PID PPID PROG ADDR VSZ TIME |
| nobody 1076691213 1076625897 CLTX 02397000 220 00:00:03 |
| root 1077215524 1077215531 CFJP 023DC000 208 00:00:00 |
| root 1077215531 1077215559 CFIX 023F1000 248 00:00:00 |
| root 1077215559 1 CFIM 02445000 248 00:00:00 |
| tpfdfltu 1076625897 1 CLTW 0262B000 68 00:00:02 |
| END OF DISPLAY |
+--------------------------------------------------------------------------------+
In the following example, multiple ECB selection criteria are used.
ECBs with program name cfix or cfim are
displayed. In addition, ECBs with an effective UID of nobody
or tpfdfltu are displayed.
+---------------------------------------------------------------------------------------------+
|User: zfile ps -l -P cfix,cfim -u nobody -u tpfdfltu |
|System: FILE0001I 16.26.39 START OF DISPLAY FROM ps -l -P cfix,cfim -u nobody -u tpf... |
| USER PID PPID PROG ADDR VSZ TIME |
| nobody 1078067228 1078002121 CLTX 014F4000 220 00:00:00 |
| root 1078133090 1 CFIM 018C6000 240 00:00:00 |
| tpfdfltu 1078002121 1 CLTW 019FB000 68 00:00:00 |
| root 1078133203 1078133090 CFIX 01A19000 244 00:00:00 |
| END OF DISPLAY |
+---------------------------------------------------------------------------------------------+
The following example shows a customized display. The requested
output fields are pgm (an alias for prog),
vsz (with a custom column heading of MEMORY), and
pid. Only ECBs with a program name starting with
cfi or a process ID of 1076625897 are displayed.
+---------------------------------------------------------------------------------------------+
|User: zfile ps -o pgm,vsz=MEMORY,pid -P cfi -p 1076625897 |
| |
|System: FILE0001I 19.06.10 START OF DISPLAY FROM ps -o prog,vsz=MEMORY,pid -P cfi -p... |
| PROG MEMORY PID |
| CFIX 256 1077280991 |
| CFIM 260 1077281006 |
| CLTW 68 1076625897 |
| END OF DISPLAY |
+---------------------------------------------------------------------------------------------+
The following example shows how the -L parameter works.
+--------------------------------------------------------------------------------+
|User: zfile ps -L |
| |
|System: FILE0001I 13.29.00 START OF DISPLAY FROM ps -L |
| addr (sva) |
| etime (elapsed) |
| group (gname) |
| pgid |
| pid |
| ppid |
| prog (pgm) |
| rgroup |
| ruser (runame) |
| stime (start, started) |
| time (cputime) |
| tty (lniata, longtname, tname, tt) |
| user (uname) |
| vsz (memory, vsize) |
| END OF DISPLAY |
+--------------------------------------------------------------------------------+
Related Information