Monitor to check I/O of /dev/ttyS0

2005-07-22 Thread rueh hänä
Hi all

Im wondering, if there is a possibility to create a monitor, that checks the
I/O of the serial interface. 
But my programming knowledge isnt that good, that i could know, how to
realize such monitor. 

-- 
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse f�r Mail, Message, More +++

___
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon


Re: too many mon processes

2005-07-22 Thread David Nolan



--On Thursday, July 21, 2005 11:46 PM +0300 Razvan Cojocaru <[EMAIL PROTECTED]> 
wrote:




Hello.

I've been using mon for a while now, to monitor about 30 servers, with
different services.
It worked great, using mon-0.99.2-r1 (gentoo).

Now i moved it to another server, dedicated only to monitoring.
It's using the same version, the same mon/auth.cf files.

After few hours of running, i have more than one mon running.

part of the ps ax |grep mon looks like this

17563 ?S  0:00 /usr/bin/perl /usr/sbin/mon -P /tmp/mon.pid -f
17567 ?S  0:00 /usr/bin/perl /usr/sbin/mon -P /tmp/mon.pid -f
17569 ?Z  0:00 [mon] 
17570 ?S  9:51 /usr/bin/perl /usr/sbin/mon -P /tmp/mon.pid -f
17550 ?S  0:00 /usr/bin/perl /usr/sbin/mon -P /tmp/mon.pid -f
28725 ?S  2:12 /usr/bin/perl /usr/sbin/mon -P /tmp/mon.pid -f

there are more processes, but i only pasted a few (more  mon's
too)

anyone have a solution for this? what's the reason for using a pid file
if it spawns more processes?
the pid file contains the pid of the last process, so it's writable, no
problem there.

i have maxprocs = 200 if that helps.




Do those mon processes stick around, or are they just the shortlived 
results of a fork to run an alert?


I'm guessing most of them are shortlived, but it looks like you've got two 
mon processes that have been around for a while.


What version of mon are you running?  There was a bug in one of the pre 
versions where the fork to run an alert could end up not aborting when 
done.  Resulting in two running mon processes.  I think thats fixed in the 
current CVS version, and didn't exist in 0.99.2.


-David


David Nolan<*>[EMAIL PROTECTED]
curses: May you be forced to grep the termcap of an unclean yacc while
 a herd of rogue emacs fsck your troff and vgrind your pathalias!

___
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon


Re: sqlconn.monitor problems

2005-07-22 Thread Stephane Bortzmeyer
On Fri, Jul 22, 2005 at 08:54:23AM +0200,
 Dguez. Dorado, Manuel <[EMAIL PROTECTED]> wrote 
 a message of 61 lines which said:

> Where must I put the user

Reading the source, it seems you put it in the environment variable
ORACLE_USERID.

> /password entries for Oracle databases?

Reading the source, it does not seem possible.

___
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon


Re: Monitor to check I/O of /dev/ttyS0

2005-07-22 Thread Jim Trocki

On Fri, 22 Jul 2005, "rueh hänä" wrote:


Hi all

Im wondering, if there is a possibility to create a monitor, that checks the
I/O of the serial interface.


yes, there is a 100% possibility :)
___
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon


Re: too many mon processes

2005-07-22 Thread David Nolan

Lets keep this on the mailing list, so others can follow along...


--On Friday, July 22, 2005 2:28 PM +0300 Razvan Cojocaru <[EMAIL PROTECTED]> 
wrote:

I think they just stick around.
Runs fine for a few hours, but then more processes apear.
The actual monitoring still works, alerts are sent, but mon.cgi doesn't
work. The page keeps loading, and nothing is displayed. If i do a killall
mon, imediately the page loads fine, but complains about the daemon not
running.



I'm guessing most of them are shortlived, but it looks like you've got
two mon processes that have been around for a while.

What version of mon are you running?  There was a bug in one of the
pre versions where the fork to run an alert could end up not aborting
when done.  Resulting in two running mon processes.  I think thats
fixed in the current CVS version, and didn't exist in 0.99.2.


As i said, version is mon-0.99.2-r1 (as gentoo says)


Oops, I missed that before in your original message.

I just went back and read the 0.99.2 code and found the bug I was referring 
to *did* exist in that code.  You've got an alert script which is failing 
to be executed.  Mon may be sysloging a message indicating which one is the 
failure.  I *highly* recommend you upgrade to the 1.1pre1 version, as it 
has many bug fixes.  If you can't do that, here's the one line change you 
need to make.  Search for a passage in mon that looks like:

   if (!exec @execargs) {
   syslog ('err', "could not exec alert $alert: $!");
   return undef;
   }

And change the 'return undef;' to 'exit(1);'






and i have another question.
the number of maxprocs is set to 200.

i'm monitoring a total of 102 services

grep service /etc/mon/mon.cf |wc -l
102

Is there a relation between those two numbers? about 30 of those 102 are
every minute, others are 3 minutes apart, others 5 minutes.



There is a relation, but its not what you're thinking it is.  maxprocs is 
the maximum number of child process mon will run at the same time.  If your 
monitor scripts take a long time to complete, you need the number to be 
high enough that all your scripts can be scheduled on a regular basis.  But 
if your scripts are all shortlived (most are), then its just used as a way 
to prevent mon from spawning everything at once during a restart or other 
unusual event.  200 is almost certainly *way* higher then you need.  From 
my overloaded mon server:

% grep service mon.cfg | wc
   7042219   23043
% grep maxprocs mon.cfg
maxprocs = 20

(This server runs about 500K tests per day...)

-David

David Nolan<*>[EMAIL PROTECTED]
curses: May you be forced to grep the termcap of an unclean yacc while
 a herd of rogue emacs fsck your troff and vgrind your pathalias!

___
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon