diff --git a/CHANGELOG.md b/CHANGELOG.md index 53359f0909..7855ac5327 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## master / unreleased +## 1.12.1 / 2026-07.14 + +* [BUGFIX] perf: Fix perf profiler flag handling #3731 +* [BUGFIX] edac: Fix optional csrow ue_count collection #3734 + ## 1.12.0 / 2026-07-10 * [FEATURE] mountstats: Add NFS mountpoint info metric #3554 diff --git a/VERSION b/VERSION index 0eed1a29ef..f8f4f03b3d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.12.0 +1.12.1 diff --git a/collector/edac_linux.go b/collector/edac_linux.go index 05246138ce..784d8c1095 100644 --- a/collector/edac_linux.go +++ b/collector/edac_linux.go @@ -190,18 +190,19 @@ func (c *edacCollector) Update(ch chan<- prometheus.Metric) error { ) value, err = readUintFromFile(filepath.Join(csrow, "ch"+channelNumber+"_ue_count")) - if err != nil { - return fmt.Errorf("couldn't get ue_count for controller/csrow/channel %s/%s/%s: %w", controllerNumber, csrowNumber, channelNumber, err) + if err == nil { + ch <- prometheus.MustNewConstMetric( + edacChannelUECount, + prometheus.CounterValue, + float64(value), + controllerNumber, + csrowNumber, + channelNumber, + label, + ) + } else { + c.logger.Debug("couldn't get ue_count for controller/csrow/channel %s/%s/%s: %w", controllerNumber, csrowNumber, channelNumber, err) } - ch <- prometheus.MustNewConstMetric( - edacChannelUECount, - prometheus.CounterValue, - float64(value), - controllerNumber, - csrowNumber, - channelNumber, - label, - ) } } } diff --git a/collector/fixtures/e2e-64k-page-output.txt b/collector/fixtures/e2e-64k-page-output.txt index 42307e4a94..17b7393acc 100644 --- a/collector/fixtures/e2e-64k-page-output.txt +++ b/collector/fixtures/e2e-64k-page-output.txt @@ -1367,8 +1367,10 @@ node_drbd_remote_unacknowledged{device="drbd1"} 12347 # TYPE node_edac_channel_correctable_errors_total counter node_edac_channel_correctable_errors_total{channel="0",controller="0",csrow="0",dimm_label="mc0_csrow0_channel0"} 0 node_edac_channel_correctable_errors_total{channel="0",controller="0",csrow="1",dimm_label="mc0_csrow1_channel0"} 0 +node_edac_channel_correctable_errors_total{channel="0",controller="0",csrow="2",dimm_label="mc0_csrow2_channel0"} 0 node_edac_channel_correctable_errors_total{channel="1",controller="0",csrow="0",dimm_label="mc0_csrow0_channel1"} 0 node_edac_channel_correctable_errors_total{channel="1",controller="0",csrow="1",dimm_label="mc0_csrow1_channel1"} 0 +node_edac_channel_correctable_errors_total{channel="1",controller="0",csrow="2",dimm_label="mc0_csrow2_channel1"} 0 # HELP node_edac_channel_uncorrectable_errors_total Total uncorrectable memory errors for this channel. # TYPE node_edac_channel_uncorrectable_errors_total counter node_edac_channel_uncorrectable_errors_total{channel="0",controller="0",csrow="0",dimm_label="mc0_csrow0_channel0"} 2 @@ -1382,11 +1384,13 @@ node_edac_correctable_errors_total{controller="0"} 1 # TYPE node_edac_csrow_correctable_errors_total counter node_edac_csrow_correctable_errors_total{controller="0",csrow="0"} 3 node_edac_csrow_correctable_errors_total{controller="0",csrow="1"} 0 +node_edac_csrow_correctable_errors_total{controller="0",csrow="2"} 0 node_edac_csrow_correctable_errors_total{controller="0",csrow="unknown"} 2 # HELP node_edac_csrow_uncorrectable_errors_total Total uncorrectable memory errors for this csrow. # TYPE node_edac_csrow_uncorrectable_errors_total counter node_edac_csrow_uncorrectable_errors_total{controller="0",csrow="0"} 4 node_edac_csrow_uncorrectable_errors_total{controller="0",csrow="1"} 4 +node_edac_csrow_uncorrectable_errors_total{controller="0",csrow="2"} 5 node_edac_csrow_uncorrectable_errors_total{controller="0",csrow="unknown"} 6 # HELP node_edac_uncorrectable_errors_total Total uncorrectable memory errors. # TYPE node_edac_uncorrectable_errors_total counter diff --git a/collector/fixtures/e2e-output.txt b/collector/fixtures/e2e-output.txt index 7dc0b57a7d..f121daacbc 100644 --- a/collector/fixtures/e2e-output.txt +++ b/collector/fixtures/e2e-output.txt @@ -1399,8 +1399,10 @@ node_drbd_remote_unacknowledged{device="drbd1"} 12347 # TYPE node_edac_channel_correctable_errors_total counter node_edac_channel_correctable_errors_total{channel="0",controller="0",csrow="0",dimm_label="mc0_csrow0_channel0"} 0 node_edac_channel_correctable_errors_total{channel="0",controller="0",csrow="1",dimm_label="mc0_csrow1_channel0"} 0 +node_edac_channel_correctable_errors_total{channel="0",controller="0",csrow="2",dimm_label="mc0_csrow2_channel0"} 0 node_edac_channel_correctable_errors_total{channel="1",controller="0",csrow="0",dimm_label="mc0_csrow0_channel1"} 0 node_edac_channel_correctable_errors_total{channel="1",controller="0",csrow="1",dimm_label="mc0_csrow1_channel1"} 0 +node_edac_channel_correctable_errors_total{channel="1",controller="0",csrow="2",dimm_label="mc0_csrow2_channel1"} 0 # HELP node_edac_channel_uncorrectable_errors_total Total uncorrectable memory errors for this channel. # TYPE node_edac_channel_uncorrectable_errors_total counter node_edac_channel_uncorrectable_errors_total{channel="0",controller="0",csrow="0",dimm_label="mc0_csrow0_channel0"} 2 @@ -1414,11 +1416,13 @@ node_edac_correctable_errors_total{controller="0"} 1 # TYPE node_edac_csrow_correctable_errors_total counter node_edac_csrow_correctable_errors_total{controller="0",csrow="0"} 3 node_edac_csrow_correctable_errors_total{controller="0",csrow="1"} 0 +node_edac_csrow_correctable_errors_total{controller="0",csrow="2"} 0 node_edac_csrow_correctable_errors_total{controller="0",csrow="unknown"} 2 # HELP node_edac_csrow_uncorrectable_errors_total Total uncorrectable memory errors for this csrow. # TYPE node_edac_csrow_uncorrectable_errors_total counter node_edac_csrow_uncorrectable_errors_total{controller="0",csrow="0"} 4 node_edac_csrow_uncorrectable_errors_total{controller="0",csrow="1"} 4 +node_edac_csrow_uncorrectable_errors_total{controller="0",csrow="2"} 5 node_edac_csrow_uncorrectable_errors_total{controller="0",csrow="unknown"} 6 # HELP node_edac_uncorrectable_errors_total Total uncorrectable memory errors. # TYPE node_edac_uncorrectable_errors_total counter diff --git a/collector/fixtures/sys.ttar b/collector/fixtures/sys.ttar index 26ac030d21..d6829754d6 100644 --- a/collector/fixtures/sys.ttar +++ b/collector/fixtures/sys.ttar @@ -9572,6 +9572,14 @@ Lines: 1 0 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Directory: sys/devices/system/edac/mc/mc0/csrow2 +Mode: 755 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: sys/devices/system/edac/mc/mc0/csrow2/ch0_ce_count +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Path: sys/devices/system/edac/mc/mc0/csrow0/ch1_ce_count Lines: 1 0 @@ -9582,6 +9590,11 @@ Lines: 1 0 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: sys/devices/system/edac/mc/mc0/csrow2/ch1_ce_count +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Path: sys/devices/system/edac/mc/mc0/csrow0/ce_count Lines: 1 3 @@ -9617,6 +9630,16 @@ Lines: 1 4 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: sys/devices/system/edac/mc/mc0/csrow2/ce_count +Lines: 1 +0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: sys/devices/system/edac/mc/mc0/csrow2/ue_count +Lines: 1 +5 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Path: sys/devices/system/edac/mc/mc0/csrow0/ue_count Lines: 1 4 @@ -9652,6 +9675,16 @@ Lines: 1 mc0csrow1channel1 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: sys/devices/system/edac/mc/mc0/csrow2/ch0_dimm_label +Lines: 1 +mc0csrow2channel0 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Path: sys/devices/system/edac/mc/mc0/csrow2/ch1_dimm_label +Lines: 1 +mc0csrow2channel1 +Mode: 644 +# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Directory: sys/devices/system/node Mode: 755 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/collector/perf_linux.go b/collector/perf_linux.go index e4c4b81d29..a7f95507bd 100644 --- a/collector/perf_linux.go +++ b/collector/perf_linux.go @@ -338,19 +338,23 @@ func NewPerfCollector(logger *slog.Logger) (Collector, error) { // Configure perf profilers hardwareProfilers := perf.AllHardwareProfilers if len(*perfHwProfilerFlag) > 0 { - // hardwareProfilers = 0 + hardwareProfilers = 0 for _, hf := range *perfHwProfilerFlag { if v, ok := perfHardwareProfilerMap[hf]; ok { hardwareProfilers |= v + } else { + logger.Error("Unknown hardware profiler: " + hf) } } } softwareProfilers := perf.AllSoftwareProfilers if len(*perfSwProfilerFlag) > 0 { - // softwareProfilers = 0 + softwareProfilers = 0 for _, sf := range *perfSwProfilerFlag { if v, ok := perfSoftwareProfilerMap[sf]; ok { softwareProfilers |= v + } else { + logger.Error("Unknown software profiler: " + sf) } } } @@ -360,6 +364,8 @@ func NewPerfCollector(logger *slog.Logger) (Collector, error) { for _, cf := range *perfCaProfilerFlag { if v, ok := perfCacheProfilerMap[cf]; ok { cacheProfilers |= v + } else { + logger.Error("Unknown cache profiler: " + cf) } } }