summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sysutils/gkrellm/distinfo4
-rw-r--r--sysutils/gkrellm/patches/patch-ab58
2 files changed, 34 insertions, 28 deletions
diff --git a/sysutils/gkrellm/distinfo b/sysutils/gkrellm/distinfo
index 70c019d0869..de0c4e01684 100644
--- a/sysutils/gkrellm/distinfo
+++ b/sysutils/gkrellm/distinfo
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.36 2006/04/13 19:14:44 cube Exp $
+$NetBSD: distinfo,v 1.37 2006/08/13 07:33:37 xtraeme Exp $
SHA1 (gkrellm-2.2.9.tar.bz2) = 114c09c78ae27bbb1b2f4c2edb346800831f2cef
RMD160 (gkrellm-2.2.9.tar.bz2) = e6de12774ec85c51dce18e3208340d1a080a6398
Size (gkrellm-2.2.9.tar.bz2) = 691133 bytes
SHA1 (patch-aa) = bc07107ed828a5a86012cae39316c1d35d2d7a4d
-SHA1 (patch-ab) = 015ed1c6b4d07d2da6aeefab2b746bff3fa1a88e
+SHA1 (patch-ab) = e900c811ddea106efee5cbfc04d0cf14cc6e6451
SHA1 (patch-ac) = 8890d5a5e8eaf21508a1bf91de788183fd6f7a75
SHA1 (patch-ad) = 18218e5e9e7a8cfaabb20ec03865670ae66a15bd
SHA1 (patch-ae) = e7c85ed5985bffd4cc2528b8c9fe258436257f75
diff --git a/sysutils/gkrellm/patches/patch-ab b/sysutils/gkrellm/patches/patch-ab
index dc4017a3804..7813dbba409 100644
--- a/sysutils/gkrellm/patches/patch-ab
+++ b/sysutils/gkrellm/patches/patch-ab
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.14 2005/09/08 13:19:56 cube Exp $
+$NetBSD: patch-ab,v 1.15 2006/08/13 07:33:37 xtraeme Exp $
---- src/sysdeps/netbsd.c.orig 2005-05-24 05:45:10.000000000 +0200
-+++ src/sysdeps/netbsd.c
-@@ -63,7 +63,8 @@ gkrellm_sys_cpu_read_data(void)
+--- src/sysdeps/netbsd.c.orig 2006-03-30 00:23:37.000000000 +0200
++++ src/sysdeps/netbsd.c 2006-08-13 09:25:55.000000000 +0200
+@@ -63,7 +63,8 @@
{
static int mib[] = { CTL_KERN, KERN_CP_TIME };
u_int64_t cp_time[ncpus][CPUSTATES];
@@ -12,7 +12,7 @@ $NetBSD: patch-ab,v 1.14 2005/09/08 13:19:56 cube Exp $
if (ncpus > 1) {
len = sizeof(cp_time[0]);
-@@ -94,7 +95,7 @@ get_ncpus(void)
+@@ -94,7 +95,7 @@
{
static int mib[] = { CTL_HW, HW_NCPU };
int ncpus;
@@ -21,7 +21,7 @@ $NetBSD: patch-ab,v 1.14 2005/09/08 13:19:56 cube Exp $
if (sysctl(mib, 2, &ncpus, &len, NULL, 0) < 0)
return 1;
-@@ -109,41 +110,35 @@ get_ncpus(void)
+@@ -109,39 +110,33 @@
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <uvm/uvm_extern.h>
@@ -43,16 +43,24 @@ $NetBSD: patch-ab,v 1.14 2005/09/08 13:19:56 cube Exp $
- static int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_ALL };
+ int mib[6];
double avenrun;
-- guint n_forks = 0, n_processes = 0;
+ guint n_forks = 0, n_processes = 0;
- struct uvmexp *uvmexp;
- int len, i;
-
- if (sysctl(mib, 3, NULL, &len, NULL, 0) >= 0) {
- n_processes = len / sizeof(struct kinfo_proc);
-+ guint n_forks = 0, n_processes = 0;
+- }
+-
+- /* get name list if it is not done yet */
+- if (kvmd == NULL) return;
+- if (nl[0].n_type == 0) kvm_nlist(kvmd, nl);
+ struct uvmexp_sysctl uvmexp;
+ size_t size;
-+
+
+- if (nl[0].n_type != 0) {
+- uvmexp = (struct uvmexp *)nl[X_UVM_EXP].n_value;
+- if (kvm_read(kvmd, (u_long)&uvmexp->forks, &i, sizeof(i)) == sizeof(i))
+- n_forks = i;
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC2;
+ mib[2] = KERN_PROC_ALL;
@@ -61,28 +69,17 @@ $NetBSD: patch-ab,v 1.14 2005/09/08 13:19:56 cube Exp $
+ mib[5] = 0;
+ if (sysctl(mib, 6, NULL, &size, NULL, 0) >= 0) {
+ n_processes = size / sizeof(struct kinfo_proc2);
- }
-
-- /* get name list if it is not done yet */
-- if (kvmd == NULL) return;
-- if (nl[0].n_type == 0) kvm_nlist(kvmd, nl);
--
-- if (nl[0].n_type != 0) {
-- uvmexp = (struct uvmexp *)nl[X_UVM_EXP].n_value;
-- if (kvm_read(kvmd, (u_long)&uvmexp->forks, &i, sizeof(i)) == sizeof(i))
-- n_forks = i;
++ }
++
+ mib[0] = CTL_VM;
+ mib[1] = VM_UVMEXP2;
+ size = sizeof(uvmexp);
+ if (sysctl(mib, 2, &uvmexp, &size, NULL, 0) >= 0) {
+ n_forks = uvmexp.forks;
}
--
-+
+
if (getloadavg(&avenrun, 1) <= 0)
- avenrun = 0;
- gkrellm_proc_assign_data(n_processes, 0, n_forks, avenrun);
-@@ -183,6 +178,96 @@ gkrellm_sys_proc_init(void)
+@@ -183,6 +178,96 @@
/* ===================================================================== */
@@ -179,7 +176,7 @@ $NetBSD: patch-ab,v 1.14 2005/09/08 13:19:56 cube Exp $
/* Sensor monitor interface */
/* Tables of voltage correction factors and offsets derived from the
-@@ -295,7 +380,7 @@ gkrellm_sys_sensors_init(void)
+@@ -295,7 +380,7 @@
int fd; /* file desc. for /dev/sysmon */
int id = 0; /* incremented for each sensor */
int type;
@@ -188,7 +185,7 @@ $NetBSD: patch-ab,v 1.14 2005/09/08 13:19:56 cube Exp $
gboolean found_sensors = FALSE;
/* check if some sensor is configured */
-@@ -336,3 +421,149 @@ gkrellm_sys_sensors_init(void)
+@@ -336,3 +421,158 @@
return found_sensors;
}
@@ -198,6 +195,15 @@ $NetBSD: patch-ab,v 1.14 2005/09/08 13:19:56 cube Exp $
+
+#include <sys/dkstat.h>
+#include <sys/disk.h>
++#include <sys/sysctl.h>
++
++#ifdef HW_IOSTATS
++#define HW_DISKSTATS HW_IOSTATS
++#define disk_sysctl io_sysctl
++#define dk_rbytes rbytes
++#define dk_wbytes wbytes
++#define dk_name name
++#endif
+
+gboolean
+gkrellm_sys_disk_init(void)