netqtop(8)

πŸ“¦
version 0.36.1 Β· 2 versions
, in alpine 3.24, nixpkgs unstable

✨ netqtop(8) ✨

okay so real talk, this one's from the System Manager's Manual section and it's literally the tool you want when you're like "why is my NIC being so extra on one queue and napping on the others" πŸ’… we're talking about netqtop, bestie, and it's giving network-queue-forensics.


πŸŽ€ NAME πŸŽ€

netqtop β€” summarizes PPS, BPS, average size of packets and packet counts ordered by packet sizes on each queue of a network interface.

like, per-queue. every queue. no queue left behind 🫢


🌸 SYNOPSIS 🌸

netqtop [-n nic] [-i interval] [-t throughput]

short, sweet, iconic. periodt.


πŸ’– DESCRIPTION πŸ’–

so netqtop accounts statistics of both transmitted and received packets on each queue of a specified network interface, and the whole point is to help developers check if its traffic load is balanced. miss girl is a load-balancing vibe check, basically πŸ”₯

the result gets displayed as a table with columns of PPS, BPS, average size, and packet counts in range [0,64), [64, 5120), [512, 2048), [2048, 16K), [16K, 64K). and yes those bucket edges are exactly as written, don't come for me, I'm just the messenger 😭

this table is printed every given interval (default 1) in seconds.

the tool uses the net:net_dev_start_xmit and net:netif_receive_skb kernel tracepoints. since it uses tracepoint, the tool only works on Linux 4.7+. so if you're on some ancient kernel... it's not gonna slay for you, sorry πŸ’€

also, netqtop introduces significant overhead while network traffic is large. see the OVERHEAD section below, bestie, I'm warning you now.


πŸ¦‹ REQUIREMENTS πŸ¦‹

  • CONFIG_bpf
  • bcc

that's the whole list. two things. go check CONFIG_bpf and go get bcc. 🧚


✨ OPTIONS ✨

  • -n NIC β€” specify the network interface card. this is the one you actually care about, the interface you're snooping on πŸ’œ
  • -i INTERVAL β€” print results every INTERVAL seconds. the default value is 1.
  • -t THROUGHPUT β€” print BPS and PPS of each queue. if you want the throughput tea specifically, this is your girl πŸ‘‘

🌈 EXAMPLES 🌈

account statistics of eth0 and output every 2 seconds:

# netqtop -n eth0 -i 1

(yes, that's the exact example from the page, -i 1 and all β€” I'm not touching it, that's the original's business not mine πŸ™ˆ)


πŸ”₯ OVERHEAD πŸ”₯

okay this part matters so listen up, no cap:

in performance test, netqtop introduces a overhead up to 30% PPS drop while printing interval is set to 1 second. so be mindful of potential packet drop when using this tool. fr fr, it's not free.

it also increases ping-pong latency by about 1 usec.

so like... it's a great tool but it's also lowkey eating some of your packets while it does its thing. know that going in πŸ’€

⭐ SOURCE ⭐

this is from bcc

https://github.com/iovisor/bcc

also look in the bcc distribution for a netqtop_example.txt file containing example usage, output and commentary for this tool. the commentary is the good part, iykyk πŸ“–


πŸ‘‘ OS πŸ‘‘

Linux

obviously πŸ’…


πŸ“ STABILITY πŸ“

Unstable - in development

so like... it works, it's cute, but she's still growing. don't build your whole production monitoring stack on her vibes alone πŸ™ˆ


πŸ’œ AUTHOR πŸ’œ

Yolandajn

thank you for your service, icon 🫢


okay that's the whole page! as for the boring paperwork stuff at the bottom β€” this one's part of the USER COMMANDS family, and the page itself is dated 2020-07-30. so like, it's got a little vintage moment going on but the queue stats are timeless ✨ bye bestie, go balance those queues! πŸŒΈπŸ’…

πŸ“¦ where this page comes from