CPU leak on nagios-2.0b2

Andreas Ericsson ae at op5.se
Mon Feb 28 09:51:19 CET 2005


Dmitriy Kirhlarov wrote:
> Hi!
> 
> On Fri, Feb 25, 2005 at 08:57:50AM -0500, Subhendu Ghosh wrote:
> 
>> Can you track which processes are taking CPU via top? Is it just
>> the main Nagios process or the cumulative of the Nagios processes
>> (fork for every check..)
> 
> 
> It's main Nagios process. TIME column ~500.
> 
> 
>> i.e. right after startup - all the init work is done. read config,
>>  determine scheduling queue etc...
> 
> 
> We are recompile nagios without embedded perl and without perlcache.
> We are replace all perl checks with C checks. CPU load stabilize near
> 20%. It's very good! It's work!!! But I have not perl. :(
> 

You can still run perl plugins, just without the caching. Embedded perl 
leaks memory. If enough memory leaks, the system will start swapping and 
you'll see a dramatic load increase. It's nothing miraculous about it.

Even so, replacing perl checks with C-coded ones where possible is a 
Good Thing, but it doesn't mean you have to give up perl-based checks 
altogether. If you want to optimize the plugins that work, remove the 
-wT switches from the hashbang line (i.e. #!/usr/bin/perl instead of 
#!/usr/bin/perl -wT) and remove the strict pragma (comment out use 
strict;), since it causes perl to parse the plugin twice before 
compiling and running. The performance is near enough that of embedded 
perl for me not to care about the difference.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click




More information about the Developers mailing list