From: Yves <yme...@pe...> - 2004-11-26 14:56:54
|
> Yves, > > I've done an strace, results are attached. Changing &tm to NULL did > not change anything. Well, here is what your perfparsed does when doing nothing : select(6, [4 5], NULL, NULL, NULL) =3D 1 (in [4]) rt_sigprocmask(SIG_BLOCK, [INT TERM], [], 8) =3D 0 read(4, "", 10) =3D 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) =3D 0 wait4(-1, NULL, WNOHANG, NULL) =3D -1 ECHILD (No child processes= ) In other words, there is always something to read on the 4th file descrip= tor (1st line), even if we see on the 3rd line that it reads nothing. There is an additionnal test that you could maybe do, still in log_reader= .c. You can find in open_log_source a big test : if(!strcmp(filename,"-")) { ... } else if(filename[0] =3D=3D '>') { ... } else if(filename[0] =3D=3D '|') { ... log_source_nonblock(i); ... } else { ... } Could you comment that log_source_nonblock(i), and only that one ? I hope this is the fix. Otherwise, I will have to find why, when there is= nothing to read on the pipe, why it considers there is something to read anyways. Note : per...@li... is the mailing-list for the core = developers, including Ben. If you don't mind, answer with that list in CC :) Yves --=20 - 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/ - |
From: Tim W. <tim...@gm...> - 2004-11-26 15:56:18
|
Yves, Recompiling with the log_source_nonblock(i) line commented out does not change anything. The CPU still sky-rockets, and the 4 lines still show up (a gazillion times) in strace output. :( Tim On Fri, 26 Nov 2004 15:56:42 +0100 (CET), Yves <yme...@pe...> wrote: > > > Yves, > > > > I've done an strace, results are attached. Changing &tm to NULL did > > not change anything. > > Well, here is what your perfparsed does when doing nothing : > > select(6, [4 5], NULL, NULL, NULL) = 1 (in [4]) > rt_sigprocmask(SIG_BLOCK, [INT TERM], [], 8) = 0 > read(4, "", 10) = 0 > rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 > wait4(-1, NULL, WNOHANG, NULL) = -1 ECHILD (No child processes) > > In other words, there is always something to read on the 4th file descriptor (1st line), > even if we see on the 3rd line that it reads nothing. > > There is an additionnal test that you could maybe do, still in log_reader.c. You can > find in open_log_source a big test : > if(!strcmp(filename,"-")) { > ... > } else if(filename[0] == '>') { > ... > } else if(filename[0] == '|') { > ... > log_source_nonblock(i); > ... > } else { > ... > } > > Could you comment that log_source_nonblock(i), and only that one ? > I hope this is the fix. Otherwise, I will have to find why, when there is nothing to > read on the pipe, why it considers there is something to read anyways. > > Note : per...@li... is the mailing-list for the core developers, > including Ben. If you don't mind, answer with that list in CC :) > > > > 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/ - > > |
From: Yves <yme...@pe...> - 2004-11-26 16:09:06
|
> Yves, > > Recompiling with the log_source_nonblock(i) line commented out does > not change anything. The CPU still sky-rockets, and the 4 lines still > show up (a gazillion times) in strace output. So I just suggest that you upgrade to 0.104.1 this week-end, when Ben rel= eases it, and I will try to find out why there is always something to read on the pipe fo= r select(). The only thing I can suggest you now, if you really want a hacked solutio= n, is to put this in log_reader() : while(10 =3D=3D (r=3Dread(...))) { ... } if((r>0) && (r<10)) { ... } else if(r =3D=3D 0) { sleep(1); } Add the 2 last lines to sleep the program when it reads nothing. The CPU = should still sky-rocket, but passengers will now have 1 second to get inside the rocke= t :) I will try to find something better for 0.104.2 or 0.105 or course :) Yves PS. uncomment back log_source_nonblock(i) because it may have side effect= s. --=20 - 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/ - |
From: Tim W. <tim...@gm...> - 2004-11-29 14:22:45
|
Yves, How much do I get if I told you I've found the solution? :) OK, I admit, it seems odd, but I've encountered this next comment in a piece of Perl (yes, Perl) code: # Open the fifo read/write, not just read. This is necessary because # of the POSIX rules about using select() on named pipes when no writers # are present. This is a very key step that is hard to find documentation # about. (note the last sentence!) So I tried exactly that: change log_fd[i]->fd = open(filename+1, O_RDONLY); to log_fd[i]->fd = open(filename+1, O_RDWR); and that's it ! Works in 103.2 and 104.1 (perfparsed 104.1 compiles, but doesn't write anyhting to the db... :(, but that's another problem I guess. More tomorrow... ) happy coding, Tim On Fri, 26 Nov 2004 17:08:42 +0100 (CET), Yves <yme...@pe...> wrote: > > > Yves, > > > > Recompiling with the log_source_nonblock(i) line commented out does > > not change anything. The CPU still sky-rockets, and the 4 lines still > > show up (a gazillion times) in strace output. > > So I just suggest that you upgrade to 0.104.1 this week-end, when Ben releases it, and I > will try to find out why there is always something to read on the pipe for select(). > > The only thing I can suggest you now, if you really want a hacked solution, is to put > this in log_reader() : > > while(10 == (r=read(...))) { > ... > } > if((r>0) && (r<10)) { > ... > } else if(r == 0) { > sleep(1); > } > > Add the 2 last lines to sleep the program when it reads nothing. The CPU should still > sky-rocket, but passengers will now have 1 second to get inside the rocket :) > > I will try to find something better for 0.104.2 or 0.105 or course :) > > Yves > PS. uncomment back log_source_nonblock(i) because it may have side effects. > > -- > > > - 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/ - > > |
From: Yves <yme...@pe...> - 2004-11-29 14:44:01
|
> Yves, > How much do I get if I told you I've found the solution? 31 more characters in the ChangeLog, and some public thanks in the announ= ce of pp-0.104.2 that may be released this week :) > :) :) About the 31 characters, I suggest "Tim Wuyts <tim...@gm...>" :) Do you agree ? > OK, I admit, it seems odd, but I've encountered this next comment in a > piece of Perl (yes, Perl) code: > # Open the fifo read/write, not just read. This is necessary because > # of the POSIX rules about using select() on named pipes when no writer= s > # are present. This is a very key step that is hard to find documentati= on > # about. > > (note the last sentence!) I confirm... My searchs showed me that there was an additionnal bug : before the 1st w= rite to the fifo, perfparse would have hanged on that open(fifo, O_RDONLY). Using O_RDONLY |O_NONBLOCK fixes that bug, but select() still immediately= returns. Using O_RDWR works and O_NONBLOCK is not necessary for open() :) > So I tried exactly that: > change > log_fd[i]->fd =3D open(filename+1, O_RDONLY); > to > log_fd[i]->fd =3D open(filename+1, O_RDWR); > > and that's it ! Works in 103.2 and 104.1 > (perfparsed 104.1 compiles, but doesn't write anyhting to the db... > :(, but that's another problem I guess. More tomorrow... ) For the database, the problem is maybe dlopen() not working. A possible r= eason is libpp_storage_mysql not being in a PATH that ld.so knows. On GNU/Linux, e= dit /etc/ld.so.conf then run ldconfig. On other systems (including GNU/Linux = if you don't want to edit /etc/ld.so.conf) change your $LD_LIBRARY_PATH env var. Could you tell me any error message that you have ? I'd like to find wher= e I should stop the execution of perfparse when there is a problem with the db. > happy coding, Thanks :) And you, happy debugging :) Yvse > Tim > > On Fri, 26 Nov 2004 17:08:42 +0100 (CET), Yves <yme...@pe...>= wrote: >> >> > Yves, >> > >> > Recompiling with the log_source_nonblock(i) line commented out does >> > not change anything. The CPU still sky-rockets, and the 4 lines stil= l >> > show up (a gazillion times) in strace output. >> >> So I just suggest that you upgrade to 0.104.1 this week-end, when Ben = releases it, and >> I >> will try to find out why there is always something to read on the pipe= for select(). >> >> The only thing I can suggest you now, if you really want a hacked solu= tion, is to put >> this in log_reader() : >> >> while(10 =3D=3D (r=3Dread(...))) { >> ... >> } >> if((r>0) && (r<10)) { >> ... >> } else if(r =3D=3D 0) { >> sleep(1); >> } >> >> Add the 2 last lines to sleep the program when it reads nothing. The C= PU should still >> sky-rocket, but passengers will now have 1 second to get inside the ro= cket :) >> >> I will try to find something better for 0.104.2 or 0.105 or course :) >> >> Yves >> PS. uncomment back log_source_nonblock(i) because it may have side eff= ects. >> >> -- >> >> >> - 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/ - >> >> > > --=20 - 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/ - |
From: Yves <yme...@pe...> - 2004-11-30 09:37:12
|
> 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=3D/usr/local/nagios/etc/nagios_perfparse.cfg > process_performance_data=3D1 > host_perfdata_command=3Dprocess-host-perfdata > service_perfdata_command=3Dprocess-service-perfdata > > In the perfparse.cfg make sure the the variable Service_log is set to: > Service_log =3D "|/path/to/the/pipe" > Example: > Service_log =3D > "|/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, a= nd > 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% (ss= e >>> 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 repla= ce > 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 worr= ied. >>> >>> 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 user= s. >> 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/ - > > --=20 - 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/ - |
From: Yves <yme...@pe...> - 2004-11-30 19:11:08
|
Try 0.104.1ym2 that fix a bug for perfparsed. About your bug, it is probably some #include <gettext.h> that should be a= fter #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/perfp= arse' > if gcc -DHAVE_CONFIG_H -I. -I. -I.. '-DSYSCONFDIR=3D"/usr/local/nagios= /etc"' > '-DLOCALEDIR=3D"/usr/local/nagios/share/locale"' > -I/usr/local/glib/include/glib-2.0 -I/usr/local/glib/lib/glib-2.0/inclu= de > -I../libpp_common -I../libnagios_perfdata_parser -I../modules -I.. -O= 3 > -mcpu=3Dultrasparc -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-log2a= ny.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/perfpa= rse' > 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=3D/usr/local/nagios/etc/nagios_perfparse.cfg >> process_performance_data=3D1 >> host_perfdata_command=3Dprocess-host-perfdata >> service_perfdata_command=3Dprocess-service-perfdata >> >> In the perfparse.cfg make sure the the variable Service_log is set to: >> Service_log =3D "|/path/to/the/pipe" >> Example: >> Service_log =3D >> "|/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 belo= w) >>>> I noticed that the CPU usage for perfparse is constantly at > 95% (s= se >>>> 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 repl= ace >> 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, wit= h > 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 use= rs. >>> 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/ - > > --=20 - 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/ - |
From: Tim W. <tim...@gm...> - 2004-12-02 06:08:08
|
Yves, - tim...@gm... is fine :) - I noticed a new entry in the config when doing show_config: Storage_Modules_Load = "", but no docs about this. This is probably why nothing is written to the db. What should be in there? - another thing: the cgi's won't compile because GD_LIBS= is empty in the makefile (was GD_LIBS = -lgd in 103.2) regards, Tim On Mon, 29 Nov 2004 15:43:55 +0100 (CET), Yves <yme...@pe...> wrote: > > > Yves, > > How much do I get if I told you I've found the solution? > > 31 more characters in the ChangeLog, and some public thanks in the announce of > pp-0.104.2 that may be released this week :) > > > :) > > :) > > About the 31 characters, I suggest "Tim Wuyts <tim...@gm...>" :) > Do you agree ? > > > OK, I admit, it seems odd, but I've encountered this next comment in a > > piece of Perl (yes, Perl) code: > > # Open the fifo read/write, not just read. This is necessary because > > # of the POSIX rules about using select() on named pipes when no writers > > # are present. This is a very key step that is hard to find documentation > > # about. > > > > (note the last sentence!) > > I confirm... > My searchs showed me that there was an additionnal bug : before the 1st write to the > fifo, perfparse would have hanged on that open(fifo, O_RDONLY). > Using O_RDONLY |O_NONBLOCK fixes that bug, but select() still immediately returns. > Using O_RDWR works and O_NONBLOCK is not necessary for open() :) > > > > > > So I tried exactly that: > > change > > log_fd[i]->fd = open(filename+1, O_RDONLY); > > to > > log_fd[i]->fd = open(filename+1, O_RDWR); > > > > and that's it ! Works in 103.2 and 104.1 > > (perfparsed 104.1 compiles, but doesn't write anyhting to the db... > > :(, but that's another problem I guess. More tomorrow... ) > > For the database, the problem is maybe dlopen() not working. A possible reason is > libpp_storage_mysql not being in a PATH that ld.so knows. On GNU/Linux, edit > /etc/ld.so.conf then run ldconfig. On other systems (including GNU/Linux if you don't > want to edit /etc/ld.so.conf) change your $LD_LIBRARY_PATH env var. > > Could you tell me any error message that you have ? I'd like to find where I should stop > the execution of perfparse when there is a problem with the db. > > > happy coding, > > Thanks :) > And you, happy debugging :) > > Yvse > > > > > Tim > > > > On Fri, 26 Nov 2004 17:08:42 +0100 (CET), Yves <yme...@pe...> wrote: > >> > >> > Yves, > >> > > >> > Recompiling with the log_source_nonblock(i) line commented out does > >> > not change anything. The CPU still sky-rockets, and the 4 lines still > >> > show up (a gazillion times) in strace output. > >> > >> So I just suggest that you upgrade to 0.104.1 this week-end, when Ben releases it, and > >> I > >> will try to find out why there is always something to read on the pipe for select(). > >> > >> The only thing I can suggest you now, if you really want a hacked solution, is to put > >> this in log_reader() : > >> > >> while(10 == (r=read(...))) { > >> ... > >> } > >> if((r>0) && (r<10)) { > >> ... > >> } else if(r == 0) { > >> sleep(1); > >> } > >> > >> Add the 2 last lines to sleep the program when it reads nothing. The CPU should still > >> sky-rocket, but passengers will now have 1 second to get inside the rocket :) > >> > >> I will try to find something better for 0.104.2 or 0.105 or course :) > >> > >> Yves > >> PS. uncomment back log_source_nonblock(i) because it may have side effects. > >> > >> -- > >> > >> > >> - 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/ - > > |
From: Yves <yme...@pe...> - 2004-12-02 08:19:27
|
Not at work today, so I cannot make very good answers :) > - tim...@gm... is fine :) OK :) > - I noticed a new entry in the config when doing show_config: > Storage_Modules_Load =3D "", but no docs about this. This is probably > why nothing is written to the db. What should be in there? If you are using perfparse-log2mysql, it reads its own name and notice th= at there is "mysql" in "perfparse-log2mysql". If you are using any perfparse-log2* tool, you write a CVS list of module= s in Storage_Modules_Load and the names are the short names of the modules : m= ysql, stdout ... > - another thing: the cgi's won't compile because GD_LIBS=3D is empty in > the makefile (was GD_LIBS =3D -lgd in 103.2) I don't remember when I made the change but you are supposed to have gdli= b-config (or gdlib_config?) and provide the path of that tool to ./configure Yves > > regards, > Tim > > On Mon, 29 Nov 2004 15:43:55 +0100 (CET), Yves <yme...@pe...>= wrote: >> >> > Yves, >> > How much do I get if I told you I've found the solution? >> >> 31 more characters in the ChangeLog, and some public thanks in the ann= ounce of >> pp-0.104.2 that may be released this week :) >> >> > :) >> >> :) >> >> About the 31 characters, I suggest "Tim Wuyts <tim...@gm...>" := ) >> Do you agree ? >> >> > OK, I admit, it seems odd, but I've encountered this next comment in= a >> > piece of Perl (yes, Perl) code: >> > # Open the fifo read/write, not just read. This is necessary because >> > # of the POSIX rules about using select() on named pipes when no wri= ters >> > # are present. This is a very key step that is hard to find document= ation >> > # about. >> > >> > (note the last sentence!) >> >> I confirm... >> My searchs showed me that there was an additionnal bug : before the 1s= t write to the >> fifo, perfparse would have hanged on that open(fifo, O_RDONLY). >> Using O_RDONLY |O_NONBLOCK fixes that bug, but select() still immediat= ely returns. >> Using O_RDWR works and O_NONBLOCK is not necessary for open() :) >> >> >> >> >> > So I tried exactly that: >> > change >> > log_fd[i]->fd =3D open(filename+1, O_RDONLY); >> > to >> > log_fd[i]->fd =3D open(filename+1, O_RDWR); >> > >> > and that's it ! Works in 103.2 and 104.1 >> > (perfparsed 104.1 compiles, but doesn't write anyhting to the db... >> > :(, but that's another problem I guess. More tomorrow... ) >> >> For the database, the problem is maybe dlopen() not working. A possibl= e reason is >> libpp_storage_mysql not being in a PATH that ld.so knows. On GNU/Linux= , edit >> /etc/ld.so.conf then run ldconfig. On other systems (including GNU/Lin= ux if you don't >> want to edit /etc/ld.so.conf) change your $LD_LIBRARY_PATH env var. >> >> Could you tell me any error message that you have ? I'd like to find w= here I should >> stop >> the execution of perfparse when there is a problem with the db. >> >> > happy coding, >> >> Thanks :) >> And you, happy debugging :) >> >> Yvse >> >> >> >> > Tim >> > >> > On Fri, 26 Nov 2004 17:08:42 +0100 (CET), Yves <ymettier@perfparse.o= rg> wrote: >> >> >> >> > Yves, >> >> > >> >> > Recompiling with the log_source_nonblock(i) line commented out d= oes >> >> > not change anything. The CPU still sky-rockets, and the 4 lines s= till >> >> > show up (a gazillion times) in strace output. >> >> >> >> So I just suggest that you upgrade to 0.104.1 this week-end, when B= en releases it, >> and >> >> I >> >> will try to find out why there is always something to read on the p= ipe for >> select(). >> >> >> >> The only thing I can suggest you now, if you really want a hacked s= olution, is to >> put >> >> this in log_reader() : >> >> >> >> while(10 =3D=3D (r=3Dread(...))) { >> >> ... >> >> } >> >> if((r>0) && (r<10)) { >> >> ... >> >> } else if(r =3D=3D 0) { >> >> sleep(1); >> >> } >> >> >> >> Add the 2 last lines to sleep the program when it reads nothing. Th= e CPU should >> still >> >> sky-rocket, but passengers will now have 1 second to get inside the= rocket :) >> >> >> >> I will try to find something better for 0.104.2 or 0.105 or course = :) >> >> >> >> Yves >> >> PS. uncomment back log_source_nonblock(i) because it may have side = effects. >> >> >> >> -- >> >> >> >> >> >> - 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/ - >> >> > > > ------------------------------------------------------- > 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-devel-int mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perfparse-devel-int > > --=20 - 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/ - |
From: Yves <yme...@pe...> - 2004-12-06 10:41:00
|
> FYI > In version 104.1ym3 I saw 2 problems with the > Solaris 8 compile. > - perfparsed no longer parsed data to the mysql database Is the directory where libpp_storage_*.so in your LD_LIBRARY_PATH ? 0.104.2 should change nothing on that, but tell me anyways :) > - The application looks for perfgraph.cgi instead > of perfparse.cgi perfgraph.cgi is supposed to be removed. But you have to do it by yoursel= f. We did not want to remove anything on users' disks and take the responsibility for i= t. Could you confirm that you don't have perfgraph.cgi any more on your disk= ? If the problem still occurs when you run perfparse.cgi, could you tell us= more ? Yves > > I verified both problems. > 1. by reverting back to the 103.2; and > made sure the conf files were still in tack. > 2. by moving the old perfgraph.cgi out of the way and moving > the the new perfparse.cgi to perfgraph.cgi. > > Later today I will try the 104.2 compile > to see if these 2 problems go away. > --=20 - 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/ - |
From: <Stu...@am...> - 2004-12-06 22:13:40
|
libpp_storage_*.so is not in my LD_LIBRARY_PATH As for the perfgraph.cgi: - When perfgraph.cgi is removed then graphing doesn't work. - When perfparse.cgi is renamed to perfgraph.cgi. Graphs work. -----Original Message----- From: Yves [mailto:yme...@pe...] Sent: Monday, December 06, 2004 3:41 AM To: Stu...@am... Cc: per...@li... Subject: RE: [Perfparse-users] perfparsed & CPU usage > FYI > In version 104.1ym3 I saw 2 problems with the > Solaris 8 compile. > - perfparsed no longer parsed data to the mysql database Is the directory where libpp_storage_*.so in your LD_LIBRARY_PATH ? 0.104.2 should change nothing on that, but tell me anyways :) > - The application looks for perfgraph.cgi instead > of perfparse.cgi perfgraph.cgi is supposed to be removed. But you have to do it by yourself. We did not want to remove anything on users' disks and take the responsibility for it. Could you confirm that you don't have perfgraph.cgi any more on your disk ? If the problem still occurs when you run perfparse.cgi, could you tell us more ? Yves > > I verified both problems. > 1. by reverting back to the 103.2; and > made sure the conf files were still in tack. > 2. by moving the old perfgraph.cgi out of the way and moving > the the new perfparse.cgi to perfgraph.cgi. > > Later today I will try the 104.2 compile > to see if these 2 problems go away. > -- - 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/ - |
From: Yves <yme...@pe...> - 2004-12-07 08:58:12
|
> libpp_storage_*.so is not in my LD_LIBRARY_PATH Is is working better if you add the directory that contain libpp_storage_= *.so in your LD_LIBRARY_PATH ? > As for the perfgraph.cgi: > - When perfgraph.cgi is removed then graphing doesn't work. > - When perfparse.cgi is renamed to perfgraph.cgi. Graphs work. Ben, are there occurences of "perfgraph.cgi" somewhere else than what I c= hanged in 0.104.2ym1 ? My changes are not supposed to solve that problem ! I suggest to not release 0.104.3 before we have some idea on what that pr= oblem is. Yves > > > -----Original Message----- > From: Yves [mailto:yme...@pe...] > Sent: Monday, December 06, 2004 3:41 AM > To: Stu...@am... > Cc: per...@li... > Subject: RE: [Perfparse-users] perfparsed & CPU usage > > >> FYI >> In version 104.1ym3 I saw 2 problems with the >> Solaris 8 compile. >> - perfparsed no longer parsed data to the mysql database > > Is the directory where libpp_storage_*.so in your LD_LIBRARY_PATH ? > 0.104.2 should change nothing on that, but tell me anyways :) > >> - The application looks for perfgraph.cgi instead >> of perfparse.cgi > > perfgraph.cgi is supposed to be removed. But you have to do it by yours= elf. > We did not > want to remove anything on users' disks and take the responsibility for= it. > > Could you confirm that you don't have perfgraph.cgi any more on your di= sk ? > If the problem still occurs when you run perfparse.cgi, could you tell = us > more ? > > Yves > >> >> I verified both problems. >> 1. by reverting back to the 103.2; and >> made sure the conf files were still in tack. >> 2. by moving the old perfgraph.cgi out of the way and moving >> the the new perfparse.cgi to perfgraph.cgi. >> >> Later today I will try the 104.2 compile >> to see if these 2 problems go away. >> > > -- > - 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-devel-int mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perfparse-devel-int > > --=20 - 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/ - |
From: <Stu...@am...> - 2004-12-08 15:20:24
|
FYI I was able to compile version 0.104.2ym3 Method 4 is working. Load issues related to perfparsed Look to be resolved. I put the /usr/local/nagios/lib in my LD_RUN_PATH which is the better flag to use for Solaris8 Setting the LD_RUN_PATH before the compile embed's the paths to search for the library's in the binary. I then added "Storage_Modules_Load="mysql,print,stdout" variable to the perfparse.cfg in nagios/etc dir. I most likely don't need "print,stdout" modules but I threw them in anyhow. To resolve the perfparse.cgi and perfgraph.cgi (old name) I had to make a change the share/side.html file. -----Original Message----- From: Einecker, Stuart M. Sent: Monday, December 06, 2004 3:14 PM To: 'yme...@pe...'; Einecker, Stuart M. Cc: per...@li... Subject: RE: [Perfparse-users] perfparsed & CPU usage libpp_storage_*.so is not in my LD_LIBRARY_PATH As for the perfgraph.cgi: - When perfgraph.cgi is removed then graphing doesn't work. - When perfparse.cgi is renamed to perfgraph.cgi. Graphs work. -----Original Message----- From: Yves [mailto:yme...@pe...] Sent: Monday, December 06, 2004 3:41 AM To: Stu...@am... Cc: per...@li... Subject: RE: [Perfparse-users] perfparsed & CPU usage > FYI > In version 104.1ym3 I saw 2 problems with the > Solaris 8 compile. > - perfparsed no longer parsed data to the mysql database Is the directory where libpp_storage_*.so in your LD_LIBRARY_PATH ? 0.104.2 should change nothing on that, but tell me anyways :) > - The application looks for perfgraph.cgi instead > of perfparse.cgi perfgraph.cgi is supposed to be removed. But you have to do it by yourself. We did not want to remove anything on users' disks and take the responsibility for it. Could you confirm that you don't have perfgraph.cgi any more on your disk ? If the problem still occurs when you run perfparse.cgi, could you tell us more ? Yves > > I verified both problems. > 1. by reverting back to the 103.2; and > made sure the conf files were still in tack. > 2. by moving the old perfgraph.cgi out of the way and moving > the the new perfparse.cgi to perfgraph.cgi. > > Later today I will try the 104.2 compile > to see if these 2 problems go away. > -- - 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/ - |
From: Yves <yme...@pe...> - 2004-12-08 15:58:13
|
> FYI > > I was able to compile version 0.104.2ym3 Good :) > Method 4 is working. Load issues related to perfparsed > Look to be resolved. > I put the /usr/local/nagios/lib in my LD_RUN_PATH > which is the better flag to use for Solaris8 > Setting the LD_RUN_PATH before the compile > embed's the paths to search for the library's in the > binary. Good to know. I will put that on wiki.perfparse.org somewhere :) > I then added "Storage_Modules_Load=3D"mysql,print,stdout" variable > to the perfparse.cfg in nagios/etc dir. I most likely don't > need "print,stdout" modules but I threw them in anyhow. You don't need print. Print and stdout do the same thing, but print is an= example for programmers with things that an admin cannot use. This is why I developpe= d stdout storage module : do the same thing as print, but with a nice output (the = same output as nagios). About stdout, if you run perfparse as a daemon, you don't need it because= stdout is redirected to /dev/null :) With 0.104.3 (Ben will probably release it this evening), give a try on f= ile_output that will write log files. This was broken in previous releases :) > To resolve the perfparse.cgi and perfgraph.cgi (old name) > I had to make a change the share/side.html file. There is no share/side.html file. Is it something to change in the doc so= mewhere ? Yves > > -----Original Message----- > From: Einecker, Stuart M. > Sent: Monday, December 06, 2004 3:14 PM > To: 'yme...@pe...'; Einecker, Stuart M. > Cc: per...@li... > Subject: RE: [Perfparse-users] perfparsed & CPU usage > > libpp_storage_*.so is not in my LD_LIBRARY_PATH > > As for the perfgraph.cgi: > - When perfgraph.cgi is removed then graphing doesn't work. > - When perfparse.cgi is renamed to perfgraph.cgi. Graphs work. > > > -----Original Message----- > From: Yves [mailto:yme...@pe...] > Sent: Monday, December 06, 2004 3:41 AM > To: Stu...@am... > Cc: per...@li... > Subject: RE: [Perfparse-users] perfparsed & CPU usage > > >> FYI >> In version 104.1ym3 I saw 2 problems with the >> Solaris 8 compile. >> - perfparsed no longer parsed data to the mysql database > > Is the directory where libpp_storage_*.so in your LD_LIBRARY_PATH ? > 0.104.2 should change nothing on that, but tell me anyways :) > >> - The application looks for perfgraph.cgi instead >> of perfparse.cgi > > perfgraph.cgi is supposed to be removed. But you have to do it by yours= elf. > We did not > want to remove anything on users' disks and take the responsibility for= it. > > Could you confirm that you don't have perfgraph.cgi any more on your di= sk ? > If the problem still occurs when you run perfparse.cgi, could you tell = us > more ? > > Yves > >> >> I verified both problems. >> 1. by reverting back to the 103.2; and >> made sure the conf files were still in tack. >> 2. by moving the old perfgraph.cgi out of the way and moving >> the the new perfparse.cgi to perfgraph.cgi. >> >> Later today I will try the 104.2 compile >> to see if these 2 problems go away. >> > > -- > - 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/ - > > --=20 - 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/ - |