[hobbit] fping tuning

Henrik Stoerner henrik at hswn.dk
Thu Apr 27 07:39:53 CEST 2006


On Wed, Apr 26, 2006 at 05:49:45PM -0400, Schwimmer, Eric E *HS wrote:
> So this leads me to believe that it is a problem solely with fping;  if
> they had a public forum or a mailing list, I'd be whining there instead
> of here. :)  I can't say that I was expecting to find the 'magic bullet'
> for this problem here, but I was hoping that there might be some fping
> wizard out there some magic bullets to spare.  Anywho, thanks for your
> thoughts, Henrik.  I'll poke some more at the fping code and see if
> I can figure out whats going on (I doubt it)

I haven't spent much time looking at the fping code, so I have no idea
how well it's been optimized. It might be an idea to compile fping 
with profiling enabled (i.e. add the "-g -pg" options to the compile- and
link-flags) and run it through your test. This generates a "gmon.out"
file which you can run through gprof like "gprof fping gmon.out" and
it will tell you how much time is spent in various parts of the code.
"gprof -l ..." will do it on a line-by-line basis.

One thing I learnt from profiling the Hobbit code is that it is very
easy to store things in arrays or linked lists, but it is also very
expensive to search through such lists. So I wonder if fping might be
storing the IP-adresses it pings in an array, and scanning through that
array every time it receives a reply.

I'll have a look at it sometime.


Regards,
Henrik




More information about the Xymon mailing list