summaryrefslogtreecommitdiff
path: root/net-mgmt/net-snmp-devel/files/patch-vmstat_freebsd2.c
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2008-05-14 08:37:38 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2008-05-14 08:37:38 +0000
commit6498cb6bd65b449d0a90bfacc121e9d9139929d8 (patch)
tree04a2e8b73b86fe97dd1f5ed83b6b8a296cec43cc /net-mgmt/net-snmp-devel/files/patch-vmstat_freebsd2.c
parentUpdated to 1.104 (diff)
Improve upon previous patch (fix to use sysctls instead of KVM to
retrieve CPU stats). Use the newer BSD sysctl code already available in the 5.4.x instead of re-enabling the obsolete code from the previous release.
Notes
Notes: svn path=/head/; revision=213019
Diffstat (limited to 'net-mgmt/net-snmp-devel/files/patch-vmstat_freebsd2.c')
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-vmstat_freebsd2.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/net-mgmt/net-snmp-devel/files/patch-vmstat_freebsd2.c b/net-mgmt/net-snmp-devel/files/patch-vmstat_freebsd2.c
deleted file mode 100644
index 310c0bbf5320..000000000000
--- a/net-mgmt/net-snmp-devel/files/patch-vmstat_freebsd2.c
+++ /dev/null
@@ -1,22 +0,0 @@
---- agent/mibgroup/ucd-snmp/vmstat_freebsd2.c.orig 2008-04-25 16:28:53.000000000 +0300
-+++ agent/mibgroup/ucd-snmp/vmstat_freebsd2.c 2008-04-25 16:29:01.000000000 +0300
-@@ -174,6 +174,7 @@
- static long cpu_total;
- long cpu_sum;
- double cpu_prc;
-+ int mib[2], mib_len, cpu_new_len;
-
- static struct vmmeter mem_old, mem_new;
-
-@@ -195,7 +196,10 @@
- /*
- * CPU usage
- */
-- auto_nlist(CPTIME_SYMBOL, (char *) cpu_new, sizeof(cpu_new));
-+ mib_len = 2;
-+ sysctlnametomib("kern.cp_time", mib, &mib_len);
-+ cpu_new_len = sizeof(cpu_new);
-+ sysctl(mib, mib_len, cpu_new, &cpu_new_len, NULL, 0);
-
- cpu_total = 0;
-