]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tools: ynltool: add qstats support
authorJakub Kicinski <kuba@kernel.org>
Fri, 7 Nov 2025 16:22:26 +0000 (08:22 -0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 11 Nov 2025 11:21:04 +0000 (12:21 +0100)
commit3f0a638d45fcf98f7a53ece0aadf928dfc328a06
treefd90dae50794c4aed56162d197b879ad71f46f3b
parent124dac9b421ca8e69ed11ad7a0fc1794d03c2519
tools: ynltool: add qstats support

$ ynltool qstat
  eth0        rx-packets:       493192163        rx-bytes:   1442544543997
              tx-packets:       745999838        tx-bytes:   4574215826482
                 tx-stop:            7033         tx-wake:            7033

  $ ynltool qstat show group-by queue
  eth0  rx-0     packets:        70196880           bytes:    178633973750
  eth0  rx-1     packets:        63623419           bytes:    197274745250
  ...
  eth0  tx-1     packets:        98645810           bytes:    631247647938
                    stop:            1048            wake:            1048
  eth0  tx-2     packets:        86775824           bytes:    563930471952
                    stop:            1126            wake:            1126
  ...

  $ ynltool -j qstat  | jq
  [
   {
    "ifname": "eth0",
    "ifindex": 2,
    "rx": {
      "packets": 493396439,
      "bytes": 1443608198921
    },
    "tx": {
      "packets": 746239978,
      "bytes": 4574333772645,
      "stop": 7072,
      "wake": 7072
    }
   }
  ]

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20251107162227.980672-4-kuba@kernel.org
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/net/ynl/ynltool/main.c
tools/net/ynl/ynltool/main.h
tools/net/ynl/ynltool/qstats.c [new file with mode: 0644]