Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

crash



PSTAT(8,C)                  AIX Commands Reference                   PSTAT(8,C)



-------------------------------------------------------------------------------
pstat



PURPOSE

Prints system facts.

SYNTAX


              +------------- -u pid ---------------+
              |     +- -i -+                       |
/etc/pstat ---|   +-|      |----------+ +------+   |--->
              |   | +- -I -+          |-|      |-+ |
              | +-| +----------+      | +- -a -+ | |
              | | +-| +- -U -+ |- -p -+          | |
              +-|   +-|      |-+                 |-+
               ^|     +- -v -+                   ||
               || +----+                         ||
               || | -f |                         ||
               |+-| -l |-------------------------+|
               |  | -P |                          |
               |  | -q |                          |
               |  | -s |                          |
               |  | -t |                          |
               |  | -T |                          |
               |  +----+                          |
               +----------------------------------+
    +----------------------------+
>---|             +------------+ |---|
    +- corefile --|            |-+
                  +- namelist -+


Note:  This command does not have MBCS support.

DESCRIPTION

The pstat command interprets the contents of certain system tables in kernel
memory.  If a kernel core dump, corefile, is given, the tables are sought
there; otherwise, in the /dev/kmem file.  The corefile cannot be the
application program core file.  If namelist (for example, the name of an AIX
kernel) is given, that name list is used; otherwise, the /unix file is assumed.
The /dev/kmem file can be specified as corefile in order to specify only
namelist.  Certain options such as -v below require additional suboptions.

OPTIONS






Processed November 8, 1990        PSTAT(8,C)                                  1





PSTAT(8,C)                  AIX Commands Reference                   PSTAT(8,C)



-a   Under -p, -i or -I, describes all process slots or inode slots rather than
     just active ones.

-f   Prints the open file table with these headings:

     LOC         Core location of this table entry.

     FLG         Miscellaneous state variables encoded thus:

                 R     Open for reading.
                 W     Open for writing.
                 P     Pipe (no longer used).
                 T     Token is present.
                 L     File block is locked.
                 K     Token is wanted by another site.
                 N     Ready for netfork (token control block has been set up
                       at storage site (SS) if necessary).
                 S     Open socket.
                 A     Open for append.

     CNT         Number of processes that know this open file.

     INO         Location of the inode table entry for this file.

     TCB         Index into the TCB table at the SS for this file (see -q
                 option on page         7).

     TSITE       Token manager site.

     WNTTOK      Number of local processes waiting for token to arrive.

     TLCKWNT     Number of processes waiting to lock file block.

     OFFS        The file offset (see the lseek system call in the AIX
                 Operating System Technical Reference).

-i   Prints the inode table with these headings:

     LOC     Core location of this table entry.

     FLAGS   Miscellaneous state variables encoded thus:

             L  Locked.
             u  Update time (filsys) must be corrected.
             M  File system is mounted here.
             W  Wanted by another process (L flag is on).
             T  Contains a text file.

     CNT     Number of open file table entries for this inode.






Processed November 8, 1990        PSTAT(8,C)                                  2





PSTAT(8,C)                  AIX Commands Reference                   PSTAT(8,C)



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

     INO     I-number within the device.

     MODE    Mode bits (see "chmod").

     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.

-I   Prints the inode table (including AIX-specific fields) with these
     headings:

     SLT     Index into the inode table for this entry.

     FLAGS   Miscellaneous state variables encoded thus:

             L  Locked.
             u  Update time (filsys) must be corrected.
             D  Storage site has gone down.
             M  File system is mounted here.
             W  Wanted by another process (L flag is on).
             T  Contains a text file.
             G  Change time must be corrected.
             O  Inode is for an old version.
             C  Commit is in progress.
             i  Update propagation in is in progress.
             o  Update propagation out is in progress.
             s  Out of space error has occurred on a write to this file.
             w  Read/write error has occurred on this file.

     GFS     The global file system number.  (GFS, INO) uniquely identifies a
             file.

     INO     I-number within the device.

     AREF    Count of all uses of this inode.

     OREF    Count of local opens of this inode.

     URD     Count of number of local opens for read.

     UMD     Count of number of local opens for mod (write).

     SIS     At a US which is not the SS, the slot of the SS's inode.





Processed November 8, 1990        PSTAT(8,C)                                  3





PSTAT(8,C)                  AIX Commands Reference                   PSTAT(8,C)



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

     DFLAGS  AIX disk inode flags, as follows (hex):

             01     DIDEL (file has been deleted).
             02     DISTORE (copy of file is stored locally).
             10     DIALLOC (this inode is allocated).
             20     DIHIDDEN (this file is a hidden directory).
             40     DILONGDIR (this file is a long directory in BSD format).
             80     DILINK (this file is a symbolic link to another file).
             100    DIFORCE (DISTORE is forced to retain current value).
             200    DIXIPX (this file is used for x386 IPC support).
             400    DIMOUNTEDON (this file is mounted on inode #...).
             800    This file is a socket.

     UID     User ID of owner.

     PIS     During update propagation, in the inode slot of tandem inode.

     MODE    Mode bits (see "chmod").

     NL      Number of links to this inode.

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

     VERSION The version number of this file.

     RL      The index into the lock table for any record locks applied to this
             file (see -1 option on page         5).

     FT      At the SS of a pipe, the index into the token control block table
             of the file offset token (see -q option on page         7).

     IT      At the SS of a regular file or block special file, the index into
             the token control block table of the file data token (see -q
             option on page         7).

     W       At the using site (US), the number of processes waiting for the
             file data token.

     L       At the US, the number of processes currently using the file data
             token.

     CSSMAP  At the CSS, the bitmap of active storage sites.

     SSMAP   At the SS, the bitmap of active using sites.

     MODMAP  At the SS, the bitmap of sites having this file open for mod
             (write).



Processed November 8, 1990        PSTAT(8,C)                                  4





PSTAT(8,C)                  AIX Commands Reference                   PSTAT(8,C)




     For pipes (both regular and named), the following is also given:

     ROPEN       Read end of pipe currently open.

     WOPEN       Write end of pipe currently open.

     RLOCAL      Current pipe reader is on local site.

     WLOCAL      Current pipe writer is on local site.

     RCLOSED     The read end of the pipe has been closed.

     WRITING     A write system call on this pipe is in progress.

     REMOTE      A remote system call on this pipe is in progress.

     At SS, read end and write end are open at the save remote site.  OPEN At
     SS, either now or in the past, had both ROPEN and WOPEN.  rptr If RLOCAL
     or at the SS, the current read pointer.  xread IF RLOCAL or at the SS,
     this file offset records the amount of data requested in a read system
     call which is in progress.  xwrite IF WLOCAL or at the SS, this file
     offset records the amount of data being written by a write system call
     which is progress.  lastf At the SS, the logical page number of the page
     most recently freed.

-l   Prints the file record lock table, including the following fields:

     LOC     Core location of this table entry.

     PROC    Process table pointer for the process holding this lock (if
             local).

     PID     Process id for the process.

     SITE    Site on which the process is running.

     MODE    Type of lock.

     LOW     Lower bound of the region which is locked.

     HIGH    Higher bound of the region.

     WAITCT  Number of processes waiting for this region to be unlocked.

     NEXT    Link to another lock if multiple regions are locked.  This is also
             used to link items on the free list.

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

     LOC    The core location of this table entry.




Processed November 8, 1990        PSTAT(8,C)                                  5





PSTAT(8,C)                  AIX Commands Reference                   PSTAT(8,C)



     S      Run state encoded thus:

            0   No process.
            1   Waiting for some event.
            3   Runnable.
            4   Being created.
            5   Being terminated.
            6   Stopped under trace.

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

            000001 Loaded.
            000002 Scheduler process.
            000004 Locked for swap out.
            00000B Swapped out.
            000010 Traced.
            000020 Used in tracing.
            000040 Locked in by lock (see "lock").
            000080 In page-wait.
            000100 Prevented from swapping during fork (see the fork system
                   call in the AIX Operating System Technical Reference).
            000200 Gathering pages for raw I/O.
            000400 Exiting.
            001000 Process resulted from a vfork (see the vfork system call in
                   the AIX Operating System Technical Reference) which is not
                   yet complete.
            002000 Another flag for vfork.
            004000 Process has no virtual memory, as it is a parent in the
                   context of vfork.
            008000 Process is demand paging data pages from its text inode.
            010000 Process has advised of anomalous behavior with the vadvise
                   system call (see AIX Operating System Technical Reference).
            020000 Process has advised of sequential behavior with the vadvise
                   system call.
            040000 Process is in a sleep which will timeout.
            080000 Parent of this process has exited and this process is now
                   considered detached.
            100000 Process used some new signal primitives, for example, the
                   sigset system call (see AIX Operating System Technical
                   Reference).  More system calls will restart.
            200000 Process is owed a profiling tick.

     PRI    Scheduling priority (see nice in the AIX Operating System Technical
            Reference).

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

     UID    Real user ID.

     SLP    Amount of time process has been blocked.





Processed November 8, 1990        PSTAT(8,C)                                  6





PSTAT(8,C)                  AIX Commands Reference                   PSTAT(8,C)



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

     CPU    Weighted integral of CPU time, for scheduler.

     NI     Nice level.

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

     PID    Process ID number.

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

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

     WCHAN  Wait channel number of a waiting process.

     LINK   Link pointer in list of runnable processes.

     CLKT   Countdown for alarm (see the alarm system call in the AIX Operating
            System Technical Reference) measured in seconds.

-P   Prints information about process tracking.  This includes the (site,
     process-id) list of processes originating at this site but no longer on
     this site and also the (site, process-id) list for each parent of a remote
     process of its remote children.

-q   Prints the token control block and token site request tables.  These data
     structures are used by the token mechanisms that synchronize the
     concurrent access to files by processes on different sites within the
     network.

     There are two types of tokens:  file offset tokens and inode tokens.  File
     offset tokens control access to a file table entry (see -f option on page
             2) which is shared between multiple sites.  Inode tokens, also
     known as file data tokens, control access to the content of the file.  A
     list of token site request items is linked to each token control block,
     one for each site which shares the file.  Allocated and unallocated
     entries for both tables are shown, except that entries which have never
     been allocated are omitted.

     The token control block table is printed with the following headings:

     LOC       The core location of this table entry.

     STATE     One of the following:





Processed November 8, 1990        PSTAT(8,C)                                  7





PSTAT(8,C)                  AIX Commands Reference                   PSTAT(8,C)



               FREE      Unallocated entry.

               IDLE      Token not assigned to any site.

               BUSY      Token assigned to first site in request queue.

               ALERT     Site with token has been asked to give it up.

     R         Indicates that the token control block is used for a file token
               open for reading.

     M         Indicates that the token control block is used for a file token
               open for writing.

               I    Indicates that the token control block is used for an inode
                    token.

     GFS       Global file system number for the file.

     INUM      Inode number for the file.

     I_PTR     Link back to the SS inode.  Pipes and inode tokens only.

     REQUESTS  Link to head of request queue (address in token site request
               table).

     F_OFFSET  Read/write offset of the file at the last time the token was
               passed.  File offset tokens only.

     NEXT      Link to other token control blocks for this file.  File offset
               tokens only.

     READMAP   Sites currently holding the inode token for mod.  Inode tokens
               only.

     MODSITE   Site currently holding the inode token for mod.  Inode tokens
               only.

     The token site request table is printed with the following headings:

     LOC               Core location of this table entry.

     STATE             One of the following:

                       UNUSED          Unallocated entry.

                       TOKEN           This site currently had the token.

                       REQUEST         This site has requested the token.

                       ELIGIBLE        This site has not requested the token.




Processed November 8, 1990        PSTAT(8,C)                                  8





PSTAT(8,C)                  AIX Commands Reference                   PSTAT(8,C)



                       FREQUENT        This site wants to be queued back as a
                                       request after it gives up the token.

     MOD               File is being modified.

     SITE              Using site which is sharing the file.

     FDES              Using site's index into its file table.

     NEXT              Link to entries for other sites sharing this file.

-s   Shows swap space usage.

-t   Place the following under the -t flag:

     DEV     Major device number.

     DEL     Delimiter count.

     BFLG    Berkeley flags.

     BSTA    Berkeley state.

     RAW     Number of characters in raw input queue.

     MIN     Minor device number.

     CAN     Number of characters in canonicalized input queue.

     OUT     Number of characters in output queue.

     IFLG    Input modes (octal).

     OFLG    Output modes (octal).

     CFLG    Control modes (octal).

     LFLG    Line discipline modes (octal).

     STATE   Miscellaneous state variables encoded thus:

             T    Timeout.
             C    Carrier is on.
             B    Busy doing output.
             A    Process is awaiting output.
             X    Open for exclusive use.
             S    Output stopped by SUSP Ctrl-S.
             I    Wake up when input done.
             O    Wake up when output done.
             W    Waiting for output to drain.





Processed November 8, 1990        PSTAT(8,C)                                  9





PSTAT(8,C)                  AIX Commands Reference                   PSTAT(8,C)



     PGRP    Process group for which this is controlling terminal.

     DISC    Line discipline (old or new).

     For more information on BFLG and BSTA, see termio in the AIX Operating
     System Technical Reference.

-T   Displays the number of used and free slots in the several system tables.
     Useful for checking how full system tables have become if the system is
     under heavy load.  This option overrides the -f, -i, -p, and -x flags.

-u   Prints detailed information about the user structure for each of the
     processes in the process table.

-u pid
     Displays detailed information about the user structure for the process
     identified by the pid argument.  The option functions the same as the -U
     option except it displays information about a specific process.

-v   With the -p option, displays detailed process table information
     vertically.  With the -T option, displays the number of netmsgs in use.

FILES

/dev/kmem    Default corefile.
/unix        Default namelist.

RELATED INFORMATION

See the following commmand:  "crash."

See the AIX Operating System Technical Reference:  stat and filsys file
formats.






















Processed November 8, 1990        PSTAT(8,C)                                 10



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