Re: NULL result with net-snmp-5.9.4_1,1
- Reply: Mark Johnston : "Re: NULL result with net-snmp-5.9.4_1,1"
- In reply to: Mark Johnston : "Re: NULL result with net-snmp-5.9.4_1,1"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 02 Jun 2024 07:36:44 UTC
On 6/1/24 22:45, Mark Johnston wrote:
> I believe that in net-snmp-5.9.4_1,1, snmpd is running as the "snmpd"
> user rather than as root. Can you confirm this? net-snmp-5.9.4_2,1
> reverts back to running as root. Does that fix the problem for you?
Sure,
# ps axu | grep snmpd
root 1756 0.0 0.0 34688 13512 - S Sat07 1:15.54
/usr/local/sbin/snmpd -p /var/run/net_snmpd.pid -c /usr/local/etc/snmpd.conf
root 79855 0.0 0.0 12876 2432 0 S+ 14:29 0:00.00
grep snmpd
# grep snmp-cpu-temperature.sh /usr/local/etc/snmpd.conf
extend cpu-temperature /root/x/snmp-cpu-temperature.sh
> What is in your snmp-cpu-temperature.sh script? Does it need to run as
> root? (I'd be a bit surprised if so.)
Yes, running with root privilege.
# cat /root/x/snmp-cpu-temperature.sh
#!/usr/bin/env sh
for index in $(jot - 0 11)
do
sysctl -n dev.cpu.$index.temperature | awk '{gsub("C",""); print}'
done
>> with net-snmp-5.9.4_2,1 for what it's worth:
>>
>> [dvl@besser:~] $ snmpwalk -v3 -l authPriv -u roMinion -a SHA -A $AUTHPASS -X $PRIVPASS -x AES dev-nginx01.int.unixathome.org | grep temperature
>> [dvl@besser:~] $
>
> This is in the extension MIB, so presumably Budi has some configuration
> to add these OIDs. Did you add something like that?
[...]
Anyway, thanks for your work.
--
Regards,
Budi Janto