Thanks for replying on this, as I am actually helpless on this issue for
days now.

As you're saying "libpcap" rather than WinPcap, I'm assuming this is some
> flavor of UN*X, such as Linux.
>
>  You are right, its running 2.6.32 on OpenWrt.

> Could you build a profiled version of your tool (compile with "-pg") and
> then run gprof on the tool and the gmon.out file it produces when it exits?
>  That should show you *where* the CPU time is being spent.
>
> This means that the program has to eventually exit cleanly - you can't
> interrupt it with, for example, ^C unless it catches SIGINT and exits,
> otherwise it'll fail to write out the gmon.out file.
>
> This might also be tricky if you cross-compile the tool to run on the
> router, and the router doesn't have gprof installed - you might have to
> have a version of gprof capable of analyzing executable files and gmon.out
> files from the router.


This is the trickiest part, as I haven't found profiling tools for OpenWrt.
I am curious to know if tcpdump does something
interesting to deal with such situation (I dint find anything
when I last read the code..couple of months back)

Am I right to say that the two processes spin on some shared resource ?

-
Abhinav
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers@lists.tcpdump.org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers

Reply via email to