hi martin,
you can create a script to extract the data you want.
i think the command "vmstat" would be sufficient for
your needs.
ie.
shell> vmstat -dp
reads writes
total merged sectors ms total merged sectors
disk1 9698 1127 322918 76832 10690 7019 218276
disk2 30 185 320 88 6 205 232
1. you can grep the disk of your interest.
shell> vmstat -dp | grep disk2
2. then extract the columns Read Total and Write Total.
3. compute the Read/Write size difference between the
previous and current reading.
4. format the output of the script based on SNMP
specification for EXEC, since each line of the
script's output will have its own MIBOID.
5. configure the SNMP agent on the machine, and then
add the entry for the external script
/etc/snmp/snmpd.conf
...
exec .1.3.6.1.4.1.2021.2.1 NAME /path/to/script arguments
6. Query the SNMP agent using the MIBOIDs on MRTG
.1.3.6.1.4.1.2021.2.1.100.0
.1.3.6.1.4.1.2021.2.1.101.1
.1.3.6.1.4.1.2021.2.1.101.2
.1.3.6.1.4.1.2021.2.1.101.<nth line of output>
* i can't find my old script that you can use as a template.
perhaps you can ask elmer for a copy :)
On 9/8/06, Martin Acupanda <[EMAIL PROTECTED]> wrote:
Hello PLUG,
I am looking for ways to monitor the number of (k)bytes read/written using snmp
and mrtg combo. What MIB/OID to use?
Any help is appreciated. Thanks!
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph