1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 <2014> 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 <2014> 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Trouble with OID name using devsnmp. |
From: | Nicoletta Petrella <[email protected]> |
To: | "John A. Priller" <[email protected]>, <[email protected]> |
Cc: | <[email protected]> |
Date: | Wed, 7 May 2014 08:43:38 +0100 |
Hi John and Eric,
Thank you very much for your answer.
I had tried before with INTEGER: and I tried again this morning with
record(ai, "TME:TempTimes10")
{
field(DESC, "TME Temper sensor")
field(DTYP, "Snmp")
field(INP, "@192.168.58.96 public SNMPv2-SMI::enterprises.18248.1.1.1.0 INTEGER: 100")
field(EGU, "degrees C")
field(LINR, "LINEAR")
field(SCAN, "1 second")
field(HIHI, "250")
field(HHSV, "MAJOR")
}
but I still get 0 as value and still
-bash-4.1$ camonitor TME:TempTimes10
TME:TempTimes10 2014-05-07 08:30:49.489621 0 READ INVALID
have you got any other idea?
Thank you very much.
Nicoletta
Well spotted, that could indeed be the issue. In particular try INTEGER: (with the colon), that's the "mask" the code will be looking for in the reply returned from the slave, which occurs directly before the value it's supposed to parse out.
That should work in this case. Some devices return strings like 'INTEGER: on(1)' where you need to specify the mask as '(' in order to find where the integer to parse out actually is.
On 5/6/2014 12:27 PM, Eric Norum wrote:Disclaimer — I know very little about SNMP.But I do see a possible issue.In the version that works you’re asking for an INTEGER — which is what the snmpget and snmpwalk show as well.field(INP, "@MailScanner warning: numerical links are often malicious: 145.239.84.45 public SNMPv2-SMI::enterprises.38783.3.9.0 INTEGER: 100”)
In the version that fails you’re asking for a Float — which doesn’t match.field(INP, "@MailScanner warning: numerical links are often malicious: 192.168.58.96 public SNMPv2-SMI::enterprises.18248.1.1.1.0 Float: 100”)Try changing the ‘Float’ in the INP field to ‘INTEGER’ and see if that helps.On May 6, 2014, at 9:00 AM, Nicoletta Petrella <[email protected]> wrote:Dear all,
I have got installed a TME - Ethernet Thermometer, (http://www.papouch.com/en/shop/product/tme-ip-ethernet-thermometer/) which supports SNMP protocol, and I would like to read the temperature using EPICS with devSnmp.
My simple database isrecord(ai, "TME:TempTimes10"){field(DESC, "TME Temperarature sensor")field(DTYP, "Snmp")field(INP, "@MailScanner warning: numerical links are often malicious: 192.168.58.96 public SNMPv2-SMI::enterprises.18248.1.1.1.0 Float: 100")field(EGU, "degrees C")field(LINR, "LINEAR")field(SCAN, "1 second")field(HIHI, "250")field(HHSV, "MAJOR")
}
The ioc runs ok without errors, but with caget I only get 0 as temperature’s value, and with camonitor I get the value is INVALID
-bash-4.1$ camonitor TME:TempTimes10TME:TempTimes10 2014-05-06 16:43:11.479828 0 READ INVALID
I posted a similar question a while ago for a different monitor, and at that time I solved the problem using an OID name as given back from snmpget, but this solution does not work this time.
-bash-4.1$ snmpget -v1 -c public 192.168.58.96 1.3.6.1.4.1.18248.1.1.1.0SNMPv2-SMI::enterprises.18248.1.1.1.0 = INTEGER: 182-bash-4.1$The OID name seems to be ok, so I cannot understand why I keep obtaining 0 as a value from caget, and I can get right value from snmp.
The same ioc works ok with a different module and with the following databaserecord(ai, "TCW122B:Temp1Times10")
{field(DESC, "Temperarature sensor 1")field(DTYP, "Snmp")field(INP, "@MailScanner warning: numerical links are often malicious: 145.239.84.45 public SNMPv2-SMI::enterprises.38783.3.9.0 INTEGER: 100")field(EGU, "degrees C")field(LINR, "LINEAR")field(SCAN, "1 second")field(HIHI, "250")field(HHSV, "MAJOR")}
Could anyone help me to understand why I get always 0 using caget but I get right value from snmpget?Thank you very much.Kind regards,Nicoletta
The snmpwalk gives
-bash-4.1$ snmpwalk -v1 -c public 192.168.58.96SNMPv2-MIB::sysDescr.0 = STRING: TMESNMPv2-MIB::sysObjectID.0 = OID: ccitt.9.43.6.1.4.1DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (10197595) 1 day, 4:19:35.95SNMPv2-MIB::sysContact.0 = STRING:SNMPv2-MIB::sysName.0 = STRING:SNMPv2-MIB::sysLocation.0 = STRING:SNMPv2-MIB::sysServices.0 = INTEGER: 12IF-MIB::ifNumber.0 = INTEGER: 1IF-MIB::ifIndex.1 = INTEGER: 1IF-MIB::ifDescr.1 = STRING: NetworkIF-MIB::ifType.1 = INTEGER: ethernetCsmacd(6)IF-MIB::ifMtu.1 = INTEGER: 1500IF-MIB::ifSpeed.1 = Gauge32: 10000000IF-MIB::ifPhysAddress.1 = STRING: 0:20:4a:c9:63:bdIF-MIB::ifAdminStatus.1 = INTEGER: up(1)IF-MIB::ifOperStatus.1 = INTEGER: up(1)IF-MIB::ifLastChange.1 = Timeticks: (0) 0:00:00.00IF-MIB::ifInOctets.1 = Counter32: 13254469IF-MIB::ifInUcastPkts.1 = Counter32: 185466IF-MIB::ifInNUcastPkts.1 = Counter32: 0IF-MIB::ifInDiscards.1 = Counter32: 0IF-MIB::ifInErrors.1 = Counter32: 0IF-MIB::ifInUnknownProtos.1 = Counter32: 0IF-MIB::ifOutOctets.1 = Counter32: 356137879IF-MIB::ifOutUcastPkts.1 = Counter32: 11019IF-MIB::ifOutNUcastPkts.1 = Counter32: 665IF-MIB::ifOutDiscards.1 = Counter32: 0IF-MIB::ifOutErrors.1 = Counter32: 0IF-MIB::ifOutQLen.1 = Gauge32: 2IP-MIB::ipForwarding.0 = INTEGER: notForwarding(2)IP-MIB::ipDefaultTTL.0 = INTEGER: 31IP-MIB::ipInReceives.0 = Counter32: 44978IP-MIB::ipInHdrErrors.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::ipInAddrErrors.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::ipForwDatagrams.0 = Counter32: 0IP-MIB::ipInUnknownProtos.0 = Counter32: 0IP-MIB::ipInDiscards.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::ipInDelivers.0 = Counter32: 44984IP-MIB::ipOutRequests.0 = Counter32: 0IP-MIB::ipOutDiscards.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::ipOutNoRoutes.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::ipReasmTimeout.0 = INTEGER: 0 secondsIP-MIB::ipReasmReqds.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::ipReasmOKs.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::ipReasmFails.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::ipFragOKs.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::ipFragFails.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::ipFragCreates.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::ipAdEntAddr.192.168.58.96 = IpAddress: 192.168.58.96IP-MIB::ipAdEntIfIndex.192.168.58.96 = INTEGER: 1IP-MIB::ipAdEntNetMask.192.168.58.96 = IpAddress: 255.255.255.0IP-MIB::ipAdEntBcastAddr.192.168.58.96 = INTEGER: 1IP-MIB::ipAdEntReasmMaxSize.192.168.58.96 = INTEGER: 0IP-MIB::icmpInMsgs.0 = Counter32: 0IP-MIB::icmpInErrors.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::icmpInDestUnreachs.0 = Counter32: 0IP-MIB::icmpInTimeExcds.0 = Counter32: 0IP-MIB::icmpInParmProbs.0 = Counter32: 0IP-MIB::icmpInSrcQuenchs.0 = Counter32: 0IP-MIB::icmpInRedirects.0 = Counter32: 0IP-MIB::icmpInEchos.0 = Counter32: 0IP-MIB::icmpInEchoReps.0 = Counter32: 0IP-MIB::icmpInTimestamps.0 = Counter32: 0IP-MIB::icmpInTimestampReps.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::icmpInAddrMasks.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::icmpInAddrMaskReps.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::icmpOutMsgs.0 = Counter32: 0IP-MIB::icmpOutErrors.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::icmpOutDestUnreachs.0 = Counter32: 120IP-MIB::icmpOutTimeExcds.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::icmpOutParmProbs.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::icmpOutSrcQuenchs.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::icmpOutRedirects.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::icmpOutEchos.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::icmpOutEchoReps.0 = Counter32: 0IP-MIB::icmpOutTimestamps.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::icmpOutTimestampReps.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::icmpOutAddrMasks.0 = Wrong Type (should be Counter32): INTEGER: 0IP-MIB::icmpOutAddrMaskReps.0 = Wrong Type (should be Counter32): INTEGER: 0UDP-MIB::udpInDatagrams.0 = Counter32: 24553UDP-MIB::udpNoPorts.0 = Counter32: 3526UDP-MIB::udpInErrors.0 = Counter32: 13349UDP-MIB::udpOutDatagrams.0 = Counter32: 494
..... @@ ........
....@(';')@.......
..0==/--\==0....
....../___\........
......_| |_.........
--
Eric Norum
[email protected]-- John A. Priller | Phone : (517) 908-7375 MSU Cyclotron Laboratory | Fax : (517) 908-7126 640 S. Shaw Lane room 1300D | Email : [email protected] East Lansing, MI 48824 | Web : http://people.nscl.msu.edu/~priller/