# snmpwalk ... .1.3.6.1.4.1.2021.13.15.1.1.14
Code: Select all
*** ./net-snmp-5.3.0.1/agent/mibgroup/ucd-snmp/diskio.c.orig Thu Apr 27 18:02:02 2006
--- ./net-snmp-5.3.0.1/agent/mibgroup/ucd-snmp/diskio.c Thu Apr 27 18:05:00 2006
***************
*** 150,161 ****
--- 150,162 ----
{DISKIO_WRITES, ASN_COUNTER, RONLY, var_diskio, 1, {6}},
{DISKIO_LA1, ASN_INTEGER, RONLY, var_diskio, 1, {9}},
{DISKIO_LA5, ASN_INTEGER, RONLY, var_diskio, 1, {10}},
{DISKIO_LA15, ASN_INTEGER, RONLY, var_diskio, 1, {11}},
{DISKIO_NREADX, ASN_COUNTER64, RONLY, var_diskio, 1, {12}},
{DISKIO_NWRITTENX, ASN_COUNTER64, RONLY, var_diskio, 1, {13}},
+ {DISKIO_AQS, ASN_COUNTER, RONLY, var_diskio, 1, {14}},
};
/*
* Define the OID pointer to the top of the mib tree that we're
* registering underneath.
*/
***************
*** 719,731 ****
if (head.length == head.alloc) {
head.alloc += DISK_INCR;
head.indices = (linux_diskio *)realloc(head.indices, head.alloc*sizeof(linux_diskio));
}
pTemp = &head.indices[head.length];
sscanf (buffer, "%d %d", &pTemp->major, &pTemp->minor);
! if (pTemp->minor == 0)
sscanf (buffer, "%d %d %s %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu\n",
&pTemp->major, &pTemp->minor, pTemp->name,
&pTemp->rio, &pTemp->rmerge, &pTemp->rsect, &pTemp->ruse,
&pTemp->wio, &pTemp->wmerge, &pTemp->wsect, &pTemp->wuse,
&pTemp->running, &pTemp->use, &pTemp->aveq);
else
--- 720,732 ----
if (head.length == head.alloc) {
head.alloc += DISK_INCR;
head.indices = (linux_diskio *)realloc(head.indices, head.alloc*sizeof(linux_diskio));
}
pTemp = &head.indices[head.length];
sscanf (buffer, "%d %d", &pTemp->major, &pTemp->minor);
! if ((pTemp->minor & 0x3f) == 0)
sscanf (buffer, "%d %d %s %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu\n",
&pTemp->major, &pTemp->minor, pTemp->name,
&pTemp->rio, &pTemp->rmerge, &pTemp->rsect, &pTemp->ruse,
&pTemp->wio, &pTemp->wmerge, &pTemp->wsect, &pTemp->wuse,
&pTemp->running, &pTemp->use, &pTemp->aveq);
else
***************
*** 815,826 ****
--- 816,830 ----
case DISKIO_READS:
long_ret = head.indices[indx].rio;
return (u_char *) & long_ret;
case DISKIO_WRITES:
long_ret = head.indices[indx].wio;
return (u_char *) & long_ret;
+ case DISKIO_AQS:
+ long_ret = head.indices[indx].aveq;
+ return (u_char *) & long_ret;
default:
snmp_log(LOG_ERR, "diskio.c: don't know how to handle %d request\n", vp->magic);
}
return NULL;
}
***************
*** 1142,1153 ****
--- 1146,1160 ----
return (u_char *) & c64_ret;
case DISKIO_NWRITTENX:
*var_len = 8;
c64_ret.low = (ps_disk[indx].wblks * ps_disk[indx].bsize) & 0xffffffff;;
c64_ret.high = (ps_disk[indx].wblks * ps_disk[indx].bsize) >> 32;
return (u_char *) & c64_ret;
+ case DISKIO_AQS:
+ long_ret = (signed long) ps_disk[indx].qdepth;
+ return (u_char *) & long_ret;
default:
ERROR_MSG("diskio.c: don't know how to handle this request.");
}
/* return NULL in case of error */