FAQ - SNMP indexing Highlighted

Latest reply: May 26, 2014 14:10:25 3644 1 0 0

Hi Guys, 


I would like to share some information about SNMP OID indexing. Usually NMS do all the job, because it takes the index, parse it and returns it into a nice web page, as a diagram or a graph J .

But can you do when you search for a singular or private OID and you are walking a prefix that returns some unknown values?

Let’s take an example about memory usage OID from HUAWEI.

First thing to do is to get a OID/MIB reference from product maintainer, and searching I found this OID prefix. 


1.3.6.1.4.1.2011.6.3.5.1.1.

So, let’s walk this:



iso.3.6.1.4.1.2011.6.3.5.1.1.2.0.0.0 = Gauge32: 146871224

iso.3.6.1.4.1.2011.6.3.5.1.1.3.0.0.0 = Gauge32: 83342712

iso.3.6.1.4.1.2011.6.3.5.1.1.4.0.0.0 = Gauge32: 34584756

iso.3.6.1.4.1.2011.6.3.5.1.1.5.0.0.0 = Gauge32: 76644548

iso.3.6.1.4.1.2011.6.3.5.1.1.6.0.0.0 = INTEGER: 0

iso.3.6.1.4.1.2011.6.3.5.1.1.7.0.0.0 = INTEGER: 0


Object

Syntax

Max Access

Description

Implemented Specifications

hwMemoryDevModuleIndex[1]

Integer (32 bit)

Not-accessible

This object is used only for extension.

For the device with a single CPU, the value of this object is 0.

This object is implemented as defined in the corresponding MIB files.

hwMemoryDevSize[2]

Unsigned (32 bit)

Read-only

The value of this object identifies the total size (in bytes) of thememoryon the managed object.

It indicates thatmemoryof each board includes idlememoryand usedmemory. That is, sum of hwMemoryDevFree and hwMemoryDevRawSliceUsed may be hwMemoryDevsize.

Each board has amemory.

The size ofmemoryvaries with products.

This object is implemented as defined in the corresponding MIB files.

hwMemoryDevFree[3]

Unsigned (32 bit)

Read-only

The value of this object identifies the idlememory(in bytes) of the device.

The value of this object is always less than that of hwMemoryDevSize.

This object is implemented as defined in the corresponding MIB files.

hwMemoryDevRawSliceUsed[4]

Unsigned (32 bit)

Read-only

The value of this object identifies the used raw slicememory(in bytes) of the device.

The value of this object is always smaller than that of hwMemoryDevSize.

This object is implemented as defined in the corresponding MIB files.

hwMemoryDevLargestFree[5]

Unsigned (32 bit)

Read-only

The value of this object identifies the maximum number of contiguous bytes from thememorythat are currently unused on the managed object.

It is the largest size ofmemorythat the system can distribute. The value of this object is always smaller than that of hwMemoryDevSize.

This object is implemented as defined in the corresponding MIB files.



Reading the above table from the MIB reference  we see that first OID represent the total memory and the second is the free memory. 


iso.3.6.1.4.1.2011.6.3.5.1.1.2.0.0.0 = Gauge32: 146871224        \\\\ is the total memory

iso.3.6.1.4.1.2011.6.3.5.1.1.3.0.0.0 = Gauge32: 83342712            \\\\ is the free memory

So, we can see thatused memory= total memory – free memory =146871224 –83342712 =63528512



display memory-usage

Memory utilization statistics at 2014-05-06 15:18+02:00 DST

System Total Memory Is: 146871224 bytes

Total Memory Used Is:63534856 bytes



So both values are almost the same, difference is only 6344 bytes. Since OS use memory-usage and is changing constantly, this is normal. 

 In the situation when you have a stack system composed from multiple switches memory statistics OID is different. Check below. Another 2 indexes appear:


iso.3.6.1.4.1.2011.6.3.5.1.1.2.0.0.0 = Gauge32: 146871104

iso.3.6.1.4.1.2011.6.3.5.1.1.2.0.1.0 = Gauge32: 146871164

What the highlight index represent? It actually identifies the slot number. 

<HUAWEI> display stack

Stack topology type : Link

Stack system MAC: 1111-1111-1111

MAC switch delay time: 2 min

Stack reserved vlan: 4093

Slot of the active management port: --

Slot    Role        Mac address       Priority   Device type

-------------------------------------------------------------

   0   Master      1111-1111-1111   200          S5700-28P-LI-AC

   1   Standby     1111-1111-1112   150          S5700-28P-LI-AC

Let’s take another example also for memory usage. 

I found another OID that actually return the memory usage percentage. Check below:



The OID prefix of this table is 1.3.6.1.4.1.2011.5.25.31.1.1.1.1.

hwEntityMemUsage [7]

Integer32

Memoryusage of the entity.

Value range: 0-100

Read-only

Current


After I walk this I get:

iso.3.6.1.4.1.2011.5.25.31.1.1.1.1.7.603979777 = INTEGER: 43

Which actually represent the memory usage:

Used memory/total memory = (63528512/146871224) *100 =  43.25%

But what this index 603979777 represent?


FAQ - SNMP indexing-1261355-1

The good part is normally you don’t need to do the math, NMS will take care of this, parse it and return the value into web interface.

Hope to find this share helpful. 




  • x
  • convention:

Sophoni Created May 26, 2014 14:10:25 Helpful(0) Helpful(0)

thanks.

 

  • x
  • convention:

Reply

Reply
You need to log in to reply to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!

Login and enjoy all the member benefits

Login
Fast reply Scroll to top