Re: [Nagios-users] Nagios 3.0b5 - ePN and perl caching

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-users] Nagios 3.0b5 - ePN and perl caching

Post by Guest »

I am posting this to the devel list to see if anyone has any answers.

I look through the code and I don't see how the package that is created for
the plugin is being uncached when the mtime changes. Can someone point me
in the code where this is taking place. The problem I am having is
definitely being caused by the package not being removed from memory.

Running perl 5.8.8

----
Larry Low
4150 N Drinkwater Blvd., 5th Floor
Scottsdale, AZ 85251
Office: 480.385.7045
E-mail: [email protected]'

Telesphere Networks, Inc


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Larry Low
Sent: Friday, October 12, 2007 10:56 AM
To: [email protected]
Subject: Re: [Nagios-users] Nagios 3.0b5 - ePN and perl caching
[SEC=UNCLASSIFIED]

I guess the question is how to unload the perl package that the plugin is
wrapped in.

----
Larry Low
4150 N Drinkwater Blvd., 5th Floor
Scottsdale, AZ 85251
E-mail: [email protected]'

Telesphere Networks, Inc


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Larry Low
Sent: Friday, October 12, 2007 10:44 AM
To: [email protected]
Subject: Re: [Nagios-users] Nagios 3.0b5 - ePN and perl caching
[SEC=UNCLASSIFIED]

I had been compiling without perl cache so that would explain why $delete
was being set to 1. The problem must be in getting rid of the old cached
script. I am digging deeper.

----
Larry Low
4150 N Drinkwater Blvd., 5th Floor
Scottsdale, AZ 85251
E-mail: [email protected]'

Telesphere Networks, Inc


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Larry Low
Sent: Friday, October 12, 2007 10:13 AM
To: [email protected]
Subject: Re: [Nagios-users] Nagios 3.0b5 - ePN and perl caching
[SEC=UNCLASSIFIED]

Thanks Stanley,

Using my check_ifoperstatus script. Available from
http://www.nagiosexchange.org/Networkin ... pi1[p_view]
=1099

I've done a few minutes of debugging and the first problem I see is the
MTIME is
not being populated. Here is my epn_leave-msgs.log. I added
print LH "$filename - $mtime = ".$Cache{$filename}[MTIME]."\n";
while (my ($key,$value) = each %Cache) {
foreach (@$value) {
print LH "$key - $_\n";
}
}
right before it compares mtime and you will see below that MTIME is not
populated.

I also added a couple logs where MTIME is supposed to be set.
print LH "$mtime ";
$Cache{$filename}[MTIME] = $mtime
unless $delete ;
print LH $Cache{$filename}[MTIME]."\n";

You will see below that $mtime is fine but $Cache{$filename}[MTIME] is not.

I changed
$Cache{$filename}[MTIME] = $mtime
unless $delete ;
to
$Cache{$filename}[MTIME] = $mtime;
and the problem goes away.

I tested for $delete and it is being set to 1 every time. What is calling
eval_file? Is this from the nagios core?

************** epn_leave-msgs.log
/opt/nagios/libexec/check_ifoperstatus.pl - 2.96796296296296 =
2.96796296296296
Fri Oct 12 10:00:29 2007 eval_file: successfully compiled
"/opt/nagios/libexec/check_ifoperstatus.pl -H XXXX -C XXXX -k 0 -I -N
Gi0/0 --cacti_database=cacti_2 --cacti_password=XXXX".
Fri Oct 12 10:00:29 2007 run_package:
"/opt/nagios/libexec/check_ifoperstatus.pl
-H XXXX -C XXXX -k 0 -I -N Gi0/0 --cacti_database=cacti_2
--cacti_password=XXXX" returning (0, "OK - Interface 'Gi0/0' is
'up(1)' - (index 1)").

/opt/nagios/libexec/check_ifoperstatus.pl - 2.96796296296296 =
/opt/nagios/libexec/check_ifoperstatus.pl -
/opt/nagios/libexec/check_ifoperstatus.pl - HASH(0x9267264)
/opt/nagios/libexec/check_ifoperstatus.pl -
/opt/nagios/libexec/check_ifoperstatus.pl - CODE(0x9276778)
2.96796296296296
Fri Oct 12 10:00:59 2007 eval_file: syntax error in
/opt/nagios/libexec/check_ifoperstatus.pl: "Subroutine print_help redefined
at
(eval 9) line 295,".
**************

Dest.gov.au> writes:


...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked