pstat Command

Purpose

Interprets the contents of the various system tables and writes it to standard output.

Syntax

pstat-a ] [  -A ] [  -f ] [  -i ] [  -p ] [  -P ] [  -s ] [  -S ] [  -t ] [  -uProcSlot ] [  -T ] [  -U ThreadSlot] [ [ KernelFile CoreFile ]

Description

The pstat interprets the contents of the various system tables and writes it to standard output. You must have root user or system group authority to run the pstat command.

Flags

Item Description
-a Displays entries in the process table.
-A Displays all entries in the kernel thread table.
-f Displays the file table.
-i Displays the i-node table and the i-node data block addresses.
-p Displays the process table.
-P Displays runnable kernel thread table entries only.
-s Displays information about the swap or paging space usage.
-S Displays the status of the processors.
-t Displays the tty structures.
-u ProcSlot Displays the user structure of the process in the designated slot of the process table. An error message is generated if you attempt to display a swapped out process.
-T Displays the system variables. These variables are briefly described in var.h.
-U ThreadSlot Displays the user structure of the kernel thread in the designated slot of the kernel thread table. An error message is generated if you attempt to display a swapped out kernel thread.

Security

Attention RBAC users and Trusted AIX® users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. To display the i-nodes of the system dump saved in the dumpfile core file, enter:
    pstat -i dumpfile
    Symbols are retrieved from the /usr/lib/boot/unix file.
  2. To display the file table and the user structure for the process in process table slot 0 (zero) of the system currently running, enter:
    pstat -f -u 0
  3. To display the tty structures for a system dump, whose core file is dumpfile and whose kernel is the /usr/lib/boot/unix.back file, enter:
    pstat -t /usr/lib/boot/unix.back dumpfile
  4. To display all threads in the kernel thread table and the user structure of the thread in thread table slot 2, enter:
    pstat -A -U 2

Files

Item Description
/usr/sbin/pstat Contains the pstat command.
/dev/mem Default system-image file.
/usr/lib/boot/unix Default kernel-image file.
/usr/include/sys/*.h Contains header files for table and structure information.