The pstat and truss utilities

In addition to the gdb debugger, the Interix Software Development Kit (SDK) includes two utilities to help in debugging programs: pstat(1) and truss(1).

The pstat utility displays detailed information about a specified process. For example, this is the output for process identifier (PID) 720899 (a shell process):

$ pstat 720899
pid=720899 ppid=1 pgid=720899 sid=720899
flags=40000002
execed asleep
current syscall=fork()
GS=00000000 FS=00000038 ES=00000023 DS=00000023
DI=00000005 SI=00000004 BX=001003ed DX=00000000
CX=00000080 AX=00000000 BP=0084f644 IP=77f67e97
CS=0000001b FL=00000206 SP=0084f598 SS=00000023

You can also use the ps(1) utility to obtain information about identification numbers and flags. The pstat utility provides more than ps. For example, it gives an English translation of flags (in this example, execed asleep), the current system call, and the values of the registers.

Although it does not have the same functionality, the truss utility was inspired by the System V utility of the same name. The truss utility outputs information about system calls and signals.