You are not logged in.
Pages: 1
Hello:
After much procrastinating, I finally set about cleaning up my conky.conf file.
This year's has been a very hot summer and the fans in the box many times ran at high speeds.
I need to know what is going on inside temperature wise.
The on-board w83627ehf chip is not activated and loading the module gives bogus/unreliable readings.
The only way I can get a reasonably approximate in-box temperature reading are from the pair of SCSI cards I have inside, their readings should be good enough to get an idea of internal temperatures.
So, to that effect, I need to run these lines in conky:
Case 0: +${exec sensors drivetemp-scsi-5-0 | grep 'temp1' | cut -c 30-39} C
Case 1: +${exec sensors drivetemp-scsi-3-0 | grep 'temp1' | cut -c 30-39} C}
The problem I have is that sensors can only be run as root so it is not working from conky.
~$ sensors drivetemp-scsi-5-0 | grep 'temp1' | cut -c 30-39
Error: File /etc/sensors.d/sun_u24.conf: Permission denied
sensors_init: General parse error
~$
~$ sudo sensors drivetemp-scsi-5-0 | grep 'temp1' | cut -c 30-39
[sudo] password for groucho:
+34.0 C
~$
Everything else works properly.
Any pointers will be appreciated.
Best,
A.
Last edited by Altoid (2024-03-11 23:53:42)
Offline
It is possible to set sudo to execute certain commands (which would normally require a password) without a password. That will meet your use-case. See the following as extra help:
Offline
senHello:
... set sudo to execute certain commands ...
Indeed.
But I was wanting to avoid adding to my overpopulated sudoers.d directory and thought that maybe there was a way to get that done within conky for cases like this.
Guess that will have to do. 8^)
I'll test it and see how it goes.
Edit: that did it - works as advertised.
Thank you very much for your input.
Best,
A.
Last edited by Altoid (2024-03-12 13:10:42)
Offline
Pages: 1