From 25a17b21adbc3cf9cf8800c51c44944076db9933 Mon Sep 17 00:00:00 2001 From: Ben Allan Date: Tue, 3 Sep 2024 14:31:53 -0600 Subject: [PATCH] fix device group detection for mellanox in filesingle --- ldms/src/sampler/filesingle/ldms-sensors-config | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ldms/src/sampler/filesingle/ldms-sensors-config b/ldms/src/sampler/filesingle/ldms-sensors-config index aa2eb184a..b342a9a65 100755 --- a/ldms/src/sampler/filesingle/ldms-sensors-config +++ b/ldms/src/sampler/filesingle/ldms-sensors-config @@ -1,5 +1,4 @@ #! /usr/bin/env python2 -# $0: sensors_bin_path # Run sensors under strace to discover where sensor files # live on the current system and generate a draft file. import warnings @@ -178,8 +177,9 @@ def main(): if lastfiletype in ignore_types: continue continue - if l.find(":") == -1: - lastgroup = l + # exclude lines with "xxxxx:" and "sdf: bar" but allow : in mlx device names. + if ": " not in line and line[-1] != ':': + last_group = line for k,d in devices.iteritems(): if len(d["items"]) > 0: @@ -262,4 +262,3 @@ def main(): if __name__ == "__main__": main() -