[Cialug] SNMP & lmsensors, oh my!

Jonathan Bailey jcbailey at code0.net
Mon Jun 20 14:20:42 CDT 2005


Ok, maybe the subject was a bit strange...


I'm looking to integrate sensors monitoring into SNMP without having to
recompile SNMPd. I figure that using an external script might work, but the
results come back as NaN rather than a number. When I do an snmpget, it
shows the data type as string. Is there any way to force this to integer or
double?


root at dilithium:~ # snmpget -v 1 -c public localhost
enterprises.ucdavis.extTable.extEntry.extOutput.1
UCD-SNMP-MIB::extOutput.1 = STRING: 71.0




root at dilithium:~ # cat cputemp.sh
#! /bin/sh
sensors | awk '/CPU/ {print substr($3,2,length($2)-1)}'




--------------------
Jonathan C Bailey
Code0 Networks
jcbailey at code0.net
(515) 957-0579 



More information about the Cialug mailing list