There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Linux and Unix
Tag Cloud
acer backup bios boot bsod computer connection crash dell driver drivers email error excel firefox freeze hard disk hard drive hardware hijackthis internet keyboard laptop linksys macro malware network outlook outlook 2003 outlook 2007 password problem recovery redirect server slow sound toshiba trojan usb video virus vista vpn windows windows 7 windows vista windows xp wireless youtube
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
Solved: Killing processes

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
surfnschultz's Avatar
Senior Member with 191 posts.
 
Join Date: Nov 2003
22-Feb-2005, 10:59 AM #1
Solved: Killing processes
I know how to kill them very well, how can I automate this process? I get hung termainals form our retail stores when the network drops out. I then need to manually kill off the hung processes 20-30 one at a time. What can be done to automate the kill process?
surfnschultz's Avatar
Senior Member with 191 posts.
 
Join Date: Nov 2003
22-Feb-2005, 02:42 PM #2
script or utility
Is there a script or utility that can assist in killing processes? I remember a thing we used to play with called Assasin you put in a name and it kills all processes with that name. This nice tool got us in trouble once, and that is why I remember it. It's not good to kill root on a unix box

Anyway this is the type of thing I am looking for.
surfnschultz's Avatar
Senior Member with 191 posts.
 
Join Date: Nov 2003
22-Feb-2005, 06:13 PM #3
script need more info
So I found some info on the web and got it working, but now my question is: How can I pass to a ksh script the value to look for.

The script is:

for spid in $( ps -ef | grep TEST | awk {'print $2'})

do

kill -9 $spid

done

I want to be able to pass a name or number in and have it placed where TEST is in the script.

I am running on AIX using ksh
Thanks.
Squashman's Avatar
Trusted Advisor with 15,879 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: IIAHYAYCESA,YAADA!
22-Feb-2005, 07:20 PM #4
Could you post an example output of your processes.
surfnschultz's Avatar
Senior Member with 191 posts.
 
Join Date: Nov 2003
23-Feb-2005, 01:29 PM #5
solved
I am remebering my scripting slowly and painfully. I used the $1 agrument and that was how I can pass a agrument to my script.

Thanks all for the help it was awesome and fun
Closed Thread Bookmark and Share   techguy.org/333490

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 08:50 AM.
Copyright © 1996 - 2010 TechGuy, Inc. All rights reserved.
Powered by Cermak Technologies, Inc.