Jump to content

Prstat

From EggeWiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

'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.

<geshi code="bash> 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

</geshi>