Prstat

From EggeWiki

Jump to: navigation, search

'prstat' is Solaris' version of 'top'. I found a quirk today where it seems to be skipping one pid from my list of pids I'm giving it. I have a folder of pids for Java processes, and I want to quickly see the resident set size for each. Specifying a '-n' option greater than the number of pids seems to fix the problem.

emgprod@emgsydapp106:/app/prd/tradingplatform/server
$ ls -l pids/emgsydapp106/* | wc
      16     144    1166
 
emgprod@emgsydapp106:/app/prd/tradingplatform/server
$ prstat -s rss  -cp "`cat pids/emgsydapp106/* | tr '\n' ' '` " 1 1 | wc
      17     170    1147
 
emgprod@emgsydapp106:/app/prd/tradingplatform/server
$ prstat -s rss -n100 -cp "`cat pids/emgsydapp106/* | tr '\n' ' '` " 1 1 | wc
      18     180    1216
Personal tools