kill -9 not working


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting kill -9 not working
# 1  
Old 01-24-2011
kill -9 not working

Hi All,

I tried killing a bunch of scripts. They seem to have worked because
ps -ef | grep -i SCRIPT_NAME is not showing them but the logs are getting populated and jobs in the script are getting done.

How do I really kill them or atleast see the process running?

Thanks
Sumeet
# 2  
Old 01-24-2011
Have you got "lsof" installed ? If so try running "lsof filename" and it will give you the pid of the process that has that file open (BTW, the title of the post is a bit misleading as the "kill -9" worked (and should always work unless there is a hardware fault), however there are still other processes that are writing to the files)

I hope this helps...
# 3  
Old 01-24-2011
kill -9 ran fine but the process still running

"lsof filename"

Which filename are we talking about? The script,log,cron,etc?

Yep the subject is misguiding.
# 4  
Old 01-24-2011
You mentioned the logs were getting populated ? Run "lsof" on those (unless they are syslog logs, in which case the syslog entry will usually give you the pid of the program that is logging the entry)
# 5  
Old 01-24-2011
Its not working. But your point is right if we are able to find which pid is writing into the file then we can kill it. This is what I got -


PHP Code:
aaau001:/datamart/log/scriptlsof poll.PPM.output.012411.0002
aaau001
:/datamart/log/script
Basically got back nothing.
# 6  
Old 01-25-2011
Is this the same script you were developing a while back and were running from cron? The log filename in the script looks similar.
https://www.unix.com/shell-programmin...ered-cron.html

If so, you may well need to comment out the cron to stop the poll.
# 7  
Old 01-25-2011
Hey Methyl,

Thats the first thing I did yesterday. I commented the cron jobs -


PHP Code:
crontab -l
#02 00 * * * /datamart/scripts/DM_PollScript.ksh PPM2DM* PROD waitfile > /datamart/log/script/PPM2DM.log

#01 00 * * * /datamart/scripts/DM_PollScript.ksh Peb* PROD waitfile > /datamart/log/script/Pebbles.log 
And surprisingly they got triggered again today. I am clueless where are they getting triggered from and How to stop it.

It is just ruining all other jobs.

Thanks

---------- Post updated at 01:07 PM ---------- Previous update was at 01:06 PM ----------

And today I cant even see the poll script process running when I do -

ps -ef | grep -i poll
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