prometheus/node_exporter · error

could not get softnet statistics

Error message

could not get softnet statistics: %w

What it means

The per-CPU softnet statistics could not be read from procfs: c.fs.NetSoftnetStat() failed while Update() was gathering metrics for the /proc/net/softnet_stat file. This fires when /proc/net/softnet_stat is missing or unreadable, which typically happens on kernels without networking procfs support or in restricted containers/LSMs (e.g. AppArmor/SELinux) that deny reads of procfs networking files; the wrapped error names the underlying cause. Update returns the error so the scrape reports a failed collection rather than partial softnet metrics.

Solutions

  1. Check `cat /proc/net/softnet_stat` — it should have one hex column row per CPU.
  2. Ensure the file is readable by the exporter user (hidepid or LSM policies can block it).
  3. Retry; transient errors during CPU hotplug clear on the next scrape.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at collector/softnet_linux.go:101 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of prometheus/node_exporter@17ddd77c59 (2026-09-07). Data as JSON: /api/errors/291e6146b7d20af1. Report an issue: GitHub.

Appendix: source

Thrown at collector/softnet_linux.go:101

			"Number of times flow limit has been reached",
			[]string{"cpu"}, nil,
		),
		softnetBacklogLen: prometheus.NewDesc(
			prometheus.BuildFQName(namespace, softnetSubsystem, "backlog_len"),
			"Softnet backlog status",
			[]string{"cpu"}, nil,
		),
		logger: logger,
	}, nil
}

// Update gets parsed softnet statistics using procfs.
func (c *softnetCollector) Update(ch chan<- prometheus.Metric) error {
	var cpu string

	stats, err := c.fs.NetSoftnetStat()
	if err != nil {
		return fmt.Errorf("could not get softnet statistics: %w", err)
	}

	for _, cpuStats := range stats {
		cpu = strconv.FormatUint(uint64(cpuStats.Index), 10)

		ch <- prometheus.MustNewConstMetric(
			c.processed,
			prometheus.CounterValue,
			float64(cpuStats.Processed),
			cpu,
		)
		ch <- prometheus.MustNewConstMetric(
			c.dropped,
			prometheus.CounterValue,
			float64(cpuStats.Dropped),
			cpu,
		)
		ch <- prometheus.MustNewConstMetric(

View on GitHub (pinned to 17ddd77c59)