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/ - |