- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- kill script --
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
11-13-2003 01:34 AM
11-13-2003 01:34 AM
# killit /usr/local/bin/killit
# ESU#3 - Systems and Networking
# rcm(10/03/2001)
# this script was written to kill hung users
#
#==============================================
# BEGIN SCRIPT
ps -ef |grep -v -f /usr/local/bin/patt.1 |grep $1 > temp.1
kill -9 `awk '{print $2}' temp.1`
rm temp.1
# END SCRIPT
#==============================================
note ** /usr/local/bin/patt.1 file contains patterns that you want to avoid. it allows you to exclude items that you want to avoid killing..
Hope it helps..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2003 01:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2003 01:45 AM
11-13-2003 01:45 AM
Re: kill script --
Why do a 'kill -9'? Why take a chance on hosing up your system with the most dangerous kill signal first?
I'd suggest doing a 'kill -15' first, testing for the result, and then doing a 'kill -9' if that fails.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2003 01:45 AM
11-13-2003 01:45 AM
Re: kill script --
I was posting to another thread.. creating this new thread was a mistake. the problem they were having was specific to certain processes..
I appreciate the script you posted I will add it to my library and will definitely use it.. It will come in handy. Thanks!! Rex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2003 01:48 AM
11-13-2003 01:48 AM
Re: kill script --
Good point on trap siglevel.. the items we were "killing" we wanted dead, dead.. I do believe adding the traps for additional levels will definitely add something to this script and reduce possible problems.
Thanks..
Rex