The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
killing the process arthi UNIX for Dummies Questions & Answers 3 06-03-2008 05:57 AM
Killing of a process and send a mail if the process doesnot come up within 2 minutes Prince89 Shell Programming and Scripting 1 02-15-2008 03:10 PM
Reg process of killing shanshine SUN Solaris 6 12-05-2007 10:50 AM
killing a process bbhayana UNIX for Dummies Questions & Answers 6 06-02-2007 04:58 AM
killing a process pid jo calamine UNIX for Advanced & Expert Users 16 12-04-2006 03:43 AM

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-25-2002
auswipe's Avatar
Registered User
 

Join Date: Nov 2001
Location: Wide Awake Wylie, Texas
Posts: 536
Question Killing a stubborn process...

I have a stubborn process on my OpenBSD box that just refuses to die. It is taking up about half a meg of memory and refuses to die. It appears to be an errant gzip process that was executed from the console on 06 Jan 2002.

Here is a snippet of my attempts to kill the gzip process

Code:
/home/joeuser $ ps -aux | grep "gzip"
root     13647  0.0  0.1   452   408 C0- DL     6Jan02    4:41.24 gzip -c
/home/joeuser $ kill 13647
/home/joeuser $ ps -aux | grep "gzip"
root     13647  0.0  0.1   452   408 C0- DL     6Jan02    4:41.24 gzip -c
/home/joeuser $ kill -HUP 13647
/home/joeuser $ ps -aux | grep "gzip"
root     13647  0.0  0.1   452   408 C0- DL     6Jan02    4:41.24 gzip -c
/home/joeuser $ kill -9 13647
/home/joeuser $ ps -aux | grep "gzip"
root     13647  0.0  0.1   452   408 C0- DL     6Jan02    4:41.24 gzip -c
/home/joeuser $ kill -9 13647
/home/joeuser $ kill -9 13647
/home/joeuser $ kill -9 13647
/home/joeuser $ ps -aux | grep "gzip"
root     13647  0.0  0.1   452   408 C0- DL     6Jan02    4:41.24 gzip -c
It just refuses to die. According the ps, it has core memory pages locked and some disk access. According to top, the it isn't doing too much and not taking up any CPU time:

Code:
13647 root      -5    0  452K  408K idle  physio   4:42  0.00% gzip
Any suggestions on killing this process other than reboot? I really want to keep the uptime high (yeah, cheap bragging rights... )

Code:
/home/joeuser $ uptime
 5:16PM  up 62 days, 23:17, 1 user, load averages: 1.13, 1.12, 1.09
__________________
Not quite as cool as all the other Kids...
Forum Sponsor
  #2 (permalink)  
Old 01-28-2002
penguin-friend
Guest
 

Posts: n/a
Are you logged in as root on your box when trying to kill the process?
If not,might want to try that...

Jason


  #3 (permalink)  
Old 01-28-2002
Registered User
 

Join Date: Jan 2002
Location: Mumbai
Posts: 20
Unhappy

You may like find the parent PID of the process, and try killing the parent PID.

Milind.
  #4 (permalink)  
Old 01-28-2002
Kelam_Magnus's Avatar
Unix does a body good.
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
Try this.

Do a ps -aef|grep (your PID#)

# ps -aef |grep 13647

# ps -aef |grep (parent PID#) To find the process that possibly spawned your process "gzip -c".

If it has a parent PID. a process that spawned this process, then you should try to kill that process.

Keep trying to find the parent in this manner until you find the true parent. Then you should be able to kill this PID as well.
__________________
My brain is your brain
  #5 (permalink)  
Old 01-28-2002
auswipe's Avatar
Registered User
 

Join Date: Nov 2001
Location: Wide Awake Wylie, Texas
Posts: 536
Bummer, dude.

Quote:
Originally posted by Kelam_Magnus
Try this.

Do a ps -aef|grep (your PID#)

# ps -aef |grep 13647

# ps -aef |grep (parent PID#) To find the process that possibly spawned your process "gzip -c".

If it has a parent PID. a process that spawned this process, then you should try to kill that process.

Keep trying to find the parent in this manner until you find the true parent. Then you should be able to kill this PID as well.
Using the -j option of ps under OpenBSD, I was able to identify the PPID.

The PPID? It is 1.

Yeah. I think I am gonna let the gzip -c sit for a while until I absolutely have to reboot the machine (probably sometime in March). It isn't using any more memory and isn't using any CPU so it is really not a problem.

Thanks for the responses!

I wonder what job spawned the gzip with the -c option. I took a look at my cronjob entries and they do not use the -c option. I use gzip --best for my scripts. I need to do some more investigating. There doesn't seem to be any problem with the system over-all.

Weird.
__________________
Not quite as cool as all the other Kids...
  #6 (permalink)  
Old 01-28-2002
Kelam_Magnus's Avatar
Unix does a body good.
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
root user?

Are you the "root" user when you are trying to Kill this process?

I see that your directory is /home/joeuser. Do an "id" to see if you are root.

If you aren't the Admin, get to root have your Unix Admin try to remove it.

Just a thought...

__________________
My brain is your brain
  #7 (permalink)  
Old 01-28-2002
auswipe's Avatar
Registered User
 

Join Date: Nov 2001
Location: Wide Awake Wylie, Texas
Posts: 536
Re: root user?

Quote:
Originally posted by Kelam_Magnus
Are you the "root" user when you are trying to Kill this process?

I see that your directory is /home/joeuser. Do an "id" to see if you are root.

If you aren't the Admin, get to root have your Unix Admin try to remove it.

Just a thought...

Yeah. I am root on the machine. It's my firewall/proxy/webserver/packet sniffer machine here at the house. I do some perl/c coding on it from time to time but that is about it.

It's strange that the `gzip -c` has hung the way it has. Sometime in March I am bringing up the 23 rack from the garage to my office and I will have to power down the machine at that point. I reckon it will not be a problem after that.
__________________
Not quite as cool as all the other Kids...
Google UNIX.COM
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:19 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0