From: SourceForge.net <no...@so...> - 2011-09-15 05:02:02
|
Patches item #3409692, was opened at 2011-09-14 17:10 Message generated for change (Comment added) made by sjfriedl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312694&aid=3409692&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Stephen J. Friedl (sjfriedl) Assigned to: Nobody/Anonymous (nobody) Summary: compute disk percent in floating point Initial Comment: This patch applied to agent/mibgroup/ucd-snmp/disk_hw.c changes the disk-percent calculation to use floating point with rounding rather than attempt to avoid overflow/underflow via integer math. This was built against net-snmp-5.7.1.rc1 and tested on a CentOS system. Submitted per discussion in net-snmp-coders ---------------------------------------------------------------------- Comment By: Stephen J. Friedl (sjfriedl) Date: 2011-09-14 22:02 Message: Ugh, he's right of course. I shouldn't patch when I'm trying to get out the door. Who knew that a dot coule make all the difference? Updated patch coming. ---------------------------------------------------------------------- Comment By: Magnus Fromreide (magfr) Date: 2011-09-14 21:51 Message: Eh, this patch does nothing to mitigate the problem. It calculates the result using integer arithmetic and then converts the result to a float after the overflow has happened. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312694&aid=3409692&group_id=12694 |