By using "ucbps" command i am able to get all PIDs
$ ucbps
Userid PID CPU % Mem % FD Used Server Port
=========================================================================
512 5783 2.50 16.30 350 managed1_adrrtwls02 61001
512 8896 2.70 21.10 393 admin_adrrtwls02 61000
512 9053 2.70 17.10 351 managed2_adrrtwls02 61002
I want to do it like this, but don't know how to do
If you want to kill -9 based on a string (you might want to try kill first) you can do something like this:
ps axf | grep <process name> | grep -v grep | awk '{print "kill -9 " $1}'
This will show you what you're about to kill (very, very important) and just pipe it to sh
when the time comes to execute:
ps axf | grep <process name> | grep -v grep | awk '{print "kill -9 " $1}' | sh