If you are using perl, see Parallel::ForkManager
(http://search.cpan.org/author/DLUX/Parallel-ForkManager-0.7.5/ForkManager.p
m).

Almost all of our monitors are perl based. Our monitoring stations are
starting to get their asses kicked with all the scripts firing. 

To save perl startup time, would it be worth while to add the ability to
tell mon to fork and eval the application if it is a perl script?

Out.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Jim Trocki
Sent: Wednesday, June 18, 2003 5:52 AM
To: Aled Treharne
Cc: [EMAIL PROTECTED]
Subject: Re: Calling alerts and monitors


On Wed, 18 Jun 2003, Aled Treharne wrote:

> Simply put then, does mon call
> the monitor/alert scripts as 'external applications' (i.e. if I write 
> a shell script/python app will it execute it?)?

yes. the details about how a monitor is invoked and what the mon server
expects from it can be found in the man page for mon under the "monitor
programs" heading. you will also find that the monitors distributed with mon
are written in various languages, and can serve as good examples if you are
learning to write your own monitor. some are better examples than others :)

depending on the application, it may be a good plan for the monitor to
parallelize its checking. for example, the fping.monitor script accepts a
number of hosts on the command line, and rather than pinging them serially,
on after the next, it asynchronously sends out the ping requests and
collects the replies as they arrive. the phttp.monitor operates similarly.

the advantage to this parallelization is that enables your monitoring to
perform better when you are monitoring a large number of systems. mon itself
schedules multiple monitors in parallel, and it is the responsibility of
monitors to perform their own parallelization if necessary.

_______________________________________________
mon mailing list
[EMAIL PROTECTED] http://linux.kernel.org/mailman/listinfo/mon


_______________________________________________
mon mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to