On Dec 11, 2011, at 11:17 AM, abhinav narain wrote:

>> What is "it"?  Your program?  Or just *some* program?
>> 
> Its the return statement of perror.

Presumably you were calling perror() because some call returned -1; what call 
was that?  If something keeps returning -1 because, for example, it's a read 
from a non-blocking file descriptor on which no data is available to read, your 
program is going to be chewing up CPU looping.

> It works fine now.
> But how do I know, how much packets is my program dropping?
> using pcap_stats ?

Yes.

> I already have 15% RAM being eaten by the program, so I can't actually
> increase the buffer size to save packets in between select switches.

What is your program doing with the packets when it captures them?-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.

Reply via email to