Hi,
I know how to figure out the list of PID from my application name :
ptree `pgrep MyApp` | awk '{print $1}'
But I dont know how to pipe it for prstat -p <pidlist>
ptree `pgrep MyApp` | awk '{print $1}' | prstat -p ???
I would like to monitor every ptree PID from my application.
Thanks for your help,
prstat -cp "$(ptree $(pgrep YourApp)|awk '{print $1}' ORS=\ )"
You could remove the -c switch for interactive usage.
Thanks!
But do you know why it create a list of "prstat" table (back to back) ... at the place to have one prstat table at the top of my screen (refreshing) ?
Regards,
Because I've used the -c switch, just remove it:
prstat -p ...