[Nagiosplug-help] check_mailq under AIX 4.3.3

Nick.Tschannen at isceco.admin.ch Nick.Tschannen at isceco.admin.ch
Tue Feb 25 01:17:06 CET 2003


Hello, 

I had a little problem whit check_mailq under AIX 4.3.3:
When i tried to execute check_mailq i got the following result:

	AIX@:/nagios/libexec> ./check_mailq -w 10 -c 20
	Use of uninitialized value in concatenation (.) or string at
./check_mailq line 109.
	Use of uninitialized value in concatenation (.) or string at
./check_mailq line 109.
 	| mailq =
	Use of uninitialized value in exit at ./check_mailq line 110.

The problem is, under AIX the mailq-command has another output than under
Linux or Solaris:

	AIX@:/nagios/libexec> mailq
	The mail queue is empty.

	Linux-Solaris#> mailq
	/var/spool/mqueue is empty

As a workaround i changed the following line in check_mailq from:

	# only first line is relevant in this iteration.
	while (<MAILQ>) {
	==>>    if (/mqueue/) {
To:
	# only first line is relevant in this iteration.
	while (<MAILQ>) {
	==>>    if (/queue/) { 

This works for me and maybe it helps some other people...

Nick Tschannen


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I |
S |  Nick Tschannen
C |  Betriebe & Produktion / UNIX
e |  Gueterstrasse 24
c |  3003 - Bern
o |  --------------------------------------
/ |  Tel: +41 31 325 04 55
E |  Fax: +41 31 324 95 99
V |  email: nick.tschannen at isceco.admin.ch
D |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





More information about the Help mailing list