Hello Everyone,

I have a Red Hat Enterprise Linux 4 box (32 bit) running version 5.1.2
of net-snmp. 

I'm trying to capture disk IO information.


This is what snmp gives me for the disk that I'm interested in.

UCD-DISKIO-MIB::diskIOIndex.25 = INTEGER: 25
UCD-DISKIO-MIB::diskIODevice.25 = STRING: dm-2
UCD-DISKIO-MIB::diskIONRead.25 = Counter32: 0
UCD-DISKIO-MIB::diskIONWritten.25 = Counter32: 677224960
UCD-DISKIO-MIB::diskIOReads.25 = Counter32: 32441872
UCD-DISKIO-MIB::diskIOWrites.25 = Counter32: 1814665690


Notice that the diskIONRead counter is 0.


This is what I get for device dm-0 on the same system.

UCD-DISKIO-MIB::diskIOIndex.22 = INTEGER: 22
UCD-DISKIO-MIB::diskIODevice.22 = STRING: dm-0
UCD-DISKIO-MIB::diskIONRead.22 = Counter32: 2239779840
UCD-DISKIO-MIB::diskIONWritten.22 = Counter32: 3443953664
UCD-DISKIO-MIB::diskIOReads.22 = Counter32: 3552815
UCD-DISKIO-MIB::diskIOWrites.22 = Counter32: 37540969



I wonder if there is an overflow that is causing the counter to show 0.
The code that generates these counters gets its data from
/proc/diskstats. Here is the associated line from that file.

253    2 dm-2 32447368 0 1814764522 152337767 64442309 0 515538472
359442735 0 176453907 511782733

Here is the dm-0 line also, in case it is useful.

253    0 dm-0 3555684 0 390341218 11890071 37571579 0 300572632
887962651 0 71276923 899882155

>From this, it looks like the number of sectors read on dm-2 is
1814764522. The code then goes on to multiply that number by 512.
929159435264 is the answer I get. That certainly is a large number, but
I believe that even if it gets truncated, I should still get some value
other than 0.


Is there a way to clear the counters that the kernel maintains? Since
this is a production box, I can't just reboot it to see if smaller
numbers will cause it to work as expected.

I do have another box that isn't production that is configured
similarly. I'm currently doing many reads against it now in hopes that
after I surpass some number of sectors read that it will exhibit the
same issue.


Has anyone had this problem before? Am I missing something obvious? Does
anyone know of a way to manipulate the disk counters that the kernel
maintains?


Thanks,

Jack Dozier

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to