Ask Your Question
0

dumpcap - get packet drop report periodically

asked 2020-05-23 15:12:40 +0000

balderman gravatar image

updated 2020-05-23 15:13:10 +0000

when dumpcap is stopped it prints a short packets stats report. Example

Packets received/dropped on interface 'eno2': 138657725/12413592 (pcap:12413591/dumpcap:1/flushed:0/ps_ifdrop:109) (91.8%)

Source code: https://github.com/wireshark/wireshar...

It it possible to get this report periodically? (without stopping dumpcap)

thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-05-23 22:54:07 +0000

Guy Harris gravatar image

There's no mechanism to get dumpcap to periodically produce the report.

On BSD-derived OSes, such as macOS and the *BSDs, you can send it the SIGINFO signal to get the report printed.

If you're running it from a terminal, and the stty -a command prints

cchars: ...
    ...
    ... status = ^T;
    ...

(the only thing that's relevant is status = ^T;; I've omitted the rest of the stuff it prints), you can type ^T while dumpcap is running in the foreground and it should print that information. If something such as status = <undef> is printed, do stty status '^t' first.

If you're not running it from a terminal or it's in the background, the kill command can be used to send the signal.

If you're on any other OS, you're out of luck.

edit flag offensive delete link more
0

answered 2020-05-23 20:01:06 +0000

Jaap gravatar image

You can send it SIGINFO to provoke it printing the stats. Conditions apply, see source code.

edit flag offensive delete link more

Comments

The main condition that applies is "this has to be a BSD-derived OS, such as macOS or one of the *BSDs".

Guy Harris gravatar imageGuy Harris ( 2020-05-23 22:47:59 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-05-23 15:12:40 +0000

Seen: 309 times

Last updated: May 23 '20