CGI parsing status.log speed issues
Mooney, Ryan
ryan.mooney at pnl.gov
Wed Jul 30 23:16:27 CEST 2003
Yeah, its slow with large service/host sets. There is a fix in the works
(I haven't checked if its fully in CVS yet or not). Basically the problem is that
there is a linked list that gets traversed exp(host*services) worst case when parsing
the status file. That can take a really long time, and is being replaced by a hash
insert/lookup that should be several orders of magnitude faster. Unless your
willing mess with stuff from CVS (wich looks to be changing fairly quickly so
the stability is - unknown) I'd say the static pages are probably the safest bet.
Once V2.0 is released this problem will go away. Last I heard that will be this
fall, maybe sooner if someone kicks in some $$ to help Ethan and freinds :)
If you feel adventurous you could try playing with a lightweight php interface
to the status file: available at: http://www.pcslink.com/~ryan/ You should only
have to change where the cgi.ini file can be found in inc.php for it to work.
Its sort of a cludge as I ran out of memory when trying to read the whole file
into the php hash (while maintaining a reasonable 16M limit to php), so I back
hacked in some logic into the inc.php file that originally was only supposed to
be in index.php. I also didn't spend a whole lot of time on it, so its ugly,
and doesn't have any of the acknowledge, comment, etc.. features (which could
be added as seperate php files pretty easily). But it only takes <10 seconds
for >8000 service/host definitions :>
> -----Original Message-----
> From: Jason Lancaster [mailto:jlancaster at affinity.com]
> Sent: Wednesday, July 30, 2003 12:20 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] CGI parsing status.log speed issues
>
>
> Hello,
> I've run into a small problem with the Nagios CGI's -- They
> take forever
> to parse. The status log is only (or maybe this is large...)
> 1MB in size.
>
> I'm running the status log off a ramdisk and can't think of
> anything to
> do other than push more memory/cpu at the problem or run cron jobs to
> dump common pages (such as the status overview and summary) to a raw
> html file. Does anyone had any experience with tweaking the CGI's for
> faster processing? If so, what did you remove or change?
>
> Thanks,
> Jason
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet
> _072303_01/01
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS
> when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list