diff --git a/sysutils/symon/Makefile b/sysutils/symon/Makefile index 35e6174515c..4bb11b97702 100644 --- a/sysutils/symon/Makefile +++ b/sysutils/symon/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.39 2010/04/26 09:44:24 sthen Exp $ +# $OpenBSD: Makefile,v 1.40 2010/06/15 10:47:08 sthen Exp $ COMMENT-main= active monitoring tool -V= 2.79 +V= 2.82 DISTNAME= symon-${V} -PKGNAME-main= ${DISTNAME}p3 -FULLPKGNAME-mon= symon-mon-${V}p3 -FULLPKGNAME-mux= symon-mux-${V}p0 +PKGNAME-main= ${DISTNAME} +FULLPKGNAME-mon= symon-mon-${V} +FULLPKGNAME-mux= symon-mux-${V} CATEGORIES= sysutils net HOMEPAGE= http://www.xs4all.nl/~wpd/symon diff --git a/sysutils/symon/distinfo b/sysutils/symon/distinfo index db977c638ec..1f80efc0174 100644 --- a/sysutils/symon/distinfo +++ b/sysutils/symon/distinfo @@ -1,5 +1,5 @@ -MD5 (symon-2.79.tar.gz) = n/WDE8QgKUXOcxDgS/Osgg== -RMD160 (symon-2.79.tar.gz) = aTt5jNbFZPTot5xiwXdvWwNqrxo= -SHA1 (symon-2.79.tar.gz) = ohVm8ykbqqOYBr7DJVDVoooWMhM= -SHA256 (symon-2.79.tar.gz) = cVewh7maWfOrqaAsN1+xtBHcQylGP3SNIyPDzfPQzYM= -SIZE (symon-2.79.tar.gz) = 102400 +MD5 (symon-2.82.tar.gz) = dMOqbktMbCMe91ELt55zgw== +RMD160 (symon-2.82.tar.gz) = AQXAXYwDlnD4OHGaXm+E6TwglFU= +SHA1 (symon-2.82.tar.gz) = MarRa+Dzbcqq4Lo4ySyO47dUguo= +SHA256 (symon-2.82.tar.gz) = UnWIGS+pAYNPwuyGoYyWpwdUrQw6b+ovwIYrdV7USYY= +SIZE (symon-2.82.tar.gz) = 102319 diff --git a/sysutils/symon/patches/patch-platform_OpenBSD_sm_mbuf_c b/sysutils/symon/patches/patch-platform_OpenBSD_sm_mbuf_c deleted file mode 100644 index 10f0b52a620..00000000000 --- a/sysutils/symon/patches/patch-platform_OpenBSD_sm_mbuf_c +++ /dev/null @@ -1,77 +0,0 @@ -adapt to mbuf cluster changes in 4.4-current (mclpl -> mcl2k, mcl4k, [...]). - -$OpenBSD: patch-platform_OpenBSD_sm_mbuf_c,v 1.3 2009/03/11 01:55:07 sthen Exp $ ---- platform/OpenBSD/sm_mbuf.c.orig Sun Feb 11 20:09:35 2007 -+++ platform/OpenBSD/sm_mbuf.c Wed Mar 11 01:42:38 2009 -@@ -77,6 +77,8 @@ get_mbuf(char *symon_buf, int maxlen, struct stream *s - int totmem, totused, totmbufs, totpct; - u_int32_t stats[15]; - -+ totmem = totused = 0; -+ - mib[0] = CTL_KERN; - mib[1] = KERN_MBSTAT; - size = sizeof(mbstat); -@@ -114,24 +116,55 @@ get_mbuf(char *symon_buf, int maxlen, struct stream *s - if (!strcmp(name, "mbpl")) { - bcopy(&pool, &mbpool, sizeof(pool)); - flag |= 1; -- } else if (!strcmp(name, "mclpl")) { -+ } else if (!strcmp(name, "mcl2k")) { - bcopy(&pool, &mclpool, sizeof(pool)); -+ totmem += mclpool.pr_npages * page_size; -+ totused += (mclpool.pr_nget - mclpool.pr_nput) * mclpool.pr_size; - flag |= 2; -+ } else if (!strcmp(name, "mcl4k")) { -+ bcopy(&pool, &mclpool, sizeof(pool)); -+ totmem += mclpool.pr_npages * page_size; -+ totused += (mclpool.pr_nget - mclpool.pr_nput) * mclpool.pr_size; -+ flag |= 4; -+ } else if (!strcmp(name, "mcl8k")) { -+ bcopy(&pool, &mclpool, sizeof(pool)); -+ totmem += mclpool.pr_npages * page_size; -+ totused += (mclpool.pr_nget - mclpool.pr_nput) * mclpool.pr_size; -+ flag |= 8; -+ } else if (!strcmp(name, "mcl9k")) { -+ bcopy(&pool, &mclpool, sizeof(pool)); -+ totmem += mclpool.pr_npages * page_size; -+ totused += (mclpool.pr_nget - mclpool.pr_nput) * mclpool.pr_size; -+ flag |= 16; -+ } else if (!strcmp(name, "mcl12k")) { -+ bcopy(&pool, &mclpool, sizeof(pool)); -+ totmem += mclpool.pr_npages * page_size; -+ totused += (mclpool.pr_nget - mclpool.pr_nput) * mclpool.pr_size; -+ flag |= 32; -+ } else if (!strcmp(name, "mcl16k")) { -+ bcopy(&pool, &mclpool, sizeof(pool)); -+ totmem += mclpool.pr_npages * page_size; -+ totused += (mclpool.pr_nget - mclpool.pr_nput) * mclpool.pr_size; -+ flag |= 64; -+ } else if (!strcmp(name, "mcl64k")) { -+ bcopy(&pool, &mclpool, sizeof(pool)); -+ totmem += mclpool.pr_npages * page_size; -+ totused += (mclpool.pr_nget - mclpool.pr_nput) * mclpool.pr_size; -+ flag |= 128; - } -- if (flag == 3) -+ if (flag == 255) - break; - } -- if (flag != 3) { -- warning("mbuf(%.200s) failed (flag != 3)", st->arg); -+ if (flag != 255) { -+ warning("mbuf(%.200s) failed (flag != 255)", st->arg); - return 0; - } - - totmbufs = 0; - for (i = 0; i < nmbtypes; ++i) - totmbufs += mbstat.m_mtypes[i]; -- totmem = (mbpool.pr_npages + mclpool.pr_npages) * page_size; -- totused = (mbpool.pr_nget - mbpool.pr_nput) * mbpool.pr_size + -- (mclpool.pr_nget - mclpool.pr_nput) * mclpool.pr_size; -+ totmem += mbpool.pr_npages * page_size; -+ totused += (mbpool.pr_nget - mbpool.pr_nput) * mbpool.pr_size; - totpct = (totmem == 0) ? 0 : ((totused * 100) / totmem); - - stats[0] = totmbufs; diff --git a/sysutils/symon/patches/patch-platform_OpenBSD_sm_proc_c b/sysutils/symon/patches/patch-platform_OpenBSD_sm_proc_c deleted file mode 100644 index 729de5004a6..00000000000 --- a/sysutils/symon/patches/patch-platform_OpenBSD_sm_proc_c +++ /dev/null @@ -1,102 +0,0 @@ -$OpenBSD: patch-platform_OpenBSD_sm_proc_c,v 1.1 2010/01/19 19:43:57 kili Exp $ ---- platform/OpenBSD/sm_proc.c.orig Wed Feb 20 09:17:25 2008 -+++ platform/OpenBSD/sm_proc.c Sun Jan 17 17:57:27 2010 -@@ -52,7 +52,7 @@ - #define pagetob(size) (((u_int32_t)size) << proc_pageshift) - - /* Globals for this module start with proc_ */ --static struct kinfo_proc *proc_ps = NULL; -+static struct kinfo_proc2 *proc_ps = NULL; - static int proc_max = 0; - static int proc_cur = 0; - static int proc_stathz = 0; -@@ -67,7 +67,7 @@ typedef long pctcpu; - void - gets_proc() - { -- int mib[3]; -+ int mib[6]; - int procs; - size_t size; - -@@ -85,30 +85,33 @@ gets_proc() - proc_max = (procs * 5) / 4; - - if (proc_max > SYMON_MAX_DOBJECTS) { -- fatal("%s:%d: dynamic object limit (%d) exceeded for kinfo_proc structures", -+ fatal("%s:%d: dynamic object limit (%d) exceeded for kinfo_proc2 structures", - __FILE__, __LINE__, SYMON_MAX_DOBJECTS); - } - -- proc_ps = xrealloc(proc_ps, proc_max * sizeof(struct kinfo_proc)); -+ proc_ps = xrealloc(proc_ps, proc_max * sizeof(struct kinfo_proc2)); - } - - /* read data in anger */ - mib[0] = CTL_KERN; -- mib[1] = KERN_PROC; -+ mib[1] = KERN_PROC2; - mib[2] = KERN_PROC_KTHREAD; -- size = proc_max * sizeof(struct kinfo_proc); -- if (sysctl(mib, 3, proc_ps, &size, NULL, 0) < 0) { -+ mib[3] = 0; -+ mib[4] = sizeof(struct kinfo_proc2); -+ mib[5] = proc_max; -+ size = proc_max * sizeof(struct kinfo_proc2); -+ if (sysctl(mib, 6, proc_ps, &size, NULL, 0) < 0) { - warning("proc probe cannot get processes"); - proc_cur = 0; - return; - } - -- if (size % sizeof(struct kinfo_proc) != 0) { -- warning("proc size mismatch: got %d bytes, not dividable by sizeof(kinfo_proc) %d", -- size, sizeof(struct kinfo_proc)); -+ if (size % sizeof(struct kinfo_proc2) != 0) { -+ warning("proc size mismatch: got %d bytes, not dividable by sizeof(kinfo_proc2) %d", -+ size, sizeof(struct kinfo_proc2)); - proc_cur = 0; - } else { -- proc_cur = size / sizeof(struct kinfo_proc); -+ proc_cur = size / sizeof(struct kinfo_proc2); - } - } - -@@ -147,7 +150,7 @@ int - get_proc(char *symon_buf, int maxlen, struct stream *st) - { - int i; -- struct kinfo_proc *pp; -+ struct kinfo_proc2 *pp; - u_quad_t cpu_ticks = 0; - u_quad_t cpu_uticks = 0; - u_quad_t cpu_iticks = 0; -@@ -160,19 +163,19 @@ get_proc(char *symon_buf, int maxlen, struct stream *s - int n = 0; - - for (pp = proc_ps, i = 0; i < proc_cur; pp++, i++) { -- if (strncmp(st->arg, pp->kp_proc.p_comm, strlen(st->arg)) == 0) { -+ if (strncmp(st->arg, pp->p_comm, strlen(st->arg)) == 0) { - /* cpu time - accumulated */ -- cpu_uticks += pp->kp_proc.p_uticks; /* user */ -- cpu_sticks += pp->kp_proc.p_sticks; /* sys */ -- cpu_iticks += pp->kp_proc.p_iticks; /* int */ -+ cpu_uticks += pp->p_uticks; /* user */ -+ cpu_sticks += pp->p_sticks; /* sys */ -+ cpu_iticks += pp->p_iticks; /* int */ - /* cpu time - percentage since last measurement */ -- cpu_pct = pctdouble(pp->kp_proc.p_pctcpu) * 100.0; -+ cpu_pct = pctdouble(pp->p_pctcpu) * 100.0; - cpu_pcti += cpu_pct; - /* memory size - shared pages are counted multiple times */ -- mem_procsize += pagetob(pp->kp_eproc.e_vm.vm_tsize + /* text pages */ -- pp->kp_eproc.e_vm.vm_dsize + /* data */ -- pp->kp_eproc.e_vm.vm_ssize); /* stack */ -- mem_rss += pagetob(pp->kp_eproc.e_vm.vm_rssize); /* rss */ -+ mem_procsize += pagetob(pp->p_vm_tsize + /* text pages */ -+ pp->p_vm_dsize + /* data */ -+ pp->p_vm_ssize); /* stack */ -+ mem_rss += pagetob(pp->p_vm_rssize); /* rss */ - n++; - } - } diff --git a/sysutils/symon/patches/patch-platform_OpenBSD_sm_sensor_c b/sysutils/symon/patches/patch-platform_OpenBSD_sm_sensor_c deleted file mode 100644 index 6672076a0b3..00000000000 --- a/sysutils/symon/patches/patch-platform_OpenBSD_sm_sensor_c +++ /dev/null @@ -1,23 +0,0 @@ -$OpenBSD: patch-platform_OpenBSD_sm_sensor_c,v 1.1 2010/04/26 09:44:24 sthen Exp $ ---- platform/OpenBSD/sm_sensor.c.orig Mon Apr 26 09:52:18 2010 -+++ platform/OpenBSD/sm_sensor.c Mon Apr 26 09:57:30 2010 -@@ -93,10 +93,16 @@ init_sensor(struct stream *st) - __FILE__, __LINE__, st->arg); - - /* convert sensor device string to an integer */ -- for (dev = 0; dev < MAXSENSORDEVICES; dev++) { -+#define SYMON_MAXSENSORDEVICES 1024 -+ for (dev = 0; dev < SYMON_MAXSENSORDEVICES; dev++) { - st->parg.sn.mib[2] = dev; -- if (sysctl(st->parg.sn.mib, 3, &sensordev, &sdlen, NULL, 0) == -1) -- continue; -+ if (sysctl(st->parg.sn.mib, 3, &sensordev, &sdlen, NULL, 0) == -1) { -+ if (errno == ENOENT) -+ break; -+ if (errno == ENXIO) -+ continue; -+ fatal("sensor sysctl: %s", strerror(errno)); -+ } - if (strcmp(devname, sensordev.xname) == 0) - break; - } diff --git a/sysutils/symon/patches/patch-symon_symon_conf b/sysutils/symon/patches/patch-symon_symon_conf deleted file mode 100644 index 61803f6de76..00000000000 --- a/sysutils/symon/patches/patch-symon_symon_conf +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-symon_symon_conf,v 1.1 2010/04/26 09:44:24 sthen Exp $ ---- symon/symon.conf.orig Mon Apr 26 10:03:44 2010 -+++ symon/symon.conf Mon Apr 26 10:04:09 2010 -@@ -7,7 +7,7 @@ monitor { cpu(0), mem, - if(lo0), - # pf, - # mbuf, --# sensor(0), -+# sensor(cpu0.temp0), - # proc(httpd), - # if(xl0), if(de0), if(wi0), - # io(wd1), io(wd2), io(wd3), io(cd0) diff --git a/sysutils/symon/patches/patch-symux_symux_conf b/sysutils/symon/patches/patch-symux_symux_conf deleted file mode 100644 index 0aa3b1c5109..00000000000 --- a/sysutils/symon/patches/patch-symux_symux_conf +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-symux_symux_conf,v 1.1 2010/04/26 09:44:24 sthen Exp $ ---- symux/symux.conf.orig Mon Apr 26 10:04:16 2010 -+++ symux/symux.conf Mon Apr 26 10:04:28 2010 -@@ -10,7 +10,7 @@ source 127.0.0.1 { - if(lo0), - # pf, - # mbuf, --# sensor(0), -+# sensor(cpu0.temp0), - # proc(httpd), - # if(xl0), if(de0), if(wi0), - # io(wd1), io(wd2), io(wd3), io(cd0)