|
|
| Author |
Message |
calbear
Joined: 29 Jul 2008 Posts: 5
|
Posted: Wed Aug 27, 2008 1:06 am Post subject: |
|
|
| calbear wrote: | | super-hornet wrote: | I have both scripts of this one and "ucd/net snmp Device (Disk) I/O templates - Updated - v2"
{ http://forums.cacti.net/viewtopic.php?t=8777&postdays=0&postorder=asc&start=0 }
running on the same system. When I compare the graph on both, it looks like this script is in reverse to the "ucd/net snmp Device (Disk) I/O templates - Updated - v2". The read become write and write become read.
Which one is correct, i cannot confirm.
SH |
I'm pretty sure originally it was wrong. I have a machine running apache web server with awstats processing logs at a certain time of day. Originally cacti was reporting it was reading from disk all the time and when awstats kicks in, writes spike. That didn't make sense at all. Most of what the web server is reading should be in file system cache so it doesn't need to actually read from disk but it should be writing to disk all the time for apache logs. And when awstats kicks in, it should be reading the logs from disk far much more than writing processed data to disk. |
I also have a machine running mysql (primarily innodb) continuously, and originally cacti was reporting disk reads throughout the entire time while writes were minimal. But that machine has enough memory to hold the entire database so it shouldn't be reading from disk that much. On the other hands, all db writes require disk write. Plus:
.1.3.6.1.4.1.2021.13.15.1.1.3 = UCD-DISKIO-MIB::diskIONRead
.1.3.6.1.4.1.2021.13.15.1.1.4 = UCD-DISKIO-MIB::diskIONWritten
So reads and writes were certainly reversed. |
|
| Back to top |
|
 |
super-hornet Cacti User
Joined: 27 May 2007 Posts: 144
|
Posted: Wed Aug 27, 2008 1:11 am Post subject: |
|
|
I think the quick cure/walkaround this problem is to modify our snmpd.conf to have the read and write value reverse.
Sadly net-snmp.5.4.1 that I have for my RHELv4 cannot return the disk IO data using ucd-net. That is why I use this script.
But for openSUSE 10.2 and above, it can return the disk IO using ucd-net...thus I can use the other script.
I just download net-snmp-5.4.1.1-1.src.rpm. I going to compile it in RHELv4 and install it. I hope this new snmp can report back the disk IO without using this script bash file.
SH |
|
| Back to top |
|
 |
super-hornet Cacti User
Joined: 27 May 2007 Posts: 144
|
Posted: Wed Aug 27, 2008 3:51 am Post subject: |
|
|
I tried the latest net-snmp-5.4.1.1-1 rpm but still the same. Looks like for RHEL, I need to compile the net-snmp manually from the source code using the correct parameters.
Too lazy to do that, I modify the snmpdiskio script in such a way that the content of function
hdOutBlocks & hdInBlocks swapped. That should solve the Read => Write and Write => Read problem.
SH |
|
| Back to top |
|
 |
calbear
Joined: 29 Jul 2008 Posts: 5
|
Posted: Wed Aug 27, 2008 4:31 am Post subject: |
|
|
| super-hornet wrote: | I tried the latest net-snmp-5.4.1.1-1 rpm but still the same. Looks like for RHEL, I need to compile the net-snmp manually from the source code using the correct parameters.
Too lazy to do that, I modify the snmpdiskio script in such a way that the content of function
hdOutBlocks & hdInBlocks swapped. That should solve the Read => Write and Write => Read problem.
SH |
Yeah, that's the right way to do it, since snmpdiskio is not part of a major linux distribution... |
|
| Back to top |
|
 |
prakashk
Joined: 03 Sep 2008 Posts: 6
|
Posted: Mon Sep 22, 2008 2:32 am Post subject: |
|
|
Hi Can you please post more detail im not able to find two cacti templets
| skion wrote: | | elgoretto wrote: | Ok I've reinstalled a brand new 0.8.7b cacti, and my contribution to partition.xml is still valid.
With this method, you can get rid of the snmpio script (no need to maintain it anymore) and no need to have a specific snmp.conf setup (but you still need to add diskIO feature at net-snmp compilation time). |
Thanks elgoretto, this works like a charm!
For the record, what i did was:
- import the two cacti templates from the original post
- copy elgoretto's partitions file to /usr/share/cacti/resource/snmp_queries/partition.xml
- in cacti, add the SNMP disk statistics data query to the hosts you want
- in cacti, add some graphs
- voila, nothing else needed |
|
|
| Back to top |
|
 |
prakashk
Joined: 03 Sep 2008 Posts: 6
|
Posted: Thu Sep 25, 2008 1:24 am Post subject: |
|
|
| super-hornet wrote: | I tried the latest net-snmp-5.4.1.1-1 rpm but still the same. Looks like for RHEL, I need to compile the net-snmp manually from the source code using the correct parameters.
Too lazy to do that, I modify the snmpdiskio script in such a way that the content of function
hdOutBlocks & hdInBlocks swapped. That should solve the Read => Write and Write => Read problem.
SH |
can you post the modified script stuck for RHEL 4.0 |
|
| Back to top |
|
 |
glen
Joined: 05 Oct 2008 Posts: 3
|
Posted: Sun Oct 05, 2008 5:27 pm Post subject: |
|
|
has anyone got it work with net-snmpd 5.4.1.2 ?
default 'exec' line does nothing, but 'extend' results something, but the numbers are different: (.4 not .101 expected)
| Code: |
$ snmpwalk -v1 -c sw localhost .1.3.6.1.4.1.2021.54.4
UCD-SNMP-MIB::ucdavis.54.4.1.2.5.104.100.78.117.109.1 = STRING: "29"
$ snmpwalk -v1 -c sw localhost .1.3.6.1.4.1.2021.55.4
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.1 = STRING: "1"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.2 = STRING: "2"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.3 = STRING: "3"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.4 = STRING: "4"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.5 = STRING: "5"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.6 = STRING: "6"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.7 = STRING: "7"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.8 = STRING: "8"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.9 = STRING: "9"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.10 = STRING: "10"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.11 = STRING: "11"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.12 = STRING: "12"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.13 = STRING: "13"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.14 = STRING: "14"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.15 = STRING: "15"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.16 = STRING: "16"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.17 = STRING: "17"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.18 = STRING: "18"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.19 = STRING: "19"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.20 = STRING: "20"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.21 = STRING: "21"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.22 = STRING: "22"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.23 = STRING: "23"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.24 = STRING: "24"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.25 = STRING: "25"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.26 = STRING: "26"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.27 = STRING: "27"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.28 = STRING: "28"
UCD-SNMP-MIB::ucdavis.55.4.1.2.7.104.100.73.110.100.101.120.29 = STRING: "29"
$ snmpwalk -v1 -c sw localhost .1.3.6.1.4.1.2021.56.4
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.1 = STRING: "ram0"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.2 = STRING: "ram1"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.3 = STRING: "ram2"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.4 = STRING: "ram3"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.5 = STRING: "ram4"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.6 = STRING: "ram5"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.7 = STRING: "ram6"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.8 = STRING: "ram7"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.9 = STRING: "ram8"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.10 = STRING: "ram9"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.11 = STRING: "ram10"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.12 = STRING: "ram11"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.13 = STRING: "ram12"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.14 = STRING: "ram13"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.15 = STRING: "ram14"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.16 = STRING: "ram15"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.17 = STRING: "sda"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.18 = STRING: "sda1"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.19 = STRING: "sda2"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.20 = STRING: "sdb"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.21 = STRING: "sdc"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.22 = STRING: "sdd"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.23 = STRING: "sde"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.24 = STRING: "sdf"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.25 = STRING: "dm-0"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.26 = STRING: "dm-1"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.27 = STRING: "dm-2"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.28 = STRING: "dm-3"
UCD-SNMP-MIB::ucdavis.56.4.1.2.7.104.100.68.101.115.99.114.29 = STRING: "dm-4"
|
|
|
| Back to top |
|
 |
glen
Joined: 05 Oct 2008 Posts: 3
|
Posted: Sun Oct 05, 2008 5:57 pm Post subject: |
|
|
nevermind about net-snmp 5.4 problem, i found that i can use diskio
but about the reversed stats, why not just modify partition.xml to have:
| Code: |
<hdOutBlocks>
<name>Bytes Read</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2021.13.15.1.1.3</oid>
</hdOutBlocks>
<hdInBlocks>
<name>Bytes Written</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2021.13.15.1.1.4</oid>
</hdInBlocks>
|
|
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|