[Bug 865268] Re: snmpd reports wrong value for hrStorageSize on large filesystem

2012-10-24 Thread Brian Candler
Also confirmed, this remains broken in 12.04

$ snmpwalk -v2c -c public storage3 hrStorageTable | grep 
\\.34HOST-RESOURCES-MIB::hrStorageIndex.34 = INTEGER: 34
HOST-RESOURCES-MIB::hrStorageType.34 = OID: 
HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageDescr.34 = STRING: /disk/scratch
HOST-RESOURCES-MIB::hrStorageAllocationUnits.34 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageSize.34 = INTEGER: 393941158
HOST-RESOURCES-MIB::hrStorageUsed.34 = INTEGER: 3959967469

Notice how hrStorageSize is much less than hrStorageUsed.

Here is the real output from df:

$ df -h /disk/scratch
Filesystem  Size  Used Avail Use% Mounted on
/dev/md127   66T   63T  2.8T  96% /disk/scratch
$ df -k /disk/scratch
Filesystem   1K-blocksUsed  Available Use% Mounted on
/dev/md127 70295241368 67379477428 2915763940  96% /disk/scratch

But the values reported in hrStorageTable are:

size = 393941158 * 4 = 1575764632 KiB = 1.47 TiB
used = 3959967469 * 4 = 15839869876 KiB = 14.75 TiB

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to net-snmp in Ubuntu.
https://bugs.launchpad.net/bugs/865268

Title:
  snmpd reports wrong value for hrStorageSize on large filesystem

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/865268/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 865268] Re: snmpd reports wrong value for hrStorageSize on large filesystem

2012-10-24 Thread Brian Candler
Looking at the source of net-snmp-5.4.3~dfsg, it appears to make no
attempt to scale the block size to avoid 2^32 wrapping - see
agent/mibgroup/host/hr_storage.c, var_hrstore()

I have made a simple patch which fixes just this particular problem, so
should be suitable for backporting to LTS.

Once this patch has been applied, sane values are returned:

$ snmpwalk -v2c -c public storage3 hrStorageTable | grep '\.34 
'HOST-RESOURCES-MIB::hrStorageIndex.34 = INTEGER: 34
HOST-RESOURCES-MIB::hrStorageType.34 = OID: 
HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageDescr.34 = STRING: /disk/scratch
HOST-RESOURCES-MIB::hrStorageAllocationUnits.34 = INTEGER: 65536 Bytes
HOST-RESOURCES-MIB::hrStorageSize.34 = INTEGER: 1098363146
HOST-RESOURCES-MIB::hrStorageUsed.34 = INTEGER: 1052804334

(Note: the agent modules are actually in libsnmp15, so after dpkg-
buildpackage remember to install libsnmp15, libsnmp-base and snmpd)

** Patch added: hrStorage_large_filesystem.patch
   
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/865268/+attachment/3412218/+files/hrStorage_large_filesystem.patch

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to net-snmp in Ubuntu.
https://bugs.launchpad.net/bugs/865268

Title:
  snmpd reports wrong value for hrStorageSize on large filesystem

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/865268/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 865268] Re: snmpd reports wrong value for hrStorageSize on large filesystem

2012-06-23 Thread Bruc
I can confirm this is not fixed. I'm still having the issue on 12.04.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to net-snmp in Ubuntu.
https://bugs.launchpad.net/bugs/865268

Title:
  snmpd reports wrong value for hrStorageSize on large filesystem

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/865268/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 865268] Re: snmpd reports wrong value for hrStorageSize on large filesystem

2011-11-14 Thread Chuck Short
This should be fixed in pangolin. Please re-check and if still not fixed
please re-open.

** Changed in: net-snmp (Ubuntu)
   Status: New = Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to net-snmp in Ubuntu.
https://bugs.launchpad.net/bugs/865268

Title:
  snmpd reports wrong value for hrStorageSize on large filesystem

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/865268/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 865268] Re: snmpd reports wrong value for hrStorageSize on large filesystem

2011-11-07 Thread zou guangxian
Version: net-snmp 5.7.1

in net-snmp-5.7.1/agent/mibgroup/hardware/fsys/hw_fsys.c:337

should be 
f-avail_32 = f-avail  factor;
f-used_32 = f-used  factor;

instead of
f-avail_32 = f-avail  factor;
f-used_32 = f-used  factor;

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to net-snmp in Ubuntu.
https://bugs.launchpad.net/bugs/865268

Title:
  snmpd reports wrong value for hrStorageSize on large filesystem

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/865268/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 865268] Re: snmpd reports wrong value for hrStorageSize on large filesystem

2011-10-04 Thread Robie Basak
** Changed in: net-snmp (Ubuntu)
   Importance: Undecided = Low

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to net-snmp in Ubuntu.
https://bugs.launchpad.net/bugs/865268

Title:
  snmpd reports wrong value for hrStorageSize on large filesystem

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/865268/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs