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.
Code:
#!/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 INTERCEPT |awk '{print $1}' |grep $(hostname)`
if [ $INCEPT -gt 0 ]; then
echo " log files are working fine !!! "
fi
sleep 30
if [ $INCEPT -gt 0 ]; then
echo " log files are working fine !!! "
elif
echo " log files are not working, Please Check immeiately "
printf "***** XMP Application Alert System *****\n\nHost: `hostname` \n\nHost_Address: \n\nInfo: Interceptor Freezed \n\nDATE:`date` \n\n" | /bin/mail -s "Host `hostname` --INTERCEPT MANAGER is freezed, Restarting...Please Check Immeiately " siddhesh.khavnekar@mobixell.com
then #restart interceptor process
`xms restart proc $PROC`
fi
This script works fine, but i have a concern here.
LOG_FILE=/var/xmp/log/XMP_* --> Here there may be 2 fils, and i wish to check the latest file by time.
Hi,
I have a task that Im stuck on. I have an elementary script named 'myscript' that prints "the script is running" once a second. It runs for 27 seconds. I need to write a 2nd script that starts 'myscript' and takes a parameter '$1' for a number. my 2nd script then needs to pause myscript... (1 Reply)
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)
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)
Hi all.
I do have a script "startApp.sh" (app result is a file /opt/extract/appextract.txt)
I have no problems with stopping app
var1=`ps -ef | grep -v grep | grep MyApp | awk '{print $2}'`
kill -9 $var1
What I want to achieve is:
I start app, app is doing some extraction, after... (11 Replies)
Hi, I have a PHP application that starts a couple of processes on the server...the problem is that if I restart apache those running apps will die.
How can I start them in a way that they are not killed when I restart/stop apache ?
$cmdstr = "nohup ".$config."/".$config."... (6 Replies)
I have posted this on the Web subforum but it seems that nobody knows to do this, maybe someone has a solution here. Thank you
I have a PHP application that starts a couple of processes on the server...the problem is that if I restart apache those running apps will die.
How can I start them... (1 Reply)
Hi all
I have networker running on a RHEL 5.7 and over time it hangs. So the solution backup team proposed is to check if the process is hung, to stop and start it.
Unfortunately for me, the rc script only allows three commands, start, stop and status (no restart option) so I managed to set... (15 Replies)
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)
Hi all,
Tearing my hair out..!
I have a requirement to monitor and restart a unix process via a simple watchdog script.
I have the following 3 scripts that dont work for me..
script 1 (only produces 1 output if process is up or not)... (4 Replies)
Hi Guru's,
I just want to have an idea on how to restart a particular step when it fails?
SCENARIO
we have plenty of steps such as the following below:
Step 1
copy file from source to target location which is in a different server.
Step 2
create initial and incremental process
... (4 Replies)
Discussion started by: reignangel2003
4 Replies
LEARN ABOUT DEBIAN
checker
checker(1) General Commands Manual checker(1)NAME
checker - SPARK Proof Checker
SYNOPSIS
checker [OPTIONS] [FILE]
DESCRIPTION
The SPARK Proof Checker can be used to discharge verification conditions produced by the Examiner (*.vcg), possibly simplified by the Sim-
plifier (*.siv). This command is usually used when verification conditions cannot be discharged automatically by the Simplifier.
By default checker runs in interactive mode. It accepts commands from user and writes them into a cmd file (or other file specified by
-command_log option). This file can be used later to run checker in batch mode (using option -execute). Additionally, proof log is writ-
ten into a plg file.
OPTIONS
A summary of options is included below. All options may be abbreviated to the shortest unique prefix.
-help Show summary of options.
-version
Display version information.
-plain Adopt a plain output style (e.g. no dates or version numbers).
-overwrite_warning
Confirmation needed to overwrite command or proof log files.
-command_log=LOG_FILE
Specify file name for the command log file.
-proof_log=PLG_FILE
Specify file name for the proof log file.
-execute=LOG_FILE
Execute a previously generated command log file.
-resume
Resume a previously saved session.
FILES
/usr/share/spark/checker/rules/*
Checker rules database.
SEE ALSO spark(1), sparksimp(1), spadesimp(1), pogs(1).
AUTHOR
This manual page was written by Eugeniy Meshcheryakov <eugen@debian.org>, for the Debian project (and may be used by others).
3 June 2011 checker(1)