Ask Your Question

Is it possible to print TX_PACKETS, TX_BYTES, RX_PACKETS and RX_BYTES?

asked 2022-10-05 12:03:52 +0000

CJ gravatar image

I wanted to print the TX_PACKETS, TX_BYTES, RX_PACKETS and RX_BYTES only. It is readable using tshark -r cap.pcapng -nq -z endpoints,tcp -z endpoints,udp but I only want those four. Is it possible to print out only the four of them?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-10-05 15:18:55 +0000

Chuckc gravatar image

On *nix or WSL:

$ tshark.exe -r snap2.pcapng -nq -z endpoints,tcp -z endpoints,udp | awk '{ print $3,$4,$5,$6; }' | grep [0-9]
1 63 1 63
1 63 0 0
edit flag offensive delete link more


<'awk' is not recognized as an internal or external command, operable program or batch file.>

This is what I get from which when I tried your code. And i am using WSL.

CJ gravatar imageCJ ( 2022-10-06 11:40:44 +0000 )edit

That looks like a error message. What operating system are you loading in WSL?

Chuckc gravatar imageChuckc ( 2022-10-06 13:13: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


Asked: 2022-10-05 12:03:52 +0000

Seen: 29 times

Last updated: Oct 05