Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions collector/fixtures/e2e-64k-page-output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3702,6 +3702,10 @@ node_qdisc_packets_total{device="wlan0",kind="fq"} 42
# TYPE node_qdisc_requeues_total counter
node_qdisc_requeues_total{device="eth0",kind="pfifo_fast"} 2
node_qdisc_requeues_total{device="wlan0",kind="fq"} 1
# HELP node_qdisc_throttled_total Number of times the qdisc has been throttled to enforce pacing (fq).
# TYPE node_qdisc_throttled_total counter
node_qdisc_throttled_total{device="eth0",kind="pfifo_fast"} 0
node_qdisc_throttled_total{device="wlan0",kind="fq"} 3
# HELP node_rapl_core_joules_total Current RAPL core value in joules
# TYPE node_rapl_core_joules_total counter
node_rapl_core_joules_total{index="0",path="collector/fixtures/sys/class/powercap/intel-rapl:0:0"} 118821.284256
Expand Down
4 changes: 4 additions & 0 deletions collector/fixtures/e2e-output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3734,6 +3734,10 @@ node_qdisc_packets_total{device="wlan0",kind="fq"} 42
# TYPE node_qdisc_requeues_total counter
node_qdisc_requeues_total{device="eth0",kind="pfifo_fast"} 2
node_qdisc_requeues_total{device="wlan0",kind="fq"} 1
# HELP node_qdisc_throttled_total Number of times the qdisc has been throttled to enforce pacing (fq).
# TYPE node_qdisc_throttled_total counter
node_qdisc_throttled_total{device="eth0",kind="pfifo_fast"} 0
node_qdisc_throttled_total{device="wlan0",kind="fq"} 3
# HELP node_rapl_core_joules_total Current RAPL core value in joules
# TYPE node_rapl_core_joules_total counter
node_rapl_core_joules_total{index="0",path="collector/fixtures/sys/class/powercap/intel-rapl:0:0"} 118821.284256
Expand Down
3 changes: 2 additions & 1 deletion collector/fixtures/qdisc/results.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"Packets": 42,
"Requeues": 1,
"Kind": "fq",
"Drops": 1
"Drops": 1,
"Throttled": 3
},
{
"IfaceName": "eth0",
Expand Down
7 changes: 7 additions & 0 deletions collector/qdisc_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type qdiscStatCollector struct {
drops typedDesc
requeues typedDesc
overlimits typedDesc
throttled typedDesc
qlength typedDesc
backlog typedDesc
}
Expand Down Expand Up @@ -101,6 +102,11 @@ func NewQdiscStatCollector(logger *slog.Logger) (Collector, error) {
"Number of overlimit packets.",
[]string{"device", "kind"}, nil,
), prometheus.CounterValue},
throttled: typedDesc{prometheus.NewDesc(
prometheus.BuildFQName(namespace, "qdisc", "throttled_total"),
"Number of times the qdisc has been throttled to enforce pacing (fq).",
[]string{"device", "kind"}, nil,
), prometheus.CounterValue},
qlength: typedDesc{prometheus.NewDesc(
prometheus.BuildFQName(namespace, "qdisc", "current_queue_length"),
"Number of packets currently in queue to be sent.",
Expand Down Expand Up @@ -159,6 +165,7 @@ func (c *qdiscStatCollector) Update(ch chan<- prometheus.Metric) error {
ch <- c.drops.mustNewConstMetric(float64(msg.Drops), msg.IfaceName, msg.Kind)
ch <- c.requeues.mustNewConstMetric(float64(msg.Requeues), msg.IfaceName, msg.Kind)
ch <- c.overlimits.mustNewConstMetric(float64(msg.Overlimits), msg.IfaceName, msg.Kind)
ch <- c.throttled.mustNewConstMetric(float64(msg.Throttled), msg.IfaceName, msg.Kind)
ch <- c.qlength.mustNewConstMetric(float64(msg.Qlen), msg.IfaceName, msg.Kind)
ch <- c.backlog.mustNewConstMetric(float64(msg.Backlog), msg.IfaceName, msg.Kind)
}
Expand Down
Loading