author | Milan Jurik <Milan.Jurik@oracle.com> |
Wed, 30 Nov 2011 06:39:13 -0800 | |
changeset 604 | c25824a87b1f |
parent 252 | ee0fb1eabcbf |
permissions | -rw-r--r-- |
252
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
1 |
--- patch/net-snmp-5.4.1/agent/mibgroup/ucd-snmp/vmstat_solaris2.c Thu Sep 14 17:48:50 2006 |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
2 |
+++ net-snmp-5.4.1/agent/mibgroup/ucd-snmp/vmstat_solaris2.c Tue Oct 6 02:03:44 2009 |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
3 |
@@ -525,6 +525,13 @@ |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
4 |
DEBUGMSGTL(("ucd-snmp/vmstat_solaris2.c:update_stats", |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
5 |
"time_diff: %lld\n", time_diff)); |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
6 |
|
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
7 |
+ /* |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
8 |
+ * Assign a minimum value to get around divide by zero case |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
9 |
+ */ |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
10 |
+ if (time_diff == 0) { |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
11 |
+ time_diff = 1; |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
12 |
+ } |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
13 |
+ |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
14 |
/* |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
15 |
* swapin and swapout are in pages, MIB wants kB/s,so we just need to get kB and seconds |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
16 |
* For the others we need to get value per second |