Closed ReshiramZekrom1 closed 1 year ago
Hey!
The program should output stats in stdout
by default unless if you specify the --nostats
argument. I'm not sure why the stdout
file descriptor is invalid.
If you want to find stats on the file system, you may look at the /sys/class/net/<interface name>/statistics/
directory (e.g. rx_dropped
for incoming dropped packets). You may also use ethtool -S <interface>
as well if ethtool is installed. The following is an example from my VM.
➜ build git:(main) sudo ethtool -S enp1s0
NIC statistics:
rx_queue_0_packets: 8436611
rx_queue_0_bytes: 4476286219
rx_queue_0_drops: 0
rx_queue_0_xdp_packets: 2480
rx_queue_0_xdp_tx: 0
rx_queue_0_xdp_redirects: 0
rx_queue_0_xdp_drops: 0
rx_queue_0_kicks: 134
tx_queue_0_packets: 5272491
tx_queue_0_bytes: 5331752464
tx_queue_0_xdp_tx: 0
tx_queue_0_xdp_tx_drops: 0
tx_queue_0_kicks: 5030536
You can see XDP-specific stats here.
I hope this helps :smiley:
That's great! Thank you really much for the detailed comment!
You're welcome and glad that helped! :smiley:
I'm going to close this issue for now, but if you have any other questions, feel free to reopen it.
Hello, thank you really much for this great work.
I'm sorry for the newbie question, but I was wondering how could I display how many packets the firewall either dropped or accepted.
Tried to run
cat /proc/<pID>/fd/1
but it returns "No such device or address"Do you have any drifts? Thanks