Sponsored Content
Top Forums Shell Programming and Scripting zombie processes and hung process termination Post 302175065 by ukndoit on Thursday 13th of March 2008 01:15:38 AM
Old 03-13-2008
zombie processes and hung process termination

Is there a way I can run a command that will run in the kernel or in the memory and automatically kill certain scripts if they get to <defunct> processes, without having to be monitoring the server manually?

I have a Perl script which runs for 20k members and normally does not have any problems, but today, like 8 times I seen an overload of processes that just seemed to 'hang' there with the same pid number and script name, and a few of them had <defunct> running there.
I have heard of something called a kill daemon, but don't know where to find details on how to program it.

Here is an example of what I seen:
Pid Owner Priority Cpu % Mem % Command
4613 username 0 29.0 1.0 perl -w web.cgi
4614 username 0 17.0 0.2 perl -w index.cgi
4616 username 0 27.0 0.0 [web.cgi] <defunct>
15519 username 0 0.1 0.0 perl -w web.cgi
15520 username 0 0.1 0.0 perl -w web.cgi
15521 username 0 0.1 0.0 perl -w web.cgi
15523 username 0 0.1 0.0 perl -w web.cgi
15535 username 0 0.1 0.0 perl -w web.cgi
15559 username 0 0.1 0.0 perl -w web.cgi


among other things
when that happened, the script web.cgi did not load, when it did, it took like 10 minutes to load! Crazy...
Normally we have no problems, so I ran a trace on a few of the pid processes.
I cannot tell what was causing the overload.
right now there appear to be 39 people on the website and no problems the processes are popping in and out as they should...

Anyhow I would appreciate any advice anyone can offer.

Thank you much,
Richard
 

10 More Discussions You Might Find Interesting

1. Programming

handling abnormal process termination

hi i m writin a program in which i keep track of all the child processes the program has generated and if a child process has an abnormal termination i need to do certain task related to that child process. for handlin child process i used waitpid: temp_cpid=waitpid(-1,&stat,WUNTRACED); ... (4 Replies)
Discussion started by: mridula
4 Replies

2. UNIX for Advanced & Expert Users

Monitoring Processes - Killing hung processes

Is there a way to monitor certain processes and if they hang too long to kill them, but certain scripts which are expected to take a long time to let them go? Thank you Richard (4 Replies)
Discussion started by: ukndoit
4 Replies

3. Programming

zombie to exist after the termination of main program..

main() { pid_t child; child=fork(); if(child > 0) {sleep(60); } else {exit(0); } } the above code will create zombie process,which will be adopted by init as soon as parent process will dies.Can any one gimme a code or an alogrithm to keep this zombie proocess alive even after... (6 Replies)
Discussion started by: anilchowdhury
6 Replies

4. UNIX for Dummies Questions & Answers

whats the difference between zombie orpha and defunct processes

can some one please explain zombie orphan defunct and how they r related (3 Replies)
Discussion started by: pbsrinivas
3 Replies

5. Shell Programming and Scripting

Zombie process

Hi I need help because I don't know if it is possible to add a find inside a cat. like I have a file with the pid of the process that use to became zombie. And I have the same pid stored in the var (pid1) now, I have no clue how to check if the the find finds the pid or even if it's... (2 Replies)
Discussion started by: ruben.rodrigues
2 Replies

6. Red Hat

Zombie Process Termination Time

Hey, I've got a program that fork's a list of child processes, and keeps their pid's in a list. After the parent finishes it's main business logic, it needs to check which child already finished - and when. Is it possible - using waitpid or any other func\syscall - get this information... (0 Replies)
Discussion started by: sternr
0 Replies

7. AIX

zombie process

Is there an equivilant to the preap command in AIX that would allow me to get rid of a zombie process. I am new to AIX, moving over from Solaris and in the past I have been able to preap the pid on the defunct process to clean them up. I have looked around and the best I can see is that it may... (3 Replies)
Discussion started by: sboots
3 Replies

8. Shell Programming and Scripting

Finding the age of a unix process, killing old processes, killing zombie processes

I had issues with processes locking up. This script checks for processes and kills them if they are older than a certain time. Its uses some functions you'll need to define or remove, like slog() which I use for logging, and is_running() which checks if this script is already running so you can... (0 Replies)
Discussion started by: sukerman
0 Replies

9. UNIX for Advanced & Expert Users

Zombie process

What is the overhead associated with zombie process?Is it running out of process-ID?:confused: Since some information is stored in process table.. Thanks in Advance (4 Replies)
Discussion started by: jois
4 Replies

10. Shell Programming and Scripting

Help with zombie processes

:)how do we list zombie processes in unix server??? :confused: (3 Replies)
Discussion started by: nikhil jain
3 Replies
cachemgr.cgi(8) 					      System Manager's Manual						   cachemgr.cgi(8)

NAME
cachemgr.cgi - squid HTTP proxy manager interface SYNOPSIS
http://your.server/cgi-bin/cachemgr.cgi DESCRIPTION
The cache manager (cachemgr.cgi) is a CGI utility for displaying statistics about the Squid HTTP proxy process as it runs. The cache man- ager is a convenient way to manage the cache and view statistics without logging into the server. FILES
./cachemgr.conf @DEFAULT_CACHEMGR_CONFIG@ The access configuration file defining which Squid servers may be managed via this cachemgr.cgi program. Each line specifies a server:port followed by an optional description The server name may contain shell wildcard characters such as *, [] etc. A quick selection dropdown menu is automatically con- structed from the simple server names. Specifying :port is optional. If not specified then the default proxy port is assumed. :* or :any matches any port on the target server. SECURITY
cachemgr.cgi calls the requested server on the requested port using HTTP and returns a formatted version of the response. To avoid abuse it is recommended to configure your web server to restrict access to the cachemgr.cgi program. Configuration examples for many common web servers can be found in the Squid FAQ. SEE ALSO
squid(8) The Squid FAQ, Chapter 9 The Cache Manager Squid Web Proxy 3.1.20 cachemgr.cgi(8)
All times are GMT -4. The time now is 08:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy