components/net-snmp/patches/014.6801093.vmstat_solaris2.patch
author Ronald Jordan <ron.jordan@oracle.com>
Tue, 11 Oct 2016 11:55:12 -0700
branchs11u3-sru
changeset 7085 cad8ee01213d
parent 252 ee0fb1eabcbf
permissions -rw-r--r--
23206271 Upgrade cffi to 1.5.2 22871503 Upgrade cryptography to version 1.2.3 22520335 Integrate idna into Userland 22520346 Integrate ipaddress into Userland

--- patch/net-snmp-5.4.1/agent/mibgroup/ucd-snmp/vmstat_solaris2.c	Thu Sep 14 17:48:50 2006
+++ net-snmp-5.4.1/agent/mibgroup/ucd-snmp/vmstat_solaris2.c	Tue Oct  6 02:03:44 2009
@@ -525,6 +525,13 @@
         DEBUGMSGTL(("ucd-snmp/vmstat_solaris2.c:update_stats",
                     "time_diff: %lld\n", time_diff));
 
+		/*
+		 * Assign a minimum value to get around divide by zero case
+		 */
+		if (time_diff == 0) {
+			time_diff = 1;
+		}
+
         /*
          * swapin and swapout are in pages, MIB wants kB/s,so we just need to get kB and seconds 
          * For the others we need to get value per second