snmplib:
- [PATCH 1921861]: Avoid endless loop after truncating 64bit int
- Better handling of CONTAINER_INSERT failures with multiple indices
snmpd:
- [PATCH 2023633
]: add SCTP-MIB implementation (Linux only)
- suppress annoying "registration != duplicate" warning for root oids
build:
- [BUG 2023803]: Compilation problems on HP-UX 11.31
- Update to libtool 1.5.26
AIX:
- Add support for AIX 6.x.
83 lines
3.4 KiB
Text
83 lines
3.4 KiB
Text
$NetBSD: patch-am,v 1.9 2008/09/08 12:58:09 adam Exp $
|
|
|
|
--- agent/mibgroup/host/hr_swrun.c.orig 2008-08-22 02:18:50.000000000 +0200
|
|
+++ agent/mibgroup/host/hr_swrun.c
|
|
@@ -599,6 +599,8 @@ var_hrswrun(struct variable * vp,
|
|
#elif HAVE_KVM_GETPROCS
|
|
#if defined(freebsd5) && __FreeBSD_version >= 500014
|
|
strcpy(string, proc_table[LowProcIndex].ki_comm);
|
|
+ #elif defined(dragonfly) && __DragonFly_version >= 190000
|
|
+ strcpy(string, proc_table[LowProcIndex].kp_comm);
|
|
#else
|
|
strcpy(string, proc_table[LowProcIndex].kp_proc.p_comm);
|
|
#endif
|
|
@@ -722,6 +724,8 @@ var_hrswrun(struct variable * vp,
|
|
#elif HAVE_KVM_GETPROCS
|
|
#if defined(freebsd5) && __FreeBSD_version >= 500014
|
|
strcpy(string, proc_table[LowProcIndex].ki_comm);
|
|
+ #elif defined(dragonfly) && __DragonFly_version >= 190000
|
|
+ strcpy(string, proc_table[LowProcIndex].kp_comm);
|
|
#else
|
|
strcpy(string, proc_table[LowProcIndex].kp_proc.p_comm);
|
|
#endif
|
|
@@ -929,11 +933,17 @@ var_hrswrun(struct variable * vp,
|
|
} else
|
|
long_return = 4; /* application */
|
|
#else
|
|
+ #if defined(dragonfly) && __DragonFly_version >= 190000
|
|
+ if (proc_table[LowProcIndex].kp_flags & P_SYSTEM)
|
|
+ #else
|
|
if (proc_table[LowProcIndex].kp_proc.p_flag & P_SYSTEM)
|
|
+ #endif
|
|
long_return = 2; /* operatingSystem */
|
|
else
|
|
long_return = 4; /* application */
|
|
#endif
|
|
+#elif defined darwin
|
|
+ long_return = -1;
|
|
#else
|
|
long_return = 4; /* application */
|
|
#endif
|
|
@@ -970,6 +980,8 @@ var_hrswrun(struct variable * vp,
|
|
#if HAVE_KVM_GETPROCS
|
|
#if defined(freebsd5) && __FreeBSD_version >= 500014
|
|
switch (proc_table[LowProcIndex].ki_stat) {
|
|
+ #elif defined(dragonfly) && __DragonFly_version >= 190000
|
|
+ switch (proc_table[LowProcIndex].kp_stat) {
|
|
#else
|
|
switch (proc_table[LowProcIndex].kp_proc.p_stat) {
|
|
#endif
|
|
@@ -1077,6 +1089,14 @@ var_hrswrun(struct variable * vp,
|
|
long_return = 0;
|
|
#elif defined(freebsd5)
|
|
long_return = proc_table[LowProcIndex].ki_runtime / 100000;
|
|
+ #elif defined(dragonfly) && __DragonFly_version >= 190000
|
|
+ long_return = proc_table[LowProcIndex].kp_lwp.kl_uticks +
|
|
+ proc_table[LowProcIndex].kp_lwp.kl_sticks +
|
|
+ proc_table[LowProcIndex].kp_lwp.kl_iticks;
|
|
+ #elif defined(dragonfly)
|
|
+ long_return = proc_table[LowProcIndex].kp_eproc.e_uticks +
|
|
+ proc_table[LowProcIndex].kp_eproc.e_sticks +
|
|
+ proc_table[LowProcIndex].kp_eproc.e_iticks;
|
|
#else
|
|
long_return = proc_table[LowProcIndex].kp_proc.p_uticks +
|
|
proc_table[LowProcIndex].kp_proc.p_sticks +
|
|
@@ -1169,6 +1189,8 @@ var_hrswrun(struct variable * vp,
|
|
long_return =
|
|
#if defined(freebsd5)
|
|
proc_table[LowProcIndex].ki_size / 1024;
|
|
+ #elif defined(dragonfly) && __DragonFly_version >= 190000
|
|
+ proc_table[LowProcIndex].kp_vm_map_size / 1024;
|
|
#else
|
|
proc_table[LowProcIndex].kp_eproc.e_vm.vm_map.size / 1024;
|
|
#endif
|
|
@@ -1489,6 +1511,9 @@ Get_Next_HR_SWRun(void)
|
|
#if defined(freebsd5) && __FreeBSD_version >= 500014
|
|
if (proc_table[current_proc_entry].ki_stat != 0)
|
|
return proc_table[current_proc_entry++].ki_pid;
|
|
+ #elif defined(dragonfly) && __DragonFly_version >= 190000
|
|
+ if (proc_table[current_proc_entry].kp_stat != 0)
|
|
+ return proc_table[current_proc_entry++].kp_pid;
|
|
#else
|
|
if (proc_table[current_proc_entry].kp_proc.p_stat != 0)
|
|
return proc_table[current_proc_entry++].kp_proc.p_pid;
|