<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Josh,
<blockquote
cite="mid:BANLkTiniNKGBgQYdTm+uA1+4OOTGXvPJAg@mail.gmail.com"
type="cite">That probably makes more sense then to use Lynx, good
idea.<br>
<br>
What's with the "x" in the variable?<br>
<br>
</blockquote>
If for some reason $COL is the null string, the test doesn't work.
Add an "x" in front to be sure.<br>
<blockquote
cite="mid:BANLkTiniNKGBgQYdTm+uA1+4OOTGXvPJAg@mail.gmail.com"
type="cite">Would you mind telling me what values you used for
date?<br>
<br clear="all">
</blockquote>
It's just adding a timestamp to the log file. See "man date"<br>
<br>
$ date "+%x %X restarting purple devmon"<br>
31/05/2011 16:16:04 restarting purple devmon<br>
<br>
David.<br>
<blockquote
cite="mid:BANLkTiniNKGBgQYdTm+uA1+4OOTGXvPJAg@mail.gmail.com"
type="cite">Josh Luthman<br>
Office: 937-552-2340<br>
Direct: 937-552-2343<br>
1100 Wayne St<br>
Suite 1337<br>
Troy, OH 45373<br>
<br>
<br>
<div class="gmail_quote">On Tue, May 31, 2011 at 12:53 AM, David
Baldwin <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:david.baldwin@ausport.gov.au">david.baldwin@ausport.gov.au</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div class="im">On 31/05/11 11:24 AM, <a
moz-do-not-send="true" href="mailto:kconnell@ryerson.ca">kconnell@ryerson.ca</a>
wrote:<br>
> I've had issues with devmon not updating the bb-display
and everything going purple.<br>
> I've had this issue since day one (which is over two
years now).<br>
><br>
> I created a "devmon watchdog" script that's runs every
5 min using lynx (txt base html browser) which checks if the
status of devmon (shows as dm test) on bb-monitor. If its
purple then I kill the devmon process and start it up
again....band-aid solution, but it does the trick.<br>
><br>
> I no script expert, but can share the bash script if
you want/need.<br>
><br>
</div>
Here's mine (replace xymonserver with your hostname):<br>
<br>
#!/bin/sh<br>
COL=`bb xymonserver "hobbitdboard <a moz-do-not-send="true"
href="http://xymonserver.dm" target="_blank">xymonserver.dm</a>
fields=color"`<br>
if [ "x$COL" == "xpurple" ] ; then<br>
(date "+%x %X restarting purple devmon"<br>
/etc/init.d/devmon restart) | tee /var/log/devmon-restart.log
| mail<br>
-s "Restarting devmon" xymonadmin<br>
fi<br>
<div class="im"><br>
--<br>
David Baldwin - IT Unit<br>
Australian Sports Commission <a
moz-do-not-send="true" href="http://www.ausport.gov.au"
target="_blank">www.ausport.gov.au</a><br>
Tel 02 62147830 Fax 02 62141830 PO Box 176 Belconnen
ACT 2616<br>
<a moz-do-not-send="true"
href="mailto:david.baldwin@ausport.gov.au">david.baldwin@ausport.gov.au</a>
Leverrier Street Bruce ACT 2617<br>
<br>
<br>
-------------------------------------------------------------------------------------<br>
</div>
Keep up to date with what's happening in Australian sport
visit <a moz-do-not-send="true"
href="http://www.ausport.gov.au" target="_blank">http://www.ausport.gov.au</a><br>
<div class="im"><br>
This message is intended for the addressee named and may
contain confidential and privileged information. If you are
not the intended recipient please note that any form of
distribution, copying or use of this communication or the
information in it is strictly prohibited and may be
unlawful. If you receive this message in error, please
delete it and notify the sender.<br>
</div>
-------------------------------------------------------------------------------------<br>
</blockquote>
</div>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
David Baldwin - IT Unit
Australian Sports Commission <a class="moz-txt-link-abbreviated" href="http://www.ausport.gov.au">www.ausport.gov.au</a>
Tel 02 62147830 Fax 02 62141830 PO Box 176 Belconnen ACT 2616
<a class="moz-txt-link-abbreviated" href="mailto:david.baldwin@ausport.gov.au">david.baldwin@ausport.gov.au</a> Leverrier Street Bruce ACT 2617
</pre>
</body>
</html>