[Cialug] SNMP & lmsensors, oh my!

Jerry Weida jweida at gmail.com
Mon Jun 20 14:43:29 CDT 2005


This value is defined in the MIB object. You could always rewrite the MIB, 
but if you are using the value in a shell script, why not just force your 
variable to a typeset of integer?

On 6/20/05, Jonathan Bailey <jcbailey at code0.net> wrote:
> 
> 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
> 
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cialug.org/pipermail/cialug/attachments/20050620/5782b463/attachment.htm


More information about the Cialug mailing list