DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

pstat(C)


pstat -- report system information

Syntax

pstat [ -aipf ] [ -P pid ] [ -n namelist ]

Description

The pstat command interprets the contents of certain system tables. pstat searches for these tables in /dev/kmem. The required namelist is taken from /unix.

If no options are specified, pstat prints information for all three tables: the inode table, the process table, and the file table.

pstat has the following options:


-a
Describe all process slots rather than just active ones. (Used in conjunction with the -p option.)

-f
Print the open file table with these headings:

LOC
The core location of this table entry.

FLAGS
Miscellaneous state variables:

R
open for reading

W
open for writing

A
open for append

N
no delay (non-blocking)

S
synchronized write operation

CNT
Number of processes that know this open file.

INO
The location of the inode table entry for this file.

OFFS
The file offset, see lseek(S).

-i
Print the inode table with these headings:

LOC
The core location of this table entry.

FLAGS
Miscellaneous state variables:

L
locked

U
update time must be corrected

A
access time must be corrected

M
file system is mounted here

W
wanted by another process (L flag is on)

T
contains a text (executable image) file

C
changed time must be corrected

CNT
Number of open file table entries for this inode.

DEVICE
Major and minor device number of file system in which this inode resides.

INO
I-number within the device.

FS
Filesystem type. 1 indicates UNIX.

MODE
Mode bits, see chmod(S).

NLK
Number of links to this inode.

UID
User ID of owner.

SIZE/DEV
Number of bytes in an ordinary file, or major and minor device of special file.

-n namelist
Use the file namelist as an alternate namelist in place of /unix.

-p
Print process table for active processes with these headings:

LOC
The core location of this table entry.

S
Run state encoded thus:

0
no process

1
SSLEEP; waiting for an event to complete

2
SRUN; on the run queue

3
SZOMB; terminated and parent not waiting

4
SSTOP; stopped by debugger while being traced

5
SIDL; idle while being created

6
SONPROC; running on the processor

7
SXBRK; waiting for more pages of memory

F
Miscellaneous state variables, ORed together:

0x00000001
System (resident) process always resident in primary memory.

0x00000002
Process is being traced.

0x00000004
Traced process (using ptrace(S)) has been given to parent by wait(S). Don't return this process to parent again until it runs first.

0x00000008
Process sleeping at priority 25 or less and cannot be awakened by a signal.

0x00000010
Process loaded in primary memory.

0x00000020
Process locked in primary memory and cannot be swapped.

0x00000040
Set when signal goes remote (not used).

0x00000080
Process in Stream poll(S) or doing select(S).

0x00000100
Process is being stopped.

0x00000200
Signal or syscall tracing.

0x00000400
Do not run; performing I/O.

0x00000800
Stop on exec(S).

0x00001000
Process is open.

0x00002000
u-area in primary memory.

0x00004000
Set process running on last close.

0x00008000
Process asleep, stop not allowed.

0x00010000
Process is exiting via ptrace(S).

0x00020000
Process is stopped within a call to sleep(D3oddi).

0x00040000
u-area is being swapped in or out.

0x00080000
Waiting for u-area swap to complete.

0x00100000
Restore old mask after taking signal.

0x00200000
Child of a fork(S), but no exec yet.

0x00400000
Child being traced after fork.

0x00800000
Process may only be traced by the super user.

0x01000000
Process is exiting.

PRI
Scheduling priority, see nice(C).

SIG
Signals received (signals 1-32 coded in bits 0-31).

UID
Real user ID.

TIM
Time resident in seconds; times over 127 appear as 127.

CPU
Weighted integral of CPU time used by the scheduler.

NI
Nice level, see nice(C).

PGRP
Process number of process group leader.

PID
The process ID number.

PPID
The process ID of parent process.

ADDR1

ADDR2
The page frame numbers of the first two pages of the u-area of the process. If the u-area of the process is in primary memory, these numbers can be translated into the physical addresses of the pages. If the u-area is swapped out, the numbers correspond to the addresses of the pages in the swap area measured in multiples of 4 kilobytes.

WCHAN
Wait channel number of a waiting process.

LINK
Link pointer in list of runnable processes.

INODP
Pointer to location of shared inode.

CLKT
Countdown for alarm(S) measured in seconds.

-P pid
Print information about a user process drawn from its user area (defined in /usr/include/sys/user.h). pid is the ID of the process. It may be obtained using the ps(C) command.

Authorization

The behavior of this utility is affected by assignment of the mem authorization. If you do not have this authorization, the output will be restricted to data pertaining to your activities only. Refer to ``Using a secure system'' in the Operating System User's Guide for more details.

Files


/unix
default namelist

/dev/kmem
kernel virtual memory accessed for tables

See also

alarm(S), chmod(S), filesystem(FP), lseek(S), nice(C), ps(C), stat(S)

``Maintaining system security'' in the System Administration Guide

Standards conformance

pstat is not part of any currently supported standard; it is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003