0

Objects in the MIB are defined using a subset of A ASN.1. following as

nsMemory                    OBJECT IDENTIFIER ::= {netSnmpObjects 31}
nsSwap                      OBJECT IDENTIFIER ::= {netSnmpObjects 32}
nsCPU                       OBJECT IDENTIFIER ::= {netSnmpObjects 33}
nsLoad                      OBJECT IDENTIFIER ::= {netSnmpObjects 34}
nsDiskIO                    OBJECT IDENTIFIER ::= {netSnmpObjects 35}

then, there is only format of OBJECT. where is the real value such as "2048"?? will snmpd process and calculate them immediately?

  • 1
    You are talking about the Net-SNMP agent document "NET-SNMP-SYSTEM-MIB". It seems to me that all objects are placeholders, not real things you should rely on. – Lex Li Nov 15 '16 at 03:24

1 Answers1

1

MIBs do not contain values. They only define names and types of values that SNMP agent (a hardware device or an application) reports back to SNMP manager.

In your snippet you referred to OBJECT IDENTIFIER that serves as a "name" for a value-less node in OID tree. Typically, one or more OBJECT TYPE clauses are logically linked beneath OBJECT IDENTIFIER where OBJECT TYPE define both "name" and "value type" for SNMP data coming from SNMP agent.

In the following example sysUpTime is linked under the value-less system (1.3.6.1.2.1.1) node in the OID tree. Here sysUpTime serves as a name (corresponding to the 1.3.6.1.2.1.1.3 node) for addressing values of type TimeTicks:

system   OBJECT IDENTIFIER ::= { mib-2 1 }

sysUpTime OBJECT-TYPE
    SYNTAX      TimeTicks
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
            "The time (in hundredths of a second) since
            the network management portion of the system
            was last re-initialized."
    ::= { system 3 }

MIBs are mostly useful for humans (operating SNMP managers) to read, interpret and navigate SNMP data provided by SNMP agent. It is entirely possible to operate SNMP without any MIB files. At the protocol level only OIDs are used for referring to values.

You may find this explanation relevant to your question.

Ilya Etingof
  • 5,440
  • 1
  • 17
  • 21