You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've just started using munin and I love it so far, but I just stumbled upon something weird in the hwmon_temp graph :
I dug into the plugin's code to try and understand those labels, and how I could get it to get the actual device names that lm_sensors was reporting correctly (Core 1, Core 2…).
I've never touched perl before in my life, but from what I gathered from this and the Munin::Plugin code, is that readarray(…) parses the first line of a file into an array by splitting on whitespaces. And the funny labels I was getting happened to match the number of words in the label (i.e 2 for "Core [0-9]" and 3 for "Package id 0").
I get the feeling that what this line was supposed to do was something like :
Which would have returned the first element of the array instead of its length, but still would have cropped any label with spaces to its first element. So I tried to replace it with :
my ($label) = readfile($path . "_label") || (($devname || "") . "$name");
chomp($label); # For the trailing newline
I don't know if it's the best solution but it works 🤷
The text was updated successfully, but these errors were encountered:
Hi, I've just started using munin and I love it so far, but I just stumbled upon something weird in the hwmon_temp graph :
I dug into the plugin's code to try and understand those labels, and how I could get it to get the actual device names that lm_sensors was reporting correctly (Core 1, Core 2…).
What I found is this :
munin/plugins/node.d.linux/hwmon
Line 155 in a24eda7
I've never touched perl before in my life, but from what I gathered from this and the Munin::Plugin code, is that readarray(…) parses the first line of a file into an array by splitting on whitespaces. And the funny labels I was getting happened to match the number of words in the label (i.e 2 for "Core [0-9]" and 3 for "Package id 0").
I get the feeling that what this line was supposed to do was something like :
Which would have returned the first element of the array instead of its length, but still would have cropped any label with spaces to its first element. So I tried to replace it with :
I don't know if it's the best solution but it works 🤷
The text was updated successfully, but these errors were encountered: