This might get you started - this version ignores any output from check_Network and only restarts if check_Network times out.
You could redirect the output of check_Network to a file and process the file at the bottom of this script checking for other conditions that require a restart.
I'd suggest running this script every 20min from cron rather that having it sleep and loop all the time.
Last edited by Chubler_XL; 02-25-2014 at 04:43 PM..
Reason: Spelling
These 3 Users Gave Thanks to Chubler_XL For This Post:
I have a monitoring script that checks on the content of an alert file, I'm doing some checks on weather I have already reported on the alert (there is one alert per file). If I find that the content is the same as before how can I stop and restart the loop until there is differences bewteen the... (5 Replies)
Hello,
I host a couple of Call of Duty gameing servers. There are some hackers who love the crash them. When they crash them it simply causes a segmentaion fault and kills the PID. I was wondering it you could help me write a script to simply restart the program after it has been crashed. The... (9 Replies)
:confused: Everytime our UNIXWARE 7 Server is restarted we also have to restart the spooler. If the spooler is not restarted, print jobs get stuck in the queu. Once restarted by using the following command lpstop and lpstart everything works fine.
Does anyone have any ideas what could be causing... (0 Replies)
Hello people,
My solaris server is rebooting, not sure how!!! Which log should I look in to? I checked /var/adm/messages and dmesg also. How do I check older dmesg logs? I checked lastlog and also ran the last command. Nothing useful pointing to why server rebooted.
Also when server reboots I... (4 Replies)
Hi,
I use gfortran to run the code. Some times I need to stop the program
and restart it. On restarting I need to run the program from the beginning.
Is there any script or option available to restart the program from where
it stopped? This script/option will be immensely useful for... (2 Replies)
Hi,
I need a script to kill the process Ids for the user ABC.
I prepared the following script after that while logging with user therough script i am not sure how to pass the user name and password.Can ou modify the script and help me out.
#!/bin/bash
for filesize in $(ls -ltr | grep... (4 Replies)
Hi,
How is it possible to restart only your process. I can get the process killed but I am not able to start it.
For eg : i first did this ps -ef|grep _out --displays all the process with _out in the name
then I killed kill -15 36044 -- process id.
Now how can i start the same... (1 Reply)
Hi guys,
one of my services in solaris 10 is in maintenance mode. When I checked why, the reason is that the service is "restarting too quickly."
# svcs -x svc:/application/management/snmpdx:default
svc:/application/management/snmpdx:default (Sun Solstice Enterprise Master Agent)
State:... (2 Replies)
Environment: SUSE 10.3
I made a configuration change in '/etc/syslog-ng/syslog-ng.conf' file in a server.
An article found on web says "After the change '/etc/init.d/syslog-ng' should be restarted". But there is no 'syslog-ng' in /etc/init.d directory.
What is syslog-ng or a... (4 Replies)
Hello,
In our Production system one process is in S state(interruptible)and after killing and restarting the process gives 'advertise error'.
This error goes after rebooting the Server.
I have RHEL 5.9 (tikanga) OS in our server.
We tried debugging the issue with the help of 'strace' command... (9 Replies)
Discussion started by: Rohits
9 Replies
LEARN ABOUT DEBIAN
alarm
ALARM(2) Linux Programmer's Manual ALARM(2)NAME
alarm - set an alarm clock for delivery of a signal
SYNOPSIS
#include <unistd.h>
unsigned int alarm(unsigned int seconds);
DESCRIPTION
alarm() arranges for a SIGALRM signal to be delivered to the calling process in seconds seconds.
If seconds is zero, no new alarm() is scheduled.
In any event any previously set alarm() is canceled.
RETURN VALUE
alarm() returns the number of seconds remaining until any previously scheduled alarm was due to be delivered, or zero if there was no pre-
viously scheduled alarm.
CONFORMING TO
SVr4, POSIX.1-2001, 4.3BSD.
NOTES
alarm() and setitimer(2) share the same timer; calls to one will interfere with use of the other.
sleep(3) may be implemented using SIGALRM; mixing calls to alarm() and sleep(3) is a bad idea.
Scheduling delays can, as ever, cause the execution of the process to be delayed by an arbitrary amount of time.
SEE ALSO gettimeofday(2), pause(2), select(2), setitimer(2), sigaction(2), signal(2), sleep(3), time(7)COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2008-06-12 ALARM(2)