Re: Stability complaints

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 40413
interpreted = N
texte = On 6/3/02 4:26 PM, Ben Swihart wrote:> 1. Where is the error log that you read the output from the crash? > 2. Will you share the WebCatalog restart script? I know the command to > restart the server, but how do you run the script on crash? > > Running : OS 10.1.2, Webcat 4.0.something I just took webcatalogs own WebCatalogCtl script in the engine folder and moved it to a special place I keep all my server scripts and then call it periodically from the crontab like this:* * * * * root /Users/bob/Documents/Scripts/WebCat_kpup startIt checks constantly if webcats running and if its not it starts it, if it is then it just ignores it.#!/bin/sh # # the path to your PID file PIDFILE=/Library/WebServer/CGI-Executables/WebCatalogEngine/WebCatalog.pid # # the path to your WebCatalog binary, including options if necessary WEBCATALOG=/Library/WebServer/CGI-Executables/WebCatalogEngine # ERROR=0 ARGV=$@ if [ x$ARGV = x ] ; then ARGS=help fi for ARG in $@ $ARGS do # check for pidfile if [ -f $PIDFILE ] ; then PID=`cat $PIDFILE` if [ ! x$PID = x ] && kill -0 $PID ; then STATUS=WebCatalog (pid $PID) running RUNNING=1 else STATUS=WebCatalog (pid $PID?) not running RUNNING=0 fi else STATUS=WebCatalog (no pid file) not running RUNNING=0 fi case $ARG in start) if [ $RUNNING -eq 1 ]; then continue fi if [ -f $WEBCATALOG/WebCatalog ] ; then cd $WEBCATALOG $WEBCATALOG/WebCatalog& echo $0 $ARG: WebCatalog started else echo $0 $ARG: WebCatalog does not exist ERROR=3 fi ;; stop) if [ $RUNNING -eq 0 ]; then echo $0 $ARG: $STATUS continue fi if kill -2 $PID ; then echo $0 $ARG: WebCatalog stopped else echo $0 $ARG: WebCatalog could not be stopped ERROR=4 fi ;; restart) if [ $RUNNING -eq 0 ]; then echo $0 $ARG: WebCatalog not running, trying to start if [ -f $WEBCATALOG/WebCatalog ] ; then cd $WEBCATALOG $WEBCATALOG/WebCatalog& echo $0 $ARG: WebCatalog started else echo $0 $ARG: WebCatalog could not be started ERROR=5 fi else if kill $PID ; then if [ -f $WEBCATALOG/WebCatalog ] ; then cd $WEBCATALOG $WEBCATALOG/WebCatalog& echo $0 $ARG: WebCatalog restarted else echo $0 $ARG: does not exist ERROR=6 fi else echo $0 $ARG: WebCatalog could not be restarted fi fi ;; *) echo usage: $0 (start|stop|restart|help) cat <. To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Stability complaints (Bob Minor 2002)
  2. Re: Stability complaints (Dale LaFountain 2002)
  3. Re: Stability complaints (Bob Minor 2002)
  4. Re: Stability complaints (Ben Swihart 2002)
  5. Re: Stability complaints (Dale LaFountain 2002)
On 6/3/02 4:26 PM, Ben Swihart wrote:> 1. Where is the error log that you read the output from the crash? > 2. Will you share the WebCatalog restart script? I know the command to > restart the server, but how do you run the script on crash? > > Running : OS 10.1.2, Webcat 4.0.something I just took webcatalogs own WebCatalogCtl script in the engine folder and moved it to a special place I keep all my server scripts and then call it periodically from the crontab like this:* * * * * root /Users/bob/Documents/Scripts/WebCat_kpup startIt checks constantly if webcats running and if its not it starts it, if it is then it just ignores it.#!/bin/sh # # the path to your PID file PIDFILE=/Library/WebServer/CGI-Executables/WebCatalogEngine/WebCatalog.pid # # the path to your WebCatalog binary, including options if necessary WEBCATALOG=/Library/WebServer/CGI-Executables/WebCatalogEngine # ERROR=0 ARGV=$@ if [ x$ARGV = x ] ; then ARGS=help fi for ARG in $@ $ARGS do # check for pidfile if [ -f $PIDFILE ] ; then PID=`cat $PIDFILE` if [ ! x$PID = x ] && kill -0 $PID ; then STATUS=WebCatalog (pid $PID) running RUNNING=1 else STATUS=WebCatalog (pid $PID?) not running RUNNING=0 fi else STATUS=WebCatalog (no pid file) not running RUNNING=0 fi case $ARG in start) if [ $RUNNING -eq 1 ]; then continue fi if [ -f $WEBCATALOG/WebCatalog ] ; then cd $WEBCATALOG $WEBCATALOG/WebCatalog& echo $0 $ARG: WebCatalog started else echo $0 $ARG: WebCatalog does not exist ERROR=3 fi ;; stop) if [ $RUNNING -eq 0 ]; then echo $0 $ARG: $STATUS continue fi if kill -2 $PID ; then echo $0 $ARG: WebCatalog stopped else echo $0 $ARG: WebCatalog could not be stopped ERROR=4 fi ;; restart) if [ $RUNNING -eq 0 ]; then echo $0 $ARG: WebCatalog not running, trying to start if [ -f $WEBCATALOG/WebCatalog ] ; then cd $WEBCATALOG $WEBCATALOG/WebCatalog& echo $0 $ARG: WebCatalog started else echo $0 $ARG: WebCatalog could not be started ERROR=5 fi else if kill $PID ; then if [ -f $WEBCATALOG/WebCatalog ] ; then cd $WEBCATALOG $WEBCATALOG/WebCatalog& echo $0 $ARG: WebCatalog restarted else echo $0 $ARG: does not exist ERROR=6 fi else echo $0 $ARG: WebCatalog could not be restarted fi fi ;; *) echo usage: $0 (start|stop|restart|help) cat <. To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Bob Minor

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:

NT 4.0/IIS WebCat Installation (1998) Multiple catalog databases and showcart (1997) Date Range Sorting (1997) Webmerchant (1999) OT: Program Length parameters in an MP3 (2001) reserved characters for field names? (1998) WebCat2b12 Mac.acgi--[searchstring] bug (1997) replace problem (1999) Emailer update for Mac? (1998) Refering page (1998) Test (2002) Bug? (1997) OT: Poll Please (2002) WebCatalog2 Feature Feedback (1996) HELP WITH DATES (1997) Install Webcatalog under NT4.0 and Microsoft IIS 2.0 (1997) [WebDNA] Issues regarding static vs. dynamic pages (2011) ExclusiveLock (2000) WebDNA tags in WebMerchant email templates ... (1997) Summing fields (1997)