Event Profiler Patch

Steven D. Morrey smorrey at ldschurch.org
Mon Jun 8 17:13:32 CEST 2009


I made it a compile time option in my patch for ease of insertion in the existing code base.
It would be trivial to convert it to a config file option.
Just add a new option and track it with a global variable, then search and replace all of the #ifdef EVENT_PROFILE tags with a simple if(gEvent_Profile_Enabled)
After that it's just a matter of tracking down the unmatched #endif's and that should be it.
If there is interest in it, I can update the code to do this and submit a new patch.

Sincerely,
Steve
________________________________________
From: Andreas Ericsson [ae at op5.se]
Sent: Saturday, June 06, 2009 10:31 AM
To: hir3npatel at gmail.com; Nagios Developers List
Subject: Re: [Nagios-devel] Event Profiler Patch

Hiren Patel wrote:
> Andreas Ericsson wrote:
>> Mathieu Gagné wrote:
>>> On 6/5/09 6:29 PM, Steven D. Morrey wrote:
>>>> p.s.  Let me know how that patch goes on a 3x system I don't have a
>>>> running 3x to test it on, so all i can promise with that one is that it compiles :)
>>> I'm trying it on a Nagios 3.0.6 system. Note that I had to remove all
>>> references to EVENT_CHECK_PROGRAM_UPDATE because it's an event only
>>> available in Nagios 3.1.x.
>>>
>>> All volatile data are already located on tmpfs partitions. So I'll have
>>> to try without tmpfs partitions afterward so I can compare impact on
>>> performances.
>>>
>> Steve, thanks for the patch. Mathieu, thanks for testing it out. If it's
>> useful to you, I'll apply it and make sure it's included in 3.1.1. The
>> data we might be able to gather from it may well be important for the
>> 3.2.0 release.
>>
> what would be the impact of having this feature be a configuration
> setting in nagios.cfg, instead of having to compile with a flag to get
> the behavior? I'm wondering if it would be useful to be able to switch
> it on to get some information (perhaps during diagnosing something) and
> switch it off again if it's not wanted, without needing to recompile
> nagios for this?
>

One cmp+branch for each event executed. Almost certainly not too expensive.
Especially if gcc can be convinced that it *not* being set is the normal
case and optimize for it.

--
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


 NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.



------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects




More information about the Developers mailing list