Can anyone help me in this? I am trying to monitor the humidity for my network device and I did the snmpwalk which is: snmpget -v2c -cpublic -mALL 172.x.x.x .1.3.6.1.4.1.13742.4.2.x.x.x.x and it stated: SNMPv2-SMI::enterprises.13742.4.2.4.1.x.x = Gauge32: 2147483647 So what does the gauge32 means? And is there any way I can convert it to integer?
Asked
Active
Viewed 3,679 times
-3
-
Gauge32 is an unsigned 32 bit integer internally. What is the problem you are facing? The conversion to integer is almost automatic. – Lex Li Nov 19 '15 at 06:08
-
Thank you for your response Sir. I edited my question – Fiqah Sapnan Nov 19 '15 at 09:05
-
Possible duplicate of [Definition of SNMP Gauge32 vs Counter32](http://stackoverflow.com/questions/2718283/definition-of-snmp-gauge32-vs-counter32) – k1eran Nov 19 '15 at 09:45
1 Answers
1
The MIB object that you are trying to poll is defined in PDU-MIB from raritan [1]
RelativeHumidity ::= TEXTUAL-CONVENTION
DISPLAY-HINT "d"
STATUS current
DESCRIPTION
"Data type for reporting sensor readings and thresholds
associated with humidity sensors. Relative humidity is
expressed as percentage and is defined as the ratio of the
partial pressure of water vapor in a gaseous mixture of
air and water vapor to the saturated vapor pressure of water
at a given temperature."
SYNTAX Unsigned32 (0..100)
humidity OBJECT-TYPE
SYNTAX RelativeHumidity
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The value of the external humidity sensor reported
as relative humidity (a percentage)."
::= { humiditySensorEntry 3 }
So your relative humidity should be in range [0..100]. There could be two problems:
- The NET-SNMP fails to display the value properly for some reason
- The SNMP Agent does not implement this object or humidity sensor is not installed or disabled on device

Andrew Komiagin
- 6,446
- 1
- 13
- 23