Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ps(1)

stat(2)

cvt(4)

fs(5)



PSTAT(8)                COMMAND REFERENCE                PSTAT(8)



NAME
     pstat - print system facts

SYNOPSIS
     /etc/pstat -fisTtx -p[a] [ -u ubase ] [ system ]
     [ corefile ]

DESCRIPTION
     Pstat interprets the contents of certain system tables.  If
     corefile is given, the tables are sought there, otherwise in
     /dev/kmem. Kernel symbols are taken from the cvt table (see
     cvt(4)) unless system is specified.  If system is given,
     kernel symbols are obtained from the namelist in system.

OPTIONS
     -f Print the open file table with these headings:

            LOC  The core location 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

            CNT  Number of processes that know this open file.

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

            OFFS/SOCK
                 The file offset (see lseek(2)), or the core
                 address of the associated socket structure.

     -i Print the inode table with the these headings:

            LOC  The core location of this table entry.

            FLAGS
                 Miscellaneous state variables encoded thus:

                    L  locked

                    U  update time (fs(5)) must be corrected

                    A  access time must be corrected




Printed 4/6/89                                                  1





PSTAT(8)                COMMAND REFERENCE                PSTAT(8)



                    M  file system is mounted here

                    W  wanted by another process (L flag is on)

                    T  contains a text file

                    C  changed time must be corrected

                    S  shared lock applied

                    E  exclusive lock applied

                    Z  someone waiting for an exclusive lock

            CNT  Number of open file table entries for this
                 inode.

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

            RDC  Reference count of shared locks on the inode.

            WRC  Reference count of exclusive locks on the inode
                 (this may be > 1 if, for example, a file
                 descriptor is inherited across a fork).

            INO  I-number within the device.

            MODE Mode bits, see chmod(2).

            NLK  Number of links to this inode.

            UID  User ID of owner.

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

     -p[a]
         Print process table for active processes with the
         following headings.  If a is specified all processes,
         rather than just active ones, are described.

            LOC  The core location of this table entry.

            S    Run state encoded thus:

                    0  no process

                    1  waiting for some event

                    3  runnable



Printed 4/6/89                                                  2





PSTAT(8)                COMMAND REFERENCE                PSTAT(8)



                    4  being created

                    5  being terminated

                    6  stopped under trace

            F    Miscellaneous state variables, or-ed together
                 (hexadecimal):

                    000001 loaded

                    000002 the scheduler process

                    000004 locked for swap out

                    000008 swapped out

                    000010 traced

                    000020 used in tracing

                    000080 in page-wait

                    000100 prevented from swapping during fork(2)

                    000200 gathering pages for raw i/o

                    000400 exiting

                    001000 process resulted from a vfork(2) which
                           is not yet complete

                    002000 another flag for vfork(2)

                    004000 process has no virtual memory, as it
                           is a parent in the context of vfork(2)

                    008000 process is demand paging data pages
                           from its text inode.

                    010000 process has advised of anomalous
                           behavior with vadvise.

                    020000 process has advised of sequential
                           behavior with vadvise.

                    040000 process is in a sleep which will
                           timeout.

                    080000 a parent of this process has exited
                           and this process is now considered
                           detached.



Printed 4/6/89                                                  3





PSTAT(8)                COMMAND REFERENCE                PSTAT(8)



                    100000 process used 4.1BSD compatibility mode
                           signal primitives, no system calls
                           will restart.

                    200000 process is owed a profiling tick.

            POIP number of pages currently being pushed out from
                 this process.

            PRI  Scheduling priority, see setpriority(2).

            SIGNAL
                 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 setpriority(2).

            PGRP Process number of root of process group (the
                 opener of the controlling terminal).

            PID  The process ID number.

            PPID The process ID of parent process.

            ADDR If in core, the page frame number of the first
                 page of the `u-area' of the process.  If swapped
                 out, the position in the swap area measured in
                 multiples of 512 bytes.

            RSS  Resident set size - the number of physical page
                 frames allocated to this process.

            SRSS RSS at last swap (0 if never swapped).

            SIZE Virtual size of process image (data+stack) in
                 multiples of 512 bytes.

            WCHAN
                 Wait channel number of a waiting process.

            LINK Link pointer in list of runnable processes.

            TEXTP



Printed 4/6/89                                                  4





PSTAT(8)                COMMAND REFERENCE                PSTAT(8)



                 If text is pure, pointer to location of text
                 table entry.

            CLKT Countdown for real interval timer, setitimer(2)
                 measured in clock ticks (10 milliseconds).

     -s This option is not supported.

     -T Print the number of used and free slots in the several
        system tables.  This option is useful for checking to see
        how full system tables have become if the system is under
        heavy load.

     -t Print table for terminals with these headings:

            RAW  Number of characters in raw input queue.

            CAN  Number of characters in canonicalized input
                 queue.

            OUT  Number of characters in output queue.

            MODE See tty(4).

            ADDR Physical device address.

            DEL  Number of delimiters (newlines) in canonicalized
                 input queue.

            COL  Calculated column position of terminal.

            STAT Miscellaneous state variables encoded thus:

                    W  waiting for open to complete

                    O  open

                    S  has special (output) start routine

                    C  carrier is on

                    B  busy doing output

                    A  process is awaiting output

                    X  open for exclusive use

                    H  hangup on close

            PGRP Process group for which this is controlling
                 terminal.




Printed 4/6/89                                                  5





PSTAT(8)                COMMAND REFERENCE                PSTAT(8)



            DISC Line discipline; blank is old tty OTTYDISC or
                 ``ntty'' for NTTYDISC or ``net'' for NETLDISC
                 (see bk(4)).

     -uubase
        Print information about a user process; ubase is its
        address as given by ps(1).  The process must be in main
        memory, or the file used can be a core image and the
        address 0.

     -x This option is not supported.

FILES
     /dev/cvt     default source for kernel symbols

     /dev/kmem    default source of tables

RETURN VALUE
     [NO_ERRS]      Command completed without error.

     [USAGE]        Incorrect command line syntax. Execution
                    terminated.

     [NP_ERR]       An error occurred that was not a system
                    error.  Execution terminated.

CAVEATS
     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.

     Things can change while pstat is running; the picture it
     gives is only a close approximation of reality.  For
     instance, pstat may produce false error messages if it
     cannot find a particular file or if a data structure it is
     looking at changes underneath it.

SEE ALSO
     ps(1), stat(2), cvt(4), and fs(5).
















Printed 4/6/89                                                  6



%%index%%
na:264,78;
sy:342,394;
de:736,567;
op:1303,1159;2798,1591;4725,1750;6811,1721;8868,1557;10761,487;
fi:11248,179;
rv:11427,382;
ca:11809,666;
se:12475,162;
%%index%%000000000188

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026