I'm creating a munin plugin to fetch temp values from my Pi's.

When running the script, as root, everything is fine:

pi /etc/munin/plugins # ./temp 
temp.value 47.1

But when running it directly from Munin, it gives an error:

pi /etc/munin/plugins # telnet localhost 4949
Connected to localhost.
Escape character is '^]'.
# munin node at pi.yeri.be
fetch temp
temp.value VCHI initialization failed

Some users suggested to add the user (munin in my case) that would need access to */opt/vc/bin/vcgencmd measure_temp* to the plugdev or video group. I've tried both and neither worked.

I don't want to run a cron from root that writes the value to a file and have munin cat that file. Is there a way to give Munin access to that command?



I had the same problem, my solution is adding my user to video group, and it worked like a charm.

sudo usermod -a -G video myuser

and a reboot afterward (the new groups will only be recognize after reboot).

  • had the same problem, simonsays is correct, it worked for me – user11562 Dec 28 '13 at 0:43
  • 1
    @rdpayne Please don't post comments as answers they only serve to increase the noise level (I have converted your answer to a comment). Also instead of adding comments to say it worked vote up the answer and possibly the question which solved your problem. – Steve Robillard Dec 28 '13 at 2:39

vcgencmd does not require root access to run (I could run it just fine from my non-root account) and ls command confirms this:

$ vcgencmd measure_temp
$ ls -al /opt/vc/bin/vcgencmd 
-rwxr-xr-x 1 root root 15054 May 17 02:29 /opt/vc/bin/vcgencmd

also you may read directly the /sys/class/thermal/thermal_zone0/temp to get the temperature, it's available to read for everyone:

$ ls -al /sys/class/thermal/thermal_zone0/temp 
-r--r--r-- 1 root root 4096 May 18 22:15 /sys/class/thermal/thermal_zone0/temp
  • Yes, I can also run it from another user. But Munin, either the process or the user does not have access, as seen from my telnet command. – Tuinslak May 22 '13 at 15:37
  • permissions 0444 mean EVERYBODY has access, your problem lies somewhere else. try to recreate the temp.value VCHI initialization failed situation manually, log as Munin or strip your permissions to its level and then you'll see what's wrong. – lenik May 22 '13 at 15:47

try this:

login to root, and:

echo 'SUBSYSTEM=="vchiq", GROUP="video", MODE="0660"' > /etc/udev/rules.d/99-input.rules

check the file name "99-input.rules" is the same on your pi


The solution was to use "user" in the Munin config:

[temp] user root

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.