Re: Monitoring Script
This WebDNA talk-list message is from 2008
It keeps the original formatting.
numero = 69678
interpreted = N
texte = I have a shell script I wrote to monitor our WebDNA boxes. Seems to work fairly well. Modify paths as needed:#!/bin/shrestartWebDNA() { echo "WebDNA Dead... Restarting... Reset Count $restartCount" if [ "$restartCount" = "x" ]; then cd /www/cgi-bin/WebCatalogEngine/ killall WebCatalog killall -9 WebCatalog ./WebCatalog & > /dev/null else cd /www/cgi-bin/WebCatalogEngine/ killall WebCatalog sleep 1; killall -9 WebCatalog /www/bin/apachectl stop sleep 1; killall -9 httpd /www/bin/apachectl start ./WebCatalog & > /dev/null fi restartCount=`expr $1 + 1` sleepCount=`expr $restartCount \* 15` logFile=$(tail -n 40 /www/logs/access_log) DNAlogFile=$(tail -n 100 /www/cgi-bin/WebCatalogEngine/WebDNA \ -\ Commerce\ Edition.debug) # echo -e "$2\n\n$logFile\n\n$DNAlogFile" | /usr/sbin/sendmail your@email.com sleep $sleepCount}sleep 10while [ 1 ]do DNAoutput=$(curl -s --connect-timeout 45 -m 45 http://localhost/ cgi-bin/WebCatalogEngine/Admin/Uptime.tpl) if [ "$DNAoutput" = "Sorry WebDNA server not running. body>" ]; then restartWebDNA $restartCount NOTRUNNING; elif [ "$DNAoutput" = "" ]; then restartWebDNA $restartCount NORESPONSE; else restartCount=0; echo "WebDNA Running... $DNAoutput" sleep .1 fidone--Jesse Proudman, Blue Box Group, LLCOn Jan 15, 2008, at 9:51 AM, Donovan Brooke wrote:> Clint Davis wrote:>> Chris,>> We've had several different developers writing WebDNA over the >> last 8 years,>> so the problem is most likely bad code. I just don't want to take >> the time>> to comb through 75 sites to find the bad code when it's going to be>> completely re-written in PHP very soon.>>> well then, go over to the linux forums and have them write a shell > script for you?>>> Donovan>>>>> -- > =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o> DONOVAN D. BROOKE EUCA Design Center> <- Web Development (specializing in eCommerce),->> <- Desktop Publishing, Print Consulting, Labels ->> <-Glass Products, off-hand Classes/studio rental->> PH:>(608) 770-3822> TALK:>http://artglass-forum.com> WEB:> http://www.euca.us & http://www.egg.bz> =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list
.> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to digest@talk.smithmicro.com>> Web Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
I have a shell script I wrote to monitor our WebDNA boxes. Seems to work fairly well. Modify paths as needed:#!/bin/shrestartWebDNA() { echo "WebDNA Dead... Restarting... Reset Count $restartCount" if [ "$restartCount" = "x" ]; then cd /www/cgi-bin/WebCatalogEngine/ killall WebCatalog killall -9 WebCatalog ./WebCatalog & > /dev/null else cd /www/cgi-bin/WebCatalogEngine/ killall WebCatalog sleep 1; killall -9 WebCatalog /www/bin/apachectl stop sleep 1; killall -9 httpd /www/bin/apachectl start ./WebCatalog & > /dev/null fi restartCount=`expr $1 + 1` sleepCount=`expr $restartCount \* 15` logFile=$(tail -n 40 /www/logs/access_log) DNAlogFile=$(tail -n 100 /www/cgi-bin/WebCatalogEngine/WebDNA \ -\ Commerce\ Edition.debug) # echo -e "$2\n\n$logFile\n\n$DNAlogFile" | /usr/sbin/sendmail your@email.com sleep $sleepCount}sleep 10while [ 1 ]do DNAoutput=$(curl -s --connect-timeout 45 -m 45 http://localhost/ cgi-bin/WebCatalogEngine/Admin/Uptime.tpl) if [ "$DNAoutput" = "Sorry WebDNA server not running. body>" ]; then restartWebDNA $restartCount NOTRUNNING; elif [ "$DNAoutput" = "" ]; then restartWebDNA $restartCount NORESPONSE; else restartCount=0; echo "WebDNA Running... $DNAoutput" sleep .1 fidone--Jesse Proudman, Blue Box Group, LLCOn Jan 15, 2008, at 9:51 AM, Donovan Brooke wrote:> Clint Davis wrote:>> Chris,>> We've had several different developers writing WebDNA over the >> last 8 years,>> so the problem is most likely bad code. I just don't want to take >> the time>> to comb through 75 sites to find the bad code when it's going to be>> completely re-written in PHP very soon.>>> well then, go over to the linux forums and have them write a shell > script for you?>>> Donovan>>>>> -- > =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o> DONOVAN D. BROOKE EUCA Design Center> <- Web Development (specializing in eCommerce),->> <- Desktop Publishing, Print Consulting, Labels ->> <-Glass Products, off-hand Classes/studio rental->> PH:>(608) 770-3822> TALK:>http://artglass-forum.com> WEB:> http://www.euca.us & http://www.egg.bz> =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to digest@talk.smithmicro.com>> Web Archive of this list is at: http://webdna.smithmicro.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Jesse Proudman
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Server crash (1997)
More than one db with the same namn (was: WC2f3) (1997)
Just a thought (1998)
[OT Rebound] how to set w* backgroundserver (2002)
is this how [break] works? (1998)
A little syntax help (1997)
WebCommerce: Folder organization ? (1997)
Email Formatting (1998)
TCPconnect to DNS (2000)
UPDATE PROBLEM (1997)
[shell] (2003)
Help name our technology! (1997)
WebCat editing, SiteGuard & SiteEdit (1997)
WebCat2 Append problem (B14Macacgi) (1997)
New index for docs (1997)
IIS4b2 and WebCatalog b19 (1997)
Bug Report, maybe (1997)
Another question (1997)
Just a thought (1998)
WebCat B13 Mac CGI -- Frames question (1997)