From 7cc7c96966b44ae376dac7b01ecbd7c563d21b48 Mon Sep 17 00:00:00 2001 From: fach Date: Tue, 2 Jun 2020 12:11:19 -0400 Subject: [PATCH] Add queue length/backlog stats --- get.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/get.go b/get.go index 9191594..c83024c 100644 --- a/get.go +++ b/get.go @@ -86,6 +86,8 @@ type QdiscInfo struct { GcFlows uint64 Throttled uint64 FlowsPlimit uint64 + Qlen uint32 + Backlog uint32 } func parseTCAStats(attr netlink.Attribute) TC_Stats { @@ -237,6 +239,8 @@ func parseMessage(msg netlink.Message) (QdiscInfo, error) { // requeues only available in TCA_STATS2, not in TCA_STATS m.Requeues = s2.Requeues m.Overlimits = s2.Overlimits + m.Qlen = s2.Qlen + m.Backlog = s2.Backlog case TCA_STATS: // Legacy s = parseTCAStats(attr) @@ -244,6 +248,8 @@ func parseMessage(msg netlink.Message) (QdiscInfo, error) { m.Packets = s.Packets m.Drops = s.Drops m.Overlimits = s.Overlimits + m.Qlen = s.Qlen + m.Backlog = s.Backlog default: // TODO: TCA_OPTIONS and TCA_XSTATS }