Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"acpi" plugin issue #1642

Open
LeererMann opened this issue Jan 4, 2025 · 0 comments
Open

"acpi" plugin issue #1642

LeererMann opened this issue Jan 4, 2025 · 0 comments

Comments

@LeererMann
Copy link

LeererMann commented Jan 4, 2025

Describe the bug

~:/etc/munin/plugins # munin-run acpi
thermal_zone0.value 20
cat: /sys/class/thermal/thermal_zone1/temp: No data available
thermal_zone1.value 0

To Reproduce

Run/use "acpi" on a system where temp in a zone does not contain data.

Expected behavior

No error message.

Screenshots & Logs

N/A

Desktop (please complete the following information):

Suse Tumbleweed on a MINISFORUM Venus Series UM790 Pro Mini PC AMD Ryzen 9 7940HS
unbound-munin-1.22.0-1.1.noarch
munin-node-2.0.72-9.1.noarch
munin-2.0.72-9.1.noarch

Additional context

Here is a patch for the "acpi" plugin. Without the patch this can occur:

~:/etc/munin/plugins # munin-run acpi
thermal_zone0.value 20
cat: /sys/class/thermal/thermal_zone1/temp: No data available
thermal_zone1.value 0
~:/etc/munin/plugins #

When temp in the zone does not contain data. With the patch normal behavior:

~:/etc/munin/plugins # munin-run acpi
thermal_zone0.value 20
thermal_zone1.value 0
~:/etc/munin/plugins # 

Patch:

-- /usr/lib/munin/plugins/acpi.org    2024-09-29 15:48:45.000000000 -0500
+++ /usr/lib/munin/plugins/acpi    2025-01-04 12:40:55.637512697 -0600
@@ -58,7 +58,7 @@
 
 do_ () { # Fetch
     for ZONE in $ATZ; do
-         TEMP=$(cat "$ZONE/temp")
+         TEMP=$(cat "$ZONE/temp" 2>/dev/null)
          echo "$(basename "$ZONE").value $(echo "$TEMP" | awk '{print $1/1000}')"
     done
     exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant