Re: Includes in mon?

2002-05-21 Thread kyle
Just wanted to thank everyone on their responses and pointers. They all have been a great help. I'll be bugging the list again shortly, so watch out ;) Also, just looking at the mail archives, seems that not all user contributed monitors/tools are on kernel.org. Anyone have any recommendations on

Re: Includes in mon?

2002-05-21 Thread Andrew Ryan
On Monday 20 May 2002 08:46 pm, you wrote: > Im just starting out with mon, and find it very cool, but also some things > are a pain. I have various hostgroups, which all need a core set of > services checked, then some other services which are unique to the > hostgroup. Example: > > The DNS hostg

Re: monitor a pid?

2002-05-21 Thread Ed Ravin
Scott Prater writes: > > I believe the "unary operator expected" error is occurring in the line: > > if [ $9 = "-u" ]; then > > Whenever I do shell scripting, I always use the trick explained in _Unix > Power Tools_: instead of > if [ $9 = "-u" ] > do > if [ "X$9" = "X-u" ] > > That w

RE: monitor a pid?

2002-05-21 Thread Ralph.Bugg
Your right! my bad... I'll have to claim the excuse of trying to write too many csh scripts (and perl) which does use '==' for the comparison operator for it's builtin test operator. (my shell is tcsh and my .tcshrc/.login scripts are way more complex than they really need be, I don't u

RE: monitor a pid?

2002-05-21 Thread Scott Prater
Actually in plain vanilla sh the string comparison operator *is* "=", not "==" (although bash will accept either). One of those gotchas designed to drive Perl and C programmers nuts. Scott Prater Dpto. Sistemas [EMAIL PROTECTED] SERVICOM 2000 Av. Primado Reig, 189 entlo. 46020 Valencia - Spain

Re: Includes in mon?

2002-05-21 Thread Jim Trocki
On Mon, 20 May 2002, kyle wrote: > etc..So, is there a way for me to do an include where we have something > like: mon supports automatic pre-processing of config files with m4 if you either append ".m4" to the end of the filename or if you start the server with the "-M" option. since gnu m4 has

RE: monitor a pid?

2002-05-21 Thread Ralph.Bugg
Peter, The problem is with the code if [ $9 = "-u" ]; then $HEARTBEAT restart else $HEARTBEAT stop fi What you really want is if [ $9 == "-u"]; then the single '=' is for assignment, not for testing equiviance... What's happening is that the heartbeat isn't running and

RE: monitor a pid?

2002-05-21 Thread Scott Prater
I believe the "unary operator expected" error is occurring in the line: if [ $9 = "-u" ]; then Whenever I do shell scripting, I always use the trick explained in _Unix Power Tools_: instead of if [ $9 = "-u" ] do if [ "X$9" = "X-u" ] That way, the test will never fail, even if $9 doesn