How to use Kill cmd when detect rogue


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to use Kill cmd when detect rogue
# 1  
Old 12-18-2003
Data How to use Kill cmd when detect rogue

I'm system administrator and most of our Unix servers in the company host database that are accessed frequently by company employees. One day, one particular Unix server has been reported as being very slow. Upon further investigation using the ps command, we've found a rogue process that is wasting a great deal of system resources. Unfortunately, the rogue process is a database maintenance program and should be kiilled with caution.

1) Which kill signal would you send this process and why ?

2) If the rogue process traps this signals, which other kill signals would you try ?

3) Which command could you use as a last resort to kill the rogue process ?

Very much appreciate if you could extend some help as we're not very handy with Unix.

Cheers
# 2  
Old 12-18-2003
do

ps -efXunix to find the process and pid

kill -9 <pid> will kill the process.
here we are sending SIGKILL signal and this is non-ignorable kill.


-kumaran
# 3  
Old 12-18-2003
Re: How to use Kill cmd when detect rogue

Hi,

Quote:
Originally posted by agui
1) Which kill signal would you send this process and why ?
First, always try to use the default signal (15, SIGTERM). This signal will try to terminate the process safely.

Quote:
2) If the rogue process traps this signals, which other kill signals would you try ?
If the application is well built, it will answer to the SIGTERM, and terminate... If you're using Solaris, use psig pid and it will show you how the process will behave to each available signal. You can also try signal 2 (SIGHUP), some applications reload their configuration files at this signal...

Quote:
3) Which command could you use as a last resort to kill the rogue process ?
At last resort, use signal 9 (SIGKILL). It will terminate the application immediatly, but some system resources might not be released.
# 4  
Old 12-18-2003
Hammer & Screwdriver

Dear all,

Many thanks to your posting....welcome more....
# 5  
Old 12-18-2003
SUN has a nice signal primer. See http://developers.sun.com/solaris/ar...alprimer.html.

Cheers,

Keith
# 6  
Old 12-18-2003
Re: How to use Kill cmd when detect rogue

kdufin, thar link did not work for me. Smilie

Quote:
Originally posted by agui
Upon further investigation using the ps command, we've found a rogue process that is wasting a great deal of system resources. Unfortunately, the rogue process is a database maintenance program and should be kiilled with caution.
Could I ask why is this process a "rogue"? How do you know is it "wasting" system resources? Couldn't it be simply "using" system resources?

You don't give us many details here. There is not a single answer that covers all cases. It would be particularly nice to know which resource or resources had been used by this process.

Since the report was "very slow", I'm going to guess that a several minute delay in fixing the slowness is acceptable. The first thing to do is figure out as much as you can. Do you have database people? Can they help? The UID, PPID, and TTY fields can often be used to figure out who started the program. If nothing else, you might contact the database vendor and ask for advice. One thing you want to know fairly quickly is if a core dump would be both possible and useful. That will influence which signal you will want to send to the program.

Can you be sure that you won't regret killing this process? If the process is simply performing too much I/O or something like that, you may have an interesting option: SIGSTOP. That signal can not be caught or ignored. And it will cause the process to stop executing. This can buy you time for a more permanent solution. And it can be used as a test to see if anything bad happens. If so, you can send a SIGCONT and the process will spring back to life.

If you decide to kill the process, you need to know if you need a coredump. It could be that a coredump would be vitally useful. Or it could be that a coredump would be useless and might even fill a filesystem. If you don't want a coredump, then SIGINTR, SIGTERM, and SIGHUP might be good choices. If you do want a coredump, then SIGQUIT, SIGSEGV, and SIGBUS might work. If one of those trios did not not work, I would fall back to SIGKILL. You can send any signal to a stopped process, no need to continue it first.
# 7  
Old 12-18-2003
My apologies; normally I have the sense to leave a space between a URL and a period. Maybe I can blame my English teacher for ruining my web grammer <grin>. Here's the correct URL:

http://developers.sun.com/solaris/ar...nalprimer.html

Cheers,

Keith
 
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Programming

Porting Rogue Wave to Linux

I am challenged with porting an old application from Solaris to Red Hat. The application uses Rogue Wave and I am searching for a Red Hat implementation. Your help is appreciated! (2 Replies)
Discussion started by: FunkyWinkerbean
2 Replies

2. Shell Programming and Scripting

Unix cmd prompt how to get old cmd run?

Hi, I am using SunOS I want to serch my previous command from unix prompt (like on AIX we can search by ESC -k) how to get in SunOs urgent help require. (10 Replies)
Discussion started by: RahulJoshi
10 Replies

3. UNIX for Dummies Questions & Answers

Finding a rogue process

Afternoon all, hopefully someone can give me a hand with this (the following may be explained very poorly :rolleyes: ) I know there's a process running on one of our Solaris 10 boxes that runs approximately every 5 minutes. Unfortunately I've no idea, who owns it, what it is called, or how it is... (2 Replies)
Discussion started by: dlam
2 Replies

4. UNIX for Dummies Questions & Answers

kill/pkill process by CMD info.

I have a process that I'd like to kill. Doing a "ps -fu myusername" gives me: UID PID PPID C STIME TTY TIME CMD myusername 5443 1 0 10:05 ? 00:00:00 /bin/sh /some/path/crap.sh -s /yet/another/path/parentProcess myusername 5593 5443 0 ... (2 Replies)
Discussion started by: mrwatkin
2 Replies

5. Shell Programming and Scripting

Is there any cmd to kill a process including its childs ( or sub processes spawned by

Dear Unix Gurus, Here is my query. If i start a script,it inturn calls many other scripts ..and most of them continue to run in parallel. Suppose,if i want to stop my script for some reason,i need to kill -9 each of the processes running.It becomes clumsy if the sub processes r more. ... (15 Replies)
Discussion started by: gvsreddy_539
15 Replies

6. UNIX for Dummies Questions & Answers

man <cmd> >> cmd.txt

I've noticed most of my postings here are because of syntax errors. So I want to begin compiling a large txt file that contains all the "man <cmd>" of the commands I most have problems with. I ran a "man nawk >> nawk.txt" but it included a header/footer on each "page". Anyone know how I'd be... (6 Replies)
Discussion started by: yongho
6 Replies

7. UNIX for Dummies Questions & Answers

Rogue PPC RPm

Hello, i need to Rogue RPm for PPC, anybody knows where i can get it? Thanks. i am new to Unix, thats why ia m postin here. Thank you! (3 Replies)
Discussion started by: Ro'Taygahn
3 Replies
Login or Register to Ask a Question