Over 8Tbyte DiskSpace cant get correct TotalSpace

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

computer_guru
Cacti User
Posts: 141
Joined: Thu Apr 10, 2008 6:52 pm

Post by computer_guru »

Your suggestion is interesting:
http://docs.cacti.net/usertemplate:data ... disk_usage

It mentions 0.8.7d, will it work on 0.8.7e ?


I don't understand what this means:
It requires support by the non-standard HOST MIB?

Does the host that replies with the disk data have to have a special mib installed? Does it use the same OIDs? Does this solution use a different SNMP agent on the host besides the windows SNMP service?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

computer_guru wrote:Your suggestion is interesting:
http://docs.cacti.net/usertemplate:data ... disk_usage

It mentions 0.8.7d, will it work on 0.8.7e ?


I don't understand what this means:
It requires support by the non-standard HOST MIB?

Does the host that replies with the disk data have to have a special mib installed? Does it use the same OIDs? Does this solution use a different SNMP agent on the host besides the windows SNMP service?
It should work with 087e without any change. The hint means that you at LEAST require 087d.
The support for the HOST MIB is exact the same as for the existing PHP Script Server based Script. In fact, both fetch the exact same OIDs.
But my solution makes use of some nice new features of cacti that allows doing the work using only SNMP which is waaay faster.
In fact, Hosts that do not support the required part of the HOST MIB won't work with both of those approaches.
So don't worry, import the Templates and give them a go!
R.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

And HOST-MIB is a standard - it's RFC 2790 :-)

It may be true that not everyone implements it, or only implements some of it, but it is a standard...
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Howie wrote:It may be true that not everyone implements it, or only implements some of it, but it is a standard...
I only say: AIX. Solaris people may have their own vote.
And: the are different parts of the HOST MIB. So I know that e.g. RHEL4 did not implement DISK IO stats while RHEL5 does.
R.
computer_guru
Cacti User
Posts: 141
Joined: Thu Apr 10, 2008 6:52 pm

Post by computer_guru »

sample graph
Attachments
13 TB graph
13 TB graph
large_tb_graph.jpg (79.18 KiB) Viewed 5471 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

And what does this tell us???
R.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I know the issue all to well. It's a good solution when you have a script involved. I vote do it now. I'll test when I get back home.

Larry
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
computer_guru
Cacti User
Posts: 141
Joined: Thu Apr 10, 2008 6:52 pm

Re: Over 8Tbyte DiskSpace cant get correct TotalSpace

Post by computer_guru »

I have discovered that the proposed solution / script above does not work on Windows Server 2008 R2. R2 is always 64-bit and I suspect that 64-bit servers treat that SNMP counter differently. I think Cacti will need a 32 bit and 64 bit disk script that are independent or a argument that says 32 or 64.


32 bit equation = (abs($snmp_data) + 2147483647) * $sau;

64 bit equation = ($snmp_data + 4294967296) * $sau;
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Over 8Tbyte DiskSpace cant get correct TotalSpace

Post by Howie »

The MIB defines whether the value is 32 or 64 bit, not the OS architecture, but it wouldn't be the first time MS ignored the standard interpretation of a MIB.

(That is - a particualr OID will should ALWAYS be an int32 or int64 or counter32 or counter64 (or timetick, or whatever))
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
computer_guru
Cacti User
Posts: 141
Joined: Thu Apr 10, 2008 6:52 pm

Re: Over 8Tbyte DiskSpace cant get correct TotalSpace

Post by computer_guru »

My formula seems fine, but the graphs are still incorrect.

my graph shows ~15 TB used of a ~13 TB drive.

it should say ~8 TB used of a ~11 TB drive.

When I run the poller in verbose mode, the values coming back are correct, but my graph is still wrong. weird.

03/04/2011 11:54:34 AM - SPINE: Poller[0] Host[304] DS[1938] SS[0] SERVER: /var/www/html/scripts/ss_host_disk64.php ss_host_disk hostname 304 2:161:850:2:20:community:::::: get used 4, output: 8851290333184

03/04/2011 11:54:34 AM - SPINE: Poller[0] Host[304] DS[1938] SS[1] SERVER: /var/www/html/scripts/ss_host_disk64.php ss_host_disk hostname 304 2:161:850:2:20:community:::::: get total 4, output: 11995707338752
computer_guru
Cacti User
Posts: 141
Joined: Thu Apr 10, 2008 6:52 pm

Re: Over 8Tbyte DiskSpace cant get correct TotalSpace

Post by computer_guru »

I finally got the numbers correct on my graphs, by creating a separate 64-bit script, xml file, query, etc.. Not sure if my formula for large disks has been incorrect the whole time or not. I may have been. The 64-bit formula is my previous post is probably the only working formula for disks over 8 TB.

The issue now appears to be that my graphs are not rendering correctly. see image.
Attachments
10 TB graph with correct values, but incorrect graph
10 TB graph with correct values, but incorrect graph
10tb_volume.jpg (35.49 KiB) Viewed 4667 times
computer_guru
Cacti User
Posts: 141
Joined: Thu Apr 10, 2008 6:52 pm

[Solved] Cacti Won't Graph Large Disk Volume Over 8 TB/TeraB

Post by computer_guru »

Ok, here are all my conclusions. sorry for "thinking out loud" on this thread instead of finding a solution and then posting it.

These are the facts (IMHO):
- Cacti has trouble graphing disks over 8 TB with a StorageAlocationUnit (aka Cluster) of 4096.
- The problem is that the SNMP counter is 32-bit signed integer
- The behavior does not change between a 32bit Windows server and a 64bit windows server
- My original equation was wrong, the correct equation is: ($snmp_data + 4294967296) * $sau;
- This is a workaround and still has a maximum size of 16 TB. Over 16 TB will have unknown results.
- Posted below is a patched version of the script for Cacti Version 0.8.7e (ss_host_disk.php)






Notes:
I am running Cacti Version 0.8.7e
Sample Graph below (you can see where I fixed the bug in the script and values changed)
Changing the cluster size of the filesystem to greater than 4096 may help resolve the issues without modifying Cacti.
Attachments
fixed graph
fixed graph
fixed_graph_10tb_volume.png (12.4 KiB) Viewed 4665 times
ss_host_disk.zip
patched script
(1.39 KiB) Downloaded 377 times
Trexpsy
Posts: 4
Joined: Thu Oct 15, 2009 8:47 am

Re: Over 8Tbyte DiskSpace cant get correct TotalSpace

Post by Trexpsy »

Bug 0001292
This issue and fix applies to Linux aswell. Not specific for Windows.
candlerb
Posts: 10
Joined: Tue Nov 16, 2010 6:38 am

Re: Over 8Tbyte DiskSpace cant get correct TotalSpace

Post by candlerb »

The fix given in issue 1292 (and currently in SVN branches/0.8.7) is incorrect. As opoplawski observed above, it should say

Code: Select all

                        if($snmp_data<0){
                                return ($snmp_data + 4294967296) * $sau;
However issue 1292 is now read-only. I have created new issue 2084.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Over 8Tbyte DiskSpace cant get correct TotalSpace

Post by TheWitness »

This has been committed to svn.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests