From: Yves M. <yme...@li...> - 2004-11-26 10:34:39
|
> 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 sec= ond. 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 worrie= d. > > Any thoughts, insights ? If it is not a bad use of select(), I have no idea. Give us more, with fo= r example using strace (linux) or truss (solaris). 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/ - |