When looking with processes on your system, sometimes you ask your self “Who the heck started this process? Often it’s a process started by SMF as part of a service (or by a process started by SMF) but then the question is “Which service?”. prstat now got the new -x option. This shows for each process the FMRI of each process that was started as a part of an SMF service.

You have to scroll right to see the new output:

# prstat -x
   PID USERNAME  SIZE   RSS STATE   PRI NICE      TIME  CPU      PROCESS/NLWP     FMRI
   835 root      181M  174M sleep    59    0   0:03:07 0,3%          sstored/18   svc:/system/sstore:default
     6 root        0K    0K sleep    99  -20   0:00:33 0,1%      zpool-rpool/166  -
  1653 root       13M 6668K cpu0     59    0   0:00:00 0,0%           prstat/1    svc:/network/ssh:default
  1638 jmoekamp   16M 1868K sleep    59    0   0:00:00 0,0%             sshd/1    svc:/network/ssh:default
  1645 root       13M 5932K sleep    59    0   0:00:00 0,0%             bash/1    svc:/network/ssh:default
  1067 root       27M   10M sleep    59    0   0:00:07 0,0%         sysstatd/14   svc:/system/sysstat:default
   836 webservd   26M 8328K sleep    59    0   0:00:03 0,0%            httpd/18   svc:/system/webui/server:default

This is really useful. I’m often (as in: almost always) using prstat in the microstate accounting mode with the -m option. However -m is one of the options that can’t be combined with -x.

root@solaris:~# prstat -xm
prstat: -x option cannot be used with -a, -t, -m, -v, -L or -H

Still this new option is super useful, because when i’m starting to use microstate accounting i’m already far beyond the topic of “Who started it?”

Written by

Joerg Moellenkamp

Grey-haired, sometimes grey-bearded Windows dismissing Unix guy.