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: SNMP device support |
From: | "Priller, John" <[email protected]> |
To: | 吴煊 <[email protected]> |
Cc: | "[email protected]" <[email protected]> |
Date: | Mon, 11 Jun 2018 10:26:12 +0000 |
Xuan;
By default the driver fetches data from the SNMP remote host using strings, but you can specify that it use the native data format of the OID by adding the 'n' flag to your INP specification. For example:
field(INP, "@$(IP) %(COMMUNITY)outputMeasurementCurrent.$(N) Float: 100 Fn")
(The 'F' flag specifies floating point data type) From: 吴煊 <[email protected]>
Sent: Monday, June 11, 2018 4:57 AM To: Priller, John; Priller, John Cc: [email protected] Subject: SNMP device support Hi Priller and all, Thanks for the excellent device support "snmp-nscl-1.0.0.1" which is used to control ISEG/MPOD modules. Everything works fine. Howerver, there is a requirement that we need 9 digits after decimal point for reading "outputMeasurementCurrent" which is 6 digits decimal by default. It can read 9 digits deciaml by using snmpget command when we update NET-SNMP to newest version net-snmp-5.8.rc3. The result is shown below moxa@RTCOWNS126:~/app$ snmpget -v 2c -M /usr/share/snmp/mibs:/usr/local/share/snmp/mibs -m +WIENER-CRATE-MIB -c guru 192.168.1.120 outputMeasurementCurrent.u400 The difference between the two command lines is "-Op .9" which means output precision 9 digits after decimal point. I can't find anything to set the paramenter in SNMP device support user manual. So my question is how to set paramenter "-Op .9" in snmp device support or how can I get higher precision using snmp device support? Base verison:3.14.12.5, The record is like this: record(ai, "$(GEO):$(SYS):$(CRATE):M$(SLOT):$(CH):Cur:Raw") Cheers, Xuan |