Wednesday, January 18, 2017

Solaris process information

Helping to find out what a process on Solaris is doing. Using the prstat command to see.

$ prstat -mL -p 1660 PID USERNAME USR SYS TRP TFL DFL LCK SLP LAT VCX ICX SCL SIG PROCESS/LWP 1660 oracle 99 0.0 0.1 0.0 0.0 0.0 0.0 0.6 3 960 1K 0 oracle/1

USR The percentage of time the process has spent in user mode.
SYS The percentage of time the process has spent in system mode.
TRP The percentage of time the process has spent in processing system traps.
TFL The percentage of time the process has spent processing text page faults.
DFL The percentage of time the process has spent processing data page faults.
LCK The percentage of time the process has spent waiting for user locks.
SLP The percentage of time the process has spent sleeping.
LAT The percentage of time the process has spent waiting for CPU.
VCX The number of voluntary context switches.
ICX The number of involuntary context switches.
SCL The number of system calls.
SIG The number of signals received.

We can run dtrace to see is a process is doing anything

# dtrace -n :::entry'/pid == 1437/{ @syscalls[probefunc] = count(); }' dtrace: description ':::entry' matched 256026 probes

After a few seconds you can control-C the command. If the process if doing nothing, the command will print nothing to the screen. If the process is doing something you will see a count of the providers.

******************************************
keywords: prstat process
******************************************
rdbms version: solaris
******************************************

No comments: