There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Linux and Unix
Tag Cloud
access acer asus bios bsod computer crash drive driver drivers error ethernet excel freeze games gaming hard drive hardware hdmi internet laptop malware memory monitor motherboard music network obp operating system printer problem ram random registry router slow software sound trojan usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
Solved: Killing processes

Reply  
Thread Tools
surfnschultz's Avatar
Member with 191 posts.
 
Join Date: Nov 2003
22-Feb-2005, 12:59 PM #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
Member with 191 posts.
 
Join Date: Nov 2003
22-Feb-2005, 04: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
Member with 191 posts.
 
Join Date: Nov 2003
22-Feb-2005, 08: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 18,705 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
22-Feb-2005, 09:20 PM #4
Could you post an example output of your processes.
surfnschultz's Avatar
Member with 191 posts.
 
Join Date: Nov 2003
23-Feb-2005, 03: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
Reply

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.

Search Tech Support Guy

Find the solution to your
computer problem!




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



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 06:10 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.