Switch to KERN_PROC2. ok ajacoutot@
This commit is contained in:
parent
81e383e536
commit
ce187dc365
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.48 2010/01/05 12:40:36 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.49 2010/01/18 14:27:16 sthen Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
@ -7,8 +7,8 @@ COMMENT-client= single process stack of system monitors for GTK+2
|
||||
|
||||
V= 2.3.4
|
||||
DISTNAME= gkrellm-${V}
|
||||
PKGNAME-main= gkrellm-server-${V}
|
||||
PKGNAME-client= gkrellm-${V}
|
||||
PKGNAME-main= gkrellm-server-${V}p0
|
||||
PKGNAME-client= gkrellm-${V}p0
|
||||
CATEGORIES= sysutils sysutils/gkrellm
|
||||
|
||||
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-src_sysdeps_openbsd_c,v 1.14 2009/03/05 08:06:28 ajacoutot Exp $
|
||||
--- src/sysdeps/openbsd.c.orig Fri Oct 3 17:46:45 2008
|
||||
+++ src/sysdeps/openbsd.c Sun Mar 1 10:28:40 2009
|
||||
$OpenBSD: patch-src_sysdeps_openbsd_c,v 1.15 2010/01/18 14:27:16 sthen Exp $
|
||||
--- src/sysdeps/openbsd.c.orig Sat Oct 4 00:46:45 2008
|
||||
+++ src/sysdeps/openbsd.c Mon Jan 18 08:58:33 2010
|
||||
@@ -62,85 +62,96 @@ gkrellm_sys_main_cleanup(void)
|
||||
/* ===================================================================== */
|
||||
/* CPU monitor interface */
|
||||
@ -109,7 +109,7 @@ $OpenBSD: patch-src_sysdeps_openbsd_c,v 1.14 2009/03/05 08:06:28 ajacoutot Exp $
|
||||
gkrellm_sys_proc_read_data(void)
|
||||
{
|
||||
- static int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_ALL };
|
||||
+ static int proc_mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_ALL };
|
||||
+ static int proc_mib[] = { CTL_KERN, KERN_PROC2, KERN_PROC_ALL };
|
||||
+ static int fork_mib[] = { CTL_KERN, KERN_FORKSTAT };
|
||||
double avenrun;
|
||||
guint n_forks = 0, n_processes = 0;
|
||||
@ -126,8 +126,9 @@ $OpenBSD: patch-src_sysdeps_openbsd_c,v 1.14 2009/03/05 08:06:28 ajacoutot Exp $
|
||||
-
|
||||
-
|
||||
- if (sysctl(mib, 3, NULL, &len, NULL, 0) >= 0) {
|
||||
- n_processes = len / sizeof(struct kinfo_proc);
|
||||
+ if (sysctl(proc_mib, 3, NULL, &len, NULL, 0) >= 0) {
|
||||
n_processes = len / sizeof(struct kinfo_proc);
|
||||
+ n_processes = len / sizeof(struct kinfo_proc2);
|
||||
}
|
||||
|
||||
- /* get name list if it is not done yet */
|
||||
|
Loading…
Reference in New Issue
Block a user