prstat
is a Solaris command. There are similar commands on Linux (top
, ps
, reading from /proc
, …) but none with the same syntax. It's the downside of using nonstandard tools — porting your application to a different system requires adapting it.
If you really need a tool with the same syntax because of a script that you don't want to change, write one using the features Linux offers. Implement the options and output formats that you need for your script. Most if not all the information you need can be extracted with ps
, using the -o
option to select fields. Apply a grep
or awk
filter to select the lines you want. Alternatively, parse /proc/$pid/stat
or /proc/$pid/status
directly. For global information such as load averages, call top
or uptime
or look in /proc/stat
.
prstat
isSolaris
-specific, any reasontop
orhtop
are not options? – 1_CR Jan 9 '13 at 4:39psmisc
package, and it is nothing like what the Solarisprstat
utility :( – Mat Jan 9 '13 at 6:32