Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support Check hung process and restart Post 302634149 by Scrutinizer on Thursday 3rd of May 2012 02:08:04 AM
Old 05-03-2012
Code:
/etc/rc.d/init.d/networker status

appears to just list the processes. Probably the best thing to do in your script is to just issue a
Code:
/etc/rc.d/init.d/networker stop
/etc/rc.d/init.d/networker start

If that does not work, then perhaps there is a -f option to /usr/sbin/nsr_shutdown. Probably this is better than kill. Consult your manual and/or your Networker support organization.
This User Gave Thanks to Scrutinizer For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

SCO Openserver 5.0.7 Hung process problem

Hi guys I installed this new server with 5.0.7 openserver and i'm getting a lot of this process, if a stop and restart the printer spooler they go away but after a few minutes they appear again.This is how it looks like. root 372 615 0 - - 00:00:00 <defunct> root ... (0 Replies)
Discussion started by: josramon
0 Replies

2. Shell Programming and Scripting

need help to write script to check the process health and automatically restart it

I am working on a project, which need to constantly watch the process, and check its status, if it was dead, it should be restart automatically. Please kindly refer me to URL which teach how to write this kind of script, or service. Thanks. (1 Reply)
Discussion started by: dragondad
1 Replies

3. SuSE

Restart process

I have a process that gradually eats up memory, it's currently at 80.2% and slowing down the linux server > ps aux | grep SNMPME root 3129 0.0 80.2 3591752 2480700 ? Sl Feb13 5:04 /opt/nampe/lib/snmpme/SNMPME config/startup.xml Is there a command I can execute to restart this... (3 Replies)
Discussion started by: brendan76
3 Replies

4. Shell Programming and Scripting

Monitoring for a hung process

A coworker has a shell script that runs from a scheduler at the 3am. The shell script runs sqlplus passing in a sql statement, which generate a file. This is done 21 times for 21 different sql statements. Recently, one of the sqlplus processes got hung. Is there a way to monitor how long the... (2 Replies)
Discussion started by: prismtx
2 Replies

5. Shell Programming and Scripting

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,... (2 Replies)
Discussion started by: ukndoit
2 Replies

6. Shell Programming and Scripting

Script to restart a process

I have written a script which checks for a file if that is being updated or not. If the files is not being updated then it will restart the process. #!/bin/sh DATE=`date +%Y%m%d%H%M%S` LOG_FILE=/var/xmp/log/XMP_* INCEPT=`ls -l $LOG_FILE |awk '{print $5}'` PROC=`xms show pr |grep -i... (3 Replies)
Discussion started by: Siddheshk
3 Replies

7. Shell Programming and Scripting

Script to restart process

HI, I am trying to write a scrip which would restart active process. This is what i have written till now. $ xms show pr PRESE.* NAME STATUS ROLE PID RSTRTS STARTED MACHINE... (8 Replies)
Discussion started by: Siddheshk
8 Replies

8. Red Hat

How to find the process which is caused system hung state?

when system is hung state due to swap, we will reboot it through ILO. i want to know which process caused system hung. (1 Reply)
Discussion started by: Naveen.6025
1 Replies

9. UNIX for Dummies Questions & Answers

View User Mode Call Stack of Hung Process

I have a multithreaded usermode program(actually a daemon) which is in hanged state. To debug it I tried attaching the process to gdb, but the gdb hangs. gstack also gets hanged. I peeped into the proc file system and saw the process to be in sleeping state. /proc/sysrq-trigger I guess... (1 Reply)
Discussion started by: rupeshkp728
1 Replies

10. Shell Programming and Scripting

How to check if the process is Hung?

I wish to monitor if my Tomcat process if Running, Hung, or Shutdown. I cannot use any third party monitoring tools so i decided to use one of these to test if the tomcat server is responding or not . 1. nslookup 2. telnet 3. ps The reason I do not use wget / curl is because it will... (2 Replies)
Discussion started by: mohtashims
2 Replies
WATCHQUAGGA(8)						      System Manager's Manual						    WATCHQUAGGA(8)

NAME
watchquagga - a program to monitor the status of quagga daemons SYNOPSIS
watchquagga [option...] daemon... watchquagga -h | -v DESCRIPTION
watchquagga is a watchdog program that monitors the status of supplied quagga daemons and tries to restart them in case they become unre- sponsive or shut down. To determine whether a daemon is running, it tries to connect to the daemon's VTY UNIX stream socket, and send echo commands to ensure the daemon responds. When the daemon crashes, EOF is received from the socket, so that watchquagga can react immediately. This program can run in one of the following 5 modes: Mode 0: monitor In this mode, the program serves as a monitor and reports status changes. Example usage: watchquagga -d zebra ospfd bgpd Mode 1: global restart In this mode, whenever a daemon hangs or crashes, the given command is used to restart all watched daemons. Example usage: watchquagga -dz -R '/sbin/service zebra restart; /sbin/service ospfd restart' zebra ospfd Mode 2: individual daemon restart In this mode, whenever a single daemon hangs or crashes, the given command is used to restart this daemon only. Example usage: watchquagga -dz -r '/sbin/service %s restart' zebra ospfd bgpd Mode 3: phased zebra restart In this mode, whenever a single daemon hangs or crashes, the given command is used to restart this daemon only. The only exception is the zebra daemon; in this case, the following steps are taken: (1) all other daemons are stopped, (2) zebra is restarted, and (3) other daemons are started again. Example usage: watchquagga -adz -r '/sbin/service %s restart' -s '/sbin/service %s start' -k '/sbin/service %s stop' zebra ospfd bgpd Mode 4: phased global restart for any failure In this mode, whenever a single daemon hangs or crashes, the following steps are taken: (1) all other daemons are stopped, (2) zebra is restarted, and (3) other daemons are started again. Example usage: watchquagga -Adz -r '/sbin/service %s restart' -s '/sbin/service %s start' -k '/sbin/service %s stop' zebra ospfd bgpd Important: It is believed that mode 2 (individual daemon restart) is not safe, and mode 3 (phased zebra restart) may not be safe with cer- tain routing daemons. In order to avoid restarting the daemons in quick succession, you can supply the -m and -M options to set the minimum and maximum delay between the restart commands. The minimum restart delay is recalculated each time a restart is attempted. If the time since the last restart attempt exceeds twice the value of -M, the restart delay is set to the value of -m, otherwise the interval is doubled (but capped at the value of -M). OPTIONS
-d, --daemon Run in daemon mode. When supplied, error messages are sent to Syslog instead of standard output (stdout). -S directory, --statedir directory Set the VTY socket directory (the default value is "/var/run/quagga"). -e, --no-echo Do not ping the daemons to test whether they respond. This option is necessary if one or more daemons do not support the echo com- mand. -l level, --loglevel level Set the logging level (the default value is "6"). The value should range from 0 (LOG_EMERG) to 7 (LOG_DEBUG), but higher number can be supplied if extra debugging messages are required. -m number, --min-restart-interval number Set the minimum number of seconds to wait between invocations of the daemon restart commands (the default value is "60"). -M number, --max-restart-interval number Set the maximum number of seconds to wait between invocations of the daemon restart commands (the default value is "600"). -i number, --interval number Set the status polling interval in seconds (the default value is "5"). -t number, --timeout number Set the unresponsiveness timeout in seconds (the default value is "10"). -T number, --restart-timeout number Set the restart (kill) timeout in seconds (the default value is "20"). If any background jobs are still running after this period has elapsed, they will be killed. -r command, --restart command Supply a Bourne shell command to restart a single daemon. The command string should contain the '%s' placeholder to be substituted with the daemon name. Note that -r and -R options are not compatible. -s command, --start-command command Supply a Bourne shell command to start a single daemon. The command string should contain the '%s' placeholder to be substituted with the daemon name. -k command, --kill-command command Supply a Bourne shell command to stop a single daemon. The command string should contain the '%s' placeholder to be substituted with the daemon name. -R, --restart-all When one or more daemons are shut down, try to restart them using the Bourne shell command supplied on the command line. Note that -r and -R options are not compatible. -z, --unresponsive-restart When a daemon is in an unresponsive state, treat it as being shut down for the restart purposes. -a, --all-restart When zebra hangs or crashes, restart all daemons taking the following steps: (1) stop all other daemons, (2) restart zebra, and (3) start other daemons again. Note that this option also requires -r, -s, and -k options to be specified. -A, --always-all-restart When any daemon (i.e., not just zebra) hangs or crashes, restart all daemons taking the following steps: (1) stop all other daemons, (2) restart zebra, and (3) start other daemons again. Note that this option also requires -r, -s, and -k options to be specified. -p filename, --pid-file filename Set the process identifier filename (the default value is "/var/run/quagga/watchquagga.pid"). -b string, --blank-string string When the supplied string is found in any of the command line option arguments (i.e., -r, -s, -k, or -R), replace it with a space. This is an ugly hack to circumvent problems with passing the command line arguments containing embedded spaces. -v, --version Display the version information and exit. -h, --help Display the usage information and exit. SEE ALSO
zebra(8), bgpd(8), isisd(8), ospfd(8), ospf6d(8), ripd(8), ripngd(8) See the project homepage at <http://www.quagga.net/>. AUTHORS
Copyright 2004 Andrew J. Schorr July 2010 WATCHQUAGGA(8)
All times are GMT -4. The time now is 04:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy