kill -9 not working


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting kill -9 not working
# 8  
Old 01-25-2011
Are you user "root"?
Is this a "root" cron?
How long have these crons been running live?
Could there be lots of copies running?

I wonder if the script contains some sort of perpetual loop and it never stops?
What's in the script?
How do you normally stop the script?
# 9  
Old 01-25-2011
Its not running as root. Its a different user.

These scripts start just after midnight daily and poll for a file every 15 mins. There is a timer in the script which ends the scripts once 1340 mins have elapsed. So it dies automatically towards the end of the day.

If you look at the log file timestamps, yesterdays script finished at aroung 11:25 PM and new set of scripts got triggered early morning even though there were commented in the cron file -

PHP Code:
-rw-r--r--   1 estdm2   datamart   15607 Jan 24 22:46 poll.Peb.output.012411.0001
-rw-r--r--   1 estdm2   datamart   14836 Jan 24 22:46 poll.HSA.output.012411.0001
-rw-r--r--   1 estdm2   datamart   13231 Jan 24 22:48 poll.OES.output.012411.0003
-rw-r--r--   1 estdm2   datamart   13821 Jan 24 23:02 poll.PPM.output.012411.0002
-rw-r--r--   1 estdm2   datamart   14530 Jan 24 23:17 poll.DM-.output.012411.0002
-rw-r--r--   1 estdm2   datamart     188 Jan 25 00:01 HHSAS.log
-rw-r--r--   1 estdm2   datamart     193 Jan 25 00:01 Pebbles.log
-rw-r--r--   1 estdm2   datamart     188 Jan 25 00:02 PPM2DM.log
-rw-r--r--   1 estdm2   datamart     191 Jan 25 00:02 REMEDY.log
-rw-r--r--   1 estdm2   datamart     185 Jan 25 00:03 OES.log
-rw-r--r--   1 estdm2   datamart    5077 Jan 25 11:46 poll.Peb.output.012511.0001
-rw-r--r--   1 estdm2   datamart    4838 Jan 25 11:46 poll.HSA.output.012511.0001
-rw-r--r--   1 estdm2   datamart    4600 Jan 25 11:47 poll.PPM.output.012511.0002
-rw-r--r--   1 estdm2   datamart    4885 Jan 25 11:47 poll.DM-.output.012511.0002
-rw-r--r--   1 estdm2   datamart    4549 Jan 25 11:48 poll.OES.output.012511.0003 
I am trying to figure out how this cron is triggering even though I have commented it.

Should I open a new thread?

Thanks
Sumeet
# 10  
Old 01-25-2011
Have you looked in the cron log (usually /var/adm/cron/log but check your "man cron" page) to check if these jobs are still being invoked by cron?

Stating the obvious, but did you use "crontab -e" to edit the crontab - or some other method?

As this is a non-root cron, do you find processes with likely start times with say:
Code:
ps -fu<username>
i.e.
ps -fuestdm2

I'm still theorising that the script never stops and that it interrogates the date inside a sleep loop which causes the filename to change. Big guess.

Last edited by methyl; 01-25-2011 at 02:24 PM..
# 11  
Old 01-25-2011
ps -fu estdm2 does not give the poll script process.

I dont have read permissions on cron log. I have requested for bouncing the server.

I dont use crontab -e. I have a file with cron entries and I bind that with crontab - crontab cron.
# 12  
Old 01-25-2011
You might have syntax errors in your crontab that prevent it from using it, keeping the old one instead.
# 13  
Old 01-25-2011
Quote:
ps -fu estdm2 does not give the poll script process
Does it give anything which is not attached to a terminal or which has high CPU usage?
It may just show as a Shell process with no command line. You may have killed the parent process.

A "kill -9" is a last resort and can leave orphan looping processes - similar to when users don't log out properly. If you have orphan looping processes they should show with the "top" command. Be careful because a busy database process could look similar.

We kill looping processes sometimes. The most common are shell menu scripts.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Zsh builtin "kill" stopped working

Hi all, I've been using zsh for a while, and was enjoying the builtin "kill" with tab completion. But since I installed "oh-my-zsh" the kill completion has stopped working. I have not edited my new ~/.zshrc file. My ~/.oh-my-zsh/lib/completions.zsh contains the following: zstyle... (0 Replies)
Discussion started by: nickednamed
0 Replies

2. Shell Programming and Scripting

Kill an specific process ID using the KILL and GREP commands

Good afternoon I need to KILL a process in a single command sentence, for example: kill -9 `ps -aef | grep 'CAL255.4ge' | grep -v grep | awk '{print $2}'` That sentence Kills the process ID corresponding to the program CAL255.4ge. However it is possible that the same program... (6 Replies)
Discussion started by: enriquegm82
6 Replies

3. AIX

Kill -9 not working?

What to do when Killl -9 doesn't work to end a process? (2 Replies)
Discussion started by: bbbngowc
2 Replies

4. Linux

Kill a process without using kill command

I want to Kill a process without using kill command as i don't have privileges to kill the process. I know the pid and i am using Linux 2.6.9 OS. (6 Replies)
Discussion started by: sudhamacs
6 Replies

5. Shell Programming and Scripting

Kill a process without using kill command

Sorry, posted the question in other forum. (0 Replies)
Discussion started by: sudhamacs
0 Replies

6. Shell Programming and Scripting

Logon profile kill script only partially working

I have been having an issue with the new motorola rf scan guns opening up too many sessions at once. It seems they will open a new connection for no reason, leaving the old one in the background and the user has no idea it is happening. To combat this, I have added the following code to the logon... (1 Reply)
Discussion started by: raidzero
1 Replies

7. Programming

kill(0,-9) don't kill the process

Hi all i have simple c program , when i wish to kill the app im using kill(0,-9) , but it seams this command don't do any thing and the program. just ignore it . what im doing wrong here ? im using HP-UX ia64 Thanks (9 Replies)
Discussion started by: umen
9 Replies

8. UNIX for Dummies Questions & Answers

not able to kill find with kill -9

Hello everyone I am using HP Ux and had run a find command. Now I am trying to kill it with kill or kill -9 but it is not getting killed and still running. Any clues ? Thanks Sidhu (5 Replies)
Discussion started by: Amardeep
5 Replies

9. UNIX for Advanced & Expert Users

When kill doesnt work, how to kill a process ?

Hi All, I am unable to kill a process using kill command. I am using HP-UX system. I have tried with kill -9 and i have root privilages. How can i terminate this daemon ? ? ? Regards, Vijay Hegde (3 Replies)
Discussion started by: VijayHegde
3 Replies

10. UNIX for Advanced & Expert Users

Kill - not working

Hi, I have logged into a Sun Solaris machine( Putty -telnet ) , which got hung. now I need to kill the process - ksh When I tried to kill like : kill -9 <pid of ksh> , it is not giving any error , but the process is not getting killed... Here is what I did $ps -fu shihab ... (5 Replies)
Discussion started by: shihabvk
5 Replies
Login or Register to Ask a Question