About ghost pid


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers About ghost pid
# 1  
Old 05-14-2004
Question About ghost pid

Hi,

I have a strange (for me) problem here:

I use stop command to close program. After that I try to start it again. However, it wont start because one of the needed component fails to start. That is caused propably because the failing component is still running (obviously as a ghost pid). Now Im asking is there any way to terminate these kind of "floating" processes?
# 2  
Old 05-15-2004
Thanks for your reply,

Mayby I should clarify the situation:

So when I close the program (which has 5 child processes) everything seems to be ok. But when I try to start it again, it says one of the five child processes is already running and won't start. So what I'm looking for, is a way to make sure all child processes are closed when the parent is closed. Now I have to manually close that one running "ghost/zombie or running process" Smilie

I don't mean someone have to do this for me (but I don't mind if someone wants to Smilie ) but I'd like to have some tips where to start to struggle this problem.
# 3  
Old 05-17-2004
i have came to this irritational situation before. Its quite troublesome getting this zombies. Till i managed to write a script and place it in my .logout for which it will clear all the zombie process automatically.

Code:
#!/bin/csh

ps -ef |grep defunct |grep -v grep > /tmp/zom
cat /tmp/zom | awk '{print $2 " " $3}' > /tmp/zom.pid
foreach d (`cat /tmp/zom.pid`)
kill -9 $d
end

For your information defunct is the died process. Each dead process is been marked as defunct by the kernel which will be listed as Zombie process if you do a top.
# 4  
Old 05-18-2004
Thanks once again for your replies, especially you killerserv Smilie That script is something like I was looking for.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Flashcopy, ghost hdisk ??

Hi all, I'm getting some errors on AIX regarding Flashcopy and volume group hard disks. The script that activates flashcopy showed this errors: Recreating Flashcopy for lun01_A1 Performing syntax check... Syntax check complete. Executing script... Script execution complete. SMcli... (1 Reply)
Discussion started by: enux
1 Replies

2. UNIX for Dummies Questions & Answers

ghost 4 unix

Hello, I am looking for help on how to use ghost 4 unix. I know there is a site for ghost 4 unix, but if I understood that I wouldn't be here. Everything is already set up, there is a ftp server, iomega network hard drive, there are already images on this network harddrive. I know how to use the... (0 Replies)
Discussion started by: slakk
0 Replies

3. UNIX for Dummies Questions & Answers

Need to get pid of a process and have to store the pid in a variable

Hi, I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this. Thanks in advance, Amudha (7 Replies)
Discussion started by: samudha
7 Replies

4. UNIX for Dummies Questions & Answers

ghost file, delete help

I'm trying to delete a folder in my trash that contains no files or hidden files and nothing happens. It is still there. However, when I try to delete everything in the folder in terminal I receive an error: Ti?ng Viê?t.html: No such file or directory. I can't find this file anywhere on my tiger... (1 Reply)
Discussion started by: jopper
1 Replies

5. UNIX for Dummies Questions & Answers

Session PID & socket connection pid

1. If I use an software application(which connects to the database in the server) in my local pc, how many PID should be registered? Would there be PID for the session and another PID for socket connection? 2. I noticed (through netstat) that when I logged in using the my software application,... (1 Reply)
Discussion started by: pcx26
1 Replies

6. AIX

Ghost Users

I am having a problem that I cannot figure out. RS6000 server running AIX 5.2. Users connect via TCP/IP and login and work just fine. When the user logs out of the application, I can run the "who" command or "w" command and the O/S still reports the user as logged in. If I run "ps -tpts/xx"... (2 Replies)
Discussion started by: Docboyeee
2 Replies

7. Programming

printing ppid,child pid,pid

question: for the below program i just printed the value for pid, child pid and parent pid why does it give me 6 values? i assume ppid is 28086 but can't figure out why there are 5 values printed instead of just two! can someone comment on that! #include<stdio.h> #define DIM 8 int... (3 Replies)
Discussion started by: a25khan
3 Replies

8. UNIX for Dummies Questions & Answers

Can I ghost a Unix Box ? with another

I have a Solaris Ultra 10 Box, which contains all my software, I got a new Sun Ultra10 with the same configuration. Can I ghost the it ? Does Unix support any such application. (6 Replies)
Discussion started by: stephen104
6 Replies

9. UNIX for Dummies Questions & Answers

logoff ghost user

I just noticed by running a who command that I was logged in twice . So two admin2 are on the list. (solaris 2.6) Since I telnet using a windows 98, I suppose that I forgot to CTRL-D last time I logged in and clicked on hangup. In such a case, how can I loggoff the old ghost loggin ? It's not a... (4 Replies)
Discussion started by: phpote
4 Replies

10. UNIX for Dummies Questions & Answers

PS finds a ghost?

Hello, I have problems executing a script in ksh with this script named process.sh: ps -ef | grep process.sh | grep -v grep | wc -l | read a if then echo "The script is running" exit 0 fiThe problem is that when I execute the script, sometimes it shows the message "The script is... (10 Replies)
Discussion started by: jguirao
10 Replies
Login or Register to Ask a Question