Andrew, I tested your locktest.alert and it worked fine for me. Since then
I have taken the fake script and comment out the log function but no
change. Here are the fake script, mon config and fake.alert:

 The fake program is (See attached file: fake)
and my configuration is :

#
# Very simple mon.cf file
#
# $Id: very-simple.cf,v 1.2 1999/08/16 00:25:06 trockij Exp $
#
alertdir   = /usr/src/mon-0.38.16/alert.d
mondir     = /usr/src/mon-0.38.16/mon.d
# maxprocs    = 20
histlength = 100
# randstart = 60s
#
# define groups of hosts to monitor
#
hostgroup server1 9.117.99.214
hostgroup server2 9.117.99.217
hostgroup vip 9.117.99.200
watch server1
    service telnet
        interval 45s
        monitor telnet.monitor
        description Telnet Real Server for DEMO of LVS
        period wd {Mon-Fri}
            alert mail.alert root
            alert netpage.alert [EMAIL PROTECTED]
            alertevery 10m
            upalert mail.alert root
            upalert netpage.alert [EMAIL PROTECTED]
            alert lvs.alert -P tcp -V 9.117.99.200:23 -R 9.117.99.214:23 -W
1 -F
 tun
            upalert lvs.alert -P tcp -V 9.117.99.200:23 -R 9.117.99.214:23
-W 1
-F tun -u
    service http
        interval 30s
        monitor http.monitor
        description WAS Real Server for DEMO of LVS
        period wd {Mon-Fri}
            alert mail.alert root
            alert netpage.alert [EMAIL PROTECTED]
            alertevery 10m
            upalert mail.alert root
            upalert netpage.alert [EMAIL PROTECTED]
            alert lvs.alert -P tcp -V 9.117.99.200:80 -R 9.117.99.214:80 -W
1 -F
 tun
            upalert lvs.alert -P tcp -V 9.117.99.200:80 -R 9.117.99.214:80
-W 1
-F tun -u
watch server2
    service telnet
        interval 45s
        monitor telnet.monitor
        description Telnet Real Server for DEMO of LVS
        period wd {Mon-Fri}
            alert mail.alert root
            alert netpage.alert [EMAIL PROTECTED]
            alertevery 10m
            upalert mail.alert root
            upalert netpage.alert [EMAIL PROTECTED]
            alert lvs.alert -P tcp -V 9.117.99.200:23 -R 9.117.99.217:23 -W
1 -F
 tun
            upalert lvs.alert -P tcp -V 9.117.99.200:23 -R 9.117.99.217:23
-W 1
-F tun -u
    service http
        interval 30s
        monitor http.monitor
        description WAS Real Server for DEMO of LVS
        period wd {Mon-Fri}
            alert mail.alert root
            alert netpage.alert [EMAIL PROTECTED]
            alertevery 10m
            upalert mail.alert root
            upalert netpage.alert [EMAIL PROTECTED]
            alert lvs.alert -P tcp -V 9.117.99.200:80 -R 9.117.99.217:80 -W
1 -F
 tun
            upalert lvs.alert -P tcp -V 9.117.99.200:80 -R 9.117.99.217:80
-W 1
-F tun -u
watch vip
    service http
        interval 30s
        monitor newlvs.monitor -p 80
        description Dynamic Real Servers Cloning Demo
        period wd {Mon-Fri}
            alert mail.alert root
    service fping
        interval 25s
        monitor fping.monitor -r 3 -t 5000
        description Bring up Fake for the first time
        period wd {Mon-Sun}
            alert fake.alert -d
Fake alert is :

#!/usr/bin/perl
#
# fake.alert - bring up or remove fake
#
use Getopt::Std;
getopts ("s:g:h:t:l:u:r:d");
open (FILE,">>/var/log/fake.log");

$host = $opt_h;
$serv = $opt_s;
$grp  = $opt_g;


print FILE "$host \n";

if ($opt_r) {
   print FILE "removing $host fake\n";
   system("fake remove $host");}
else   {
   print FILE "starting $host fake\n";
   system("fake $host&");}
if ($opt_d) {
   print FILE "disabling $serv service on group $grp\n";
   sleep (5);
   `moncmd -s localhost disable service vip fping`;}
close FILE;
exit 0


Carlos :-)


There is a saying: Great minds think alike - I think that is wrong - Great
minds think for themselves!

Carlos A. Ordonez
IBM Corporation
Server Consolidation



|---------+--------------------------->
|         |           Andrew Ryan     |
|         |           <andrewr@nam-shu|
|         |           b.com>          |
|         |           Sent by:        |
|         |           owner-mon@linux.|
|         |           kernel.org      |
|         |                           |
|         |                           |
|         |           11/02/2001 02:33|
|         |           AM              |
|         |                           |
|---------+--------------------------->
  
>-------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                                           |
  |        To:      Carlos Ordonez/Poughkeepsie/IBM@IBMUS                              
                                           |
  |        cc:      [EMAIL PROTECTED]                                               
                                           |
  |                 From:                                                              
                                           |
  |               Subject:      Re: mon 0.99.2 can't submit background command         
                                           |
  |                                                                                    
                                           |
  
>-------------------------------------------------------------------------------------------------------------------------------|




Please reply to the list, rather than just me. There's a much better chance
someone else might be able to help. If this is a bug in mon we would like
as many people to see it as possible so that it can get fixed more quickly.

If you could give us your config file and fake program you're using that
might give us more to go on. The only thing I can possibly think of is some
conflict between STDOUT and STDERR from the parent and child processes
causing weirdness, see 'perldoc -q background' for details:
               STDIN, STDOUT, and STDERR are shared
                    Both the main process and the backgrounded one
                    (the "child" process) share the same STDIN,
                    STDOUT and STDERR filehandles.  If both try to
                    access them at once, strange things can
                    happen.


I tried setting up a simple alert that invoked another shell script with
0.99.2, and it didn't hang mon when it ran.

locktest.alert:
#!/usr/bin/perl
system("/home/andrewr/bin/test.sh&");
exit 0;

/home/andrewr/bin/test.sh:
#!/bin/sh
echo "This is a really simple script which does something"
ls /
sleep 90


At 04:04 PM 10/30/01 -0500, you wrote:

>Andrew, thanks for answering. The fake program is a gratuitous arp
program.
>Fake itself is not hanging is mon the one that hangs. fake starts and it
>stays up and works but mon is waiting for the alert to finish (or at least
>it looks that way).  Just last week, I did the implementation of mon using
>the 0.38.16 version and everything worked. This week I was going to do a
>DEMO (tomorrow) and I (because I am masochist) decided to convert
>everything to the new version. I guess I will not demo this portion. As
>soon as the alert happens and I submit the background command, if you try
>to issue a monshow it hangs and so the mon.cgi. Everyone is waiting for
the
>alert to finish. Thanks for any help you can provide. Carlos :-)
>
>PS - I am running mon in Linux for S/390.


Attachment: fake
Description: Binary data

Reply via email to