- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- In Single Command "How to kill the particular user...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 01:06 AM
06-29-2005 01:06 AM
In Single Command "How to kill the particular user process"
An application user owns 50 process if one process is hung I have to kill all the processes manually so 50 times I need to use kill command.
I wanted to avoid this tedious job.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 01:10 AM
06-29-2005 01:10 AM
Re: In Single Command "How to kill the particular user process"
Hi
This shuld work.
ps -fu "username" |awk '{print $2}' |grep -v PID |while read pid ;do
echo "killing $pid"
kill -9 $pid
done
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 01:10 AM
06-29-2005 01:10 AM
Re: In Single Command "How to kill the particular user process"
PROCESSES=`UNIX95= ps -U $USERNAME | \
grep -v PID |awk '{ print $1 }' | sort -n`
. for PROC in $PROCESSES
. do
. echo "\tKilling process $PROC"
. kill -9 $PROC
. done
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 01:13 AM
06-29-2005 01:13 AM
Re: In Single Command "How to kill the particular user process"
# ps -f
# ps -f
# kill -9 `ps -f
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 01:14 AM
06-29-2005 01:14 AM
Re: In Single Command "How to kill the particular user process"
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 01:56 AM
06-29-2005 01:56 AM