Manual page for PSTAT(8)
pstat - print system facts
SYNOPSIS
/usr/etc/pstat
[
-afipSsT
] [
-u
pid
] [
system
[
corefile
] ]
DESCRIPTION
pstat
interprets the contents of certain system tables. If
corefile
is given, the tables are sought there, otherwise in
/dev/kmem.
The required namelist is taken from
/vmunix
unless
system
is specified.
OPTIONS
- -a
-
Under
-p,
describe all process slots rather than just active ones.
- -f
-
Print the open file table with these headings:
-
-
- LOC
-
The memory address of this table entry.
- TYPE
-
The type of object the file table entry points to.
- FLG
-
Miscellaneous state variables encoded thus:
-
-
- R
-
open for reading
- W
-
open for writing
- A
-
open for appending
- S
-
shared lock present
- X
-
exclusive lock present
- I
-
signal pgrp when data ready
- CNT
-
Number of processes that know this open file.
- MSG
-
Number of references from message queue.
- DATA
-
The location of the vnode table entry or socket for this file.
- OFFSET
-
The file offset (see
lseek.2v
- -i
-
Print the inode table including the associated vnode entries
with these headings:
-
-
- ILOC
-
The memory address of this table entry.
- IFLAG
-
Miscellaneous inode state variables encoded thus:
-
-
- A
-
inode access time must be corrected
- C
-
inode change time must be corrected
- L
-
inode is locked
- R
-
inode is being referenced
- U
-
update time
(fs(5))
must be corrected
- W
-
wanted by another process (L flag is on)
- IDEVICE
-
Major and minor device number of file system in which
this inode resides.
- INO
-
I-number within the device.
- MODE
-
Mode bits in octal, see
chmod.2v
- 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.
- VFLAG
-
Miscellaneous vnode state variables encoded thus:
-
-
- R
-
root of its file system
- S
-
shared lock applied
- E
-
exclusive lock applied
- Z
-
process is waiting for a shared or exclusive lock
- CNT
-
Number of open file table entries for this vnode.
- SHC
-
Reference count of shared locks on the vnode.
- EXC
-
Reference count of exclusive locks on the vnode (this may be
`> 1'
if, for example, a file descriptor is inherited across a fork).
- TYPE
-
Vnode file type, either
VNON
(no type),
VREG
(regular),
VDIR
(directory),
VBLK
(block device),
VCHR
(character device),
VLNK
(symbolic link),
VSOCK
(socket),
VFIFO
(named pipe), or
VBAD
(bad).
- -p
-
Print process table for active processes with these headings:
-
-
- LOC
-
The memory address of this table entry.
- S
-
Run state encoded thus:
-
-
- 0
-
no process
- 1
-
awaiting an event
- 2
-
(abandoned state)
- 3
-
runnable
- 4
-
being created
- 5
-
being terminated
- 6
-
stopped (by signal or under trace)
- F
-
Miscellaneous state variables,
ORed
together (hexadecimal):
-
-
- 0000001
-
loaded
- 0000002
-
a system process (scheduler or page-out daemon)
- 0000004
-
locked for swap out
- 0000008
-
swapped out during process creation
- 0000010
-
process is being traced
- 0000020
-
tracing parent has been told that process is stopped
- 0000040
-
user settable lock in memory
- 0000080
-
in page-wait
- 0000100
-
prevented from swapping during
fork.2v
- 0000200
-
will restore old mask after taking signal
- 0000400
-
exiting
- 0000800
-
doing physical I/O
- 0001000
-
process resulted from a
vfork.2
which is not yet complete
- 0002000
-
another flag for
vfork.2
- 0004000
-
process has no virtual memory, as it is a parent in the context of
vfork.2
- 0008000
-
process is demand paging pages from its executable image vnode
- 0010000
-
process has advised of sequential
VM
behavior with
vadvise.2
- 0020000
-
process has advised of random
VM
behavior with
vadvise.2
- 0080000
-
process is a session process group leader
- 0100000
-
process is tracing another process
- 0200000
-
process needs a profiling tick
- 0400000
-
process is scanning descriptors during select
- 4000000
-
process has done record locks
- 8000000
-
process is having its system calls traced
- PRI
-
Scheduling priority, see
getpriority.2
- SIG
-
Signals received (signals 1-32 coded in bits 0-31).
- UID
-
Real user
ID.
- SLP
-
Amount of time process has been blocked.
- TIM
-
Time resident in seconds; times over 127 coded as 127.
- CPU
-
Weighted integral of
CPU
time, for scheduler.
- NI
-
Nice level, see
getpriority.2
- PGRP
-
Process number of root of process group.
- PID
-
The process
ID number.
- PPID
-
The process
ID
of parent process.
- RSS
-
Resident set size -- the number of physical page frames allocated
to this process.
- SRSS
-
RSS
at last swap (0 if never swapped).
- SIZE
-
The size of the process image. That is, the sum of the data and
stack segment sizes, not including the sizes of any shared libraries.
- WCHAN
-
Wait channel number of a waiting process.
- LINK
-
Link pointer in list of runnable processes.
- -S
-
Print the streams table with these headings:
-
-
- LOC
-
The memory address of this table entry.
- WRQ
-
The address of this stream's write queue.
- VNODE
-
The address of this stream's vnode.
- DEVICE
-
Major and minor device number of device to which this stream refers.
- PGRP
-
This stream's process group number.
- SIGIO
-
The process id or process group that has this stream
open().
- FLG
-
Miscellaneous stream state variables encoded thus:
-
-
- I
-
waiting for
ioctl()
to finish
- R
-
read/recvmsg is blocked
- W
-
write/putmsg is blocked
- P
-
priority message is at stream head
- H
-
device has been ``hung up'' (M_HANGUP)
- O
-
waiting for open to finish
- M
-
stream is linked under multiplexor
- D
-
stream is in message-discard mode
- N
-
stream is in message-nondiscard mode
- E
-
fatal error has occurred (M_ERROR)
- T
-
waiting for queue to drain when closing
- 2
-
waiting for previous
ioctl()
to finish before starting new one
- 3
-
waiting for acknowledgment for
ioctl()
- B
-
stream is in non-blocking mode
- A
-
stream is in asynchronous mode
- o
-
stream uses old-style no-delay mode
- S
-
stream has had
TOSTOP
set
- C
-
VTIME clock running
- V
-
VTIME timer expired
- r
-
collision on
select()
for reading
- w
-
collision on
select()
for writing
- e
-
collision on
select()
for exceptional condition
The queues on the write and read sides of the stream are listed for each
stream. Each queue is printed with these headings:
-
-
- NAME
-
The name of the module or driver for this queue.
- COUNT
-
The approximate number of bytes on this queue.
- FLG
-
Miscellaneous state variables encoded thus:
-
-
- E
-
queue is enabled to run
- R
-
someone wants to get from this queue when it becomes non-empty
- W
-
someone wants to put on this queue when it drains
- F
-
queue is full
- N
-
queue should not be enabled automatically by a putq
- MINPS
-
The minimum packet size for this queue.
- MAXPS
-
The maximum packet size for this queue, or
INF
if there is no maximum.
- HIWAT
-
The high-water mark for this queue.
- LOWAT
-
The low-water mark for this queue.
- -s
-
Print information about swap space usage:
-
-
- allocated:
-
The amount of swap space (in bytes) allocated to private pages.
- reserved:
-
The number of swap space bytes not currently allocated, but
claimed by memory mappings that have not yet created private
pages.
- used:
-
The total amount of swap space, in bytes, that is either allocated
or reserved.
- available:
-
The total swap space, in bytes, that is currently available for
future reservation and allocation.
- -T
-
Print the number of used and free slots in the several system tables.
This is useful for checking to see how full system tables have become if the
system is under heavy load. Shows both used and cached inodes.
- -u pid
-
Print information about the process with
ID
pid.
FILES
- /vmunix
-
namelist
- /dev/kmem
-
default source of tables
SEE ALSO
ps.1
chmod.2v
fork.2v
getpriority.2
lseek.2v
stat.2v
vadvise.2
vfork.2
fs.5
iostat.8
vmstat.8
BUGS
It would be very useful if the system recorded ``maximum occupancy''
on the tables reported by
-T;
even more useful if these tables were dynamically allocated.
Created by unroff & hp-tools.
© somebody (See intro for details). All Rights Reserved.
Last modified 11/5/97