0

I'm using ucdDiskIOMIB MIB object to get disk IO.

Everything works fine but I don't understand counter data I'm getting. Im querying diskIONWritten columns and result is constantly increasing until one moment when it decrease.

Here is example of my results for better understanding. Data is queried every 3 seconds and looks like this.

First run:

[UCD-DISKIO-MIB::diskIONWritten.1] => Counter32: 0
[UCD-DISKIO-MIB::diskIONWritten.2] => Counter32: 4059038720
[UCD-DISKIO-MIB::diskIONWritten.3] => Counter32: 9216
[UCD-DISKIO-MIB::diskIONWritten.4] => Counter32: 10907648
[UCD-DISKIO-MIB::diskIONWritten.5] => Counter32: 4048121856

Second run: (increase)

[UCD-DISKIO-MIB::diskIONWritten.1] => Counter32: 0
[UCD-DISKIO-MIB::diskIONWritten.2] => Counter32: 4188124160
[UCD-DISKIO-MIB::diskIONWritten.3] => Counter32: 9216
[UCD-DISKIO-MIB::diskIONWritten.4] => Counter32: 10907648
[UCD-DISKIO-MIB::diskIONWritten.5] => Counter32: 4177207296

Third run: (decrease)

[UCD-DISKIO-MIB::diskIONWritten.1] => Counter32: 0
[UCD-DISKIO-MIB::diskIONWritten.2] => Counter32: 31888384
[UCD-DISKIO-MIB::diskIONWritten.3] => Counter32: 9216
[UCD-DISKIO-MIB::diskIONWritten.4] => Counter32: 10907648
[UCD-DISKIO-MIB::diskIONWritten.5] => Counter32: 20971520

On net-snmp I read this description for diskIOWritten tale column: "The number of bytes written to this device since boot". And I'm expecting result to increase on each query (until system reboot).

Do anybody know what I'm missing here?

Thanks in advice

Gavro
  • 3
  • 1
  • Hi, I think what you're missing is a programming question. Please post this question on serverfault.com instead, as this seems to be about management of network equipment, not programming. – Jolta Nov 13 '14 at 11:35
  • From the MIB document itself, http://www.net-snmp.org/docs/mibs/UCD-DISKIO-MIB.txt it indicates that only net-snmp guys know. I personally assume that you should read the source code so as to find it out. – Lex Li Nov 13 '14 at 13:07

1 Answers1

0

Counter32 is a 32 bit unsigned integer, the maximum value is 4294967295. It looks like your values became too big and overflowed. Basically if the counter exceeds 4294967295 it will reset to 0.

user1793963
  • 1,295
  • 2
  • 12
  • 24