Solaris

Kill all user process

Sometimes you want to kill all user process, you can’t do “kill -9 PID” for all process that users have.

You can use this trick
Example :

You (as root), want to kill all process which is had by user “oracle”.

Maybe you want to use this script before you shutdown immediate your Oracle DB

# ps -ef | grep ora | grep -v root | awk ‘{print $2}’ | while read line; do kill -9 $line; done

Advertisements

Discussion

No comments yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives

Twitter Updates

Error: Please make sure the Twitter account is public.

%d bloggers like this: