From: Ben C. <BCl...@pe...> - 2004-12-01 16:32:30
|
Yves wrote: > Hi again :) > > I fixed the problem in 0.104.1ym3. > Some system put #include <locale.h> in their libintl.h and others don't. > I now make a check on it in the configure script. > > I would just like to know on what system (linux, solaris, ...) and version you have the > problem, if you don't mind. > > Yves I can let you know on SUSE 9.1 soon.... Ben > > >>FYI >> >>To resolve the compile problems. >> >>I added >>#include <locale.h> >>after >>#include <config.h> >>in the following files. >> >>perfparsed.c perfpparse-db-purge.c >>perfparse-db-tool.c perfparse-log2any.c >>perfgraph.c perfgant.c perfchart.c >> >> >>Hope this helps and Thanks for the clues. >> >>-----Original Message----- >>From: Yves [mailto:yme...@pe...] >>Sent: Tuesday, November 30, 2004 12:11 PM >>To: Stu...@am... >>Cc: per...@li... >>Subject: RE: [Perfparse-users] perfparsed & CPU usage >> >>Try 0.104.1ym2 that fix a bug for perfparsed. >>About your bug, it is probably some #include <gettext.h> that should be >>after #include >><config.h> and that is not. >>I'll have a look on that tomorrow. >> >>Yves >> >> >>>FYI >>> >>>I did a compile last night of 104.1ym1 and got this error. >>> >>>make[2]: Entering directory >> >>`/opt/src/nagios/perfparse-0.104.1ym1/perfparse' >> >>>if gcc -DHAVE_CONFIG_H -I. -I. -I.. >> >>'-DSYSCONFDIR="/usr/local/nagios/etc"' >> >>>'-DLOCALEDIR="/usr/local/nagios/share/locale"' >>>-I/usr/local/glib/include/glib-2.0 -I/usr/local/glib/lib/glib-2.0/include >>>-I../libpp_common -I../libnagios_perfdata_parser -I../modules -I.. -O3 >>>-mcpu=ultrasparc -Wall -MT perfparse_log2any-perfparse-log2any.o -MD -MP >> >>-MF >> >>>".deps/perfparse_log2any-perfparse-log2any.Tpo" \ >>> -c -o perfparse_log2any-perfparse-log2any.o `test -f >> >>'perfparse-log2any.c' >> >>>|| echo './'`perfparse-log2any.c; \ >>>then mv ".deps/perfparse_log2any-perfparse-log2any.Tpo" >>>".deps/perfparse_log2any-perfparse-log2any.Po"; \ >>>else rm -f ".deps/perfparse_log2any-perfparse-log2any.Tpo"; exit 1; \ >>>fi >>>perfparse-log2any.c: In function `main': >>>perfparse-log2any.c:137: warning: implicit declaration of function >>>`setlocale' >>>perfparse-log2any.c:137: error: `LC_ALL' undeclared (first use in this >>>function) >>>perfparse-log2any.c:137: error: (Each undeclared identifier is reported >> >>only >> >>>once >>>perfparse-log2any.c:137: error: for each function it appears in.) >>>make[2]: *** [perfparse_log2any-perfparse-log2any.o] Error 1 >>>make[2]: Leaving directory >> >>`/opt/src/nagios/perfparse-0.104.1ym1/perfparse' >> >>>make[1]: *** [all-recursive] Error 1 >>>make[1]: Leaving directory `/opt/src/nagios/perfparse-0.104.1ym1' >>>make: *** [all] Error 2 >>> >>>-----Original Message----- >>>From: Yves [mailto:yme...@pe...] >>>Sent: Tuesday, November 30, 2004 2:37 AM >>>To: Stu...@am... >>>Cc: per...@li... >>>Subject: RE: [Perfparse-users] perfparsed & CPU usage >>> >>> >>> >>>>The "perfparse-0.104.1ym1" is >>>>Not found on >>>>http://pagesperso.laposte.net/ymettier/perfparse-devel >>> >>>You found it thanks to my other email :) >>>For the doc, check the last version here : >>>http://pagesperso.laposte.net/ymettier/perfparse-devel/perfparse-doc/ >>>("Install guide in one html page per section" in not available yet) >>> >>>Ben, this will be in 0.104.1ym2 for future 0.104.2 :) >>> >>>Comments below... >>> >>> >>>>I did check out the perfparse-doc while I was there. >>>>Here is some suggestions to hopefully >>>>To help improve the documentation for: >>>> >>>>Chapter5: Method 4. >>>> >>>>To create a perfparse.cfg config file using the defaults: >>>>./perfparsed --show_config # To see current config. >>>>Or to create a new 1 to compare to current: >>>>./perfparsed --show_config > /var/tmp/perfparse.cfg >>> >>>Those lines were improved and moved to the chapter <using perfparse> :) >>> >>> >>>>With nagios-1.2 edit misccommands.cfg and comment out the following >>>>Definitions for host and service performance data: >>>>Define command{ >>>> command_name process-host-perfdata >>>>.... >>>>} >>>>and >>>> >>>>Define command{ >>>> Command_name process-service-perfdata >>>>.... >>>>} >>>> >>>> >>>>Then in the nagios.cfg verify the following are in the file: >>>> >>>>cfg_file=/usr/local/nagios/etc/nagios_perfparse.cfg >>>>process_performance_data=1 >>>>host_perfdata_command=process-host-perfdata >>>>service_perfdata_command=process-service-perfdata >>>> >>>>In the perfparse.cfg make sure the the variable Service_log is set to: >>>>Service_log = "|/path/to/the/pipe" >>>> Example: >>>> Service_log = >>>>"|/usr/local/nagios/var/rw/serviceperf.log >>>>Note: >>>>Permissions for "serviceperf.log" need to be set so nagios daemon can >>>>Write to the FIFO. Also make sure serviceperf.log file is not present >>>>When starting the perfparsed. >>> >>>the fifo can already exist with 0.104.1. You are true with 0.103.X :) >>> >>>No more comments below. >>>Thanks for your contribution, >>> >>>Yves >>> >>> >>> >>>>Finally in the nagios_perfparse.cfg file: >>>> >>>>define_command{ >>>> command_name process-service-perfdata >>>> command_line $USER2$/bin/perfparse_nagios_pipe.command.pl >>>>/path/to/the/pipe "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" "$OUTPUT$" >>>>"$SERVICESTATE$" "$PERFDATA$" >>>> } >>>> >>>>Example: >>>> >>>>Define_command{ >>>> command_name process-service-perfdata >>>> command_line $USER2$/bin/perfparse_nagios_pipe.command.pl >>>>/usr/local/nagios/var/rw/serviceperf.log "$TIMET$" "$HOSTNAME$" >>>>"$SERVICEDESC$" "$OUTPUT$" "$SERVICESTATE$" "$PERFDATA$" >>>> } >>>> >>>> >>>> >>>> >>>>-----Original Message----- >>>>From: Yves [mailto:yme...@pe...] >>>>Sent: Monday, November 29, 2004 2:16 PM >>>>To: Stu...@am... >>>>Subject: RE: [Perfparse-users] perfparsed & CPU usage >>>> >>>>Tim found the fix for that bug. >>>>You can get perfparse-0.104.1ym1 on >>>>http://pagesperso.laposte.net/ymettier/perfparse-devel/ with the fix, and >>>>perfparse-0.104.2 will probably be released soon. >>>> >>>>Thanks for the feedback ! >>>>Yves >>>> >>>> >>>> >>>> >>>>>I also have this behavior on an Ultra1 running >>>>>Solaris 8 2/02. Perfparse version .0.103.2 and >>>>>Nagios 1.2 >>>>> >>>>>I made the select() &tm change to NULL; >>>>>But I didn't see a positive change. >>>>>I still see the perfparsed loads of 95%+ % >>>>> >>>>>I got a truss for you >>>>> >>>>>As root I issued the following command >>>>>truss -o /var/tmp/perparse0.103.2.truss -f ./perfparsed -d >>>>> >>>>>About a 835 lines get written to the file. >>>>> >>>>>I then changed the permissions to 666 on >>>>>nagios/var/rw/serviceperf.log # fifo >>>>> >>>>>and started nagios. >>>>> >>>>>I would try out 104.1 but I'm getting >>>>>a compile error for libpp_storage_mysql.so.0 >>>>> >>>>>"Text relocation remains referenced >>>>> against symbol offset in file >>>>><unknown> 0x884 >>>>>/usr/local/mysql/lib/libmysqlclient.a(client.o)" >>>>> >>>>> >>>>>-----Original Message----- >>>>>From: Yves Mettier [mailto:yme...@li...] >>>>>Sent: Friday, November 26, 2004 3:35 AM >>>>>To: per...@li... >>>>>Subject: Re: [Perfparse-users] perfparsed & CPU usage >>>>> >>>>> >>>>> >>>>>>Hello, >>>>>>I configured perfparsed to read from a pipe. (Method 4) (config below) >>>>>>I noticed that the CPU usage for perfparse is constantly at > 95% (sse >>>>>>part of 'top' output below). >>>>>> >>>>>>Without perfparsed, top reports 99.7% idle, with perfparsed, it >>>>>>reports about 50% idle. I should add that this is a test setup, with >>>>>>nagios checking only 60 services every 5 minutes (iow, perfparsed >>>>>>takes up a lot of CPU for doing close to nothing) >>>>> >>>>>In perfparse/log_reader.c, we use select(). There is a timeout of one >>>>>second. >>>>>On the line with select(), the last argument is "&tm". Could you replace >>>> >>>>it >>>> >>>>>with "NULL" >>>>>and test ? There should be no side effect with this change. >>>>> >>>>> >>>>>>the production setup checks around 600 services, so I'm a little >>> >>>worried. >>> >>>>>>Any thoughts, insights ? >>>>> >>>>>If it is not a bad use of select(), I have no idea. Give us more, with >>> >>>for >>> >>>>>example using >>>>>strace (linux) or truss (solaris). >>>>> >>>>> >>>>>Yves >>>>> >>>>>-- >>>>>- Homepage - http://ymettier.free.fr - http://www.logicacmg.com - >>>>>- GPG key - http://ymettier.free.fr/gpg.txt - >>>>>- Maitretarot - http://www.nongnu.org/maitretarot/ - >>>>>- Perfparse - http://perfparse.sf.net/ - >>>>> >>>>> >>>>> >>>>>------------------------------------------------------- >>>>>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://productguide.itmanagersjournal.com/ >>>>>_______________________________________________ >>>>>Perfparse-users mailing list >>>>>Per...@li... >>>>>https://lists.sourceforge.net/lists/listinfo/perfparse-users >>>>> >>>>> >>>> >>>> >>>>-- >>>>- Homepage - http://ymettier.free.fr - http://www.logicacmg.com - >>>>- GPG key - http://ymettier.free.fr/gpg.txt - >>>>- Maitretarot - http://www.nongnu.org/maitretarot/ - >>>>- Perfparse - http://perfparse.sf.net/ - >>>> >>>> >>> >>> >>>-- >>>- Homepage - http://ymettier.free.fr - http://www.logicacmg.com - >>>- GPG key - http://ymettier.free.fr/gpg.txt - >>>- Maitretarot - http://www.nongnu.org/maitretarot/ - >>>- Perfparse - http://perfparse.sf.net/ - >>> >>> >> >> >>-- >>- Homepage - http://ymettier.free.fr - http://www.logicacmg.com - >>- GPG key - http://ymettier.free.fr/gpg.txt - >>- Maitretarot - http://www.nongnu.org/maitretarot/ - >>- Perfparse - http://perfparse.sf.net/ - >> >> > > > |