diff options
author | Christian Birchinger <joker@gentoo.org> | 2004-05-22 03:04:35 +0000 |
---|---|---|
committer | Christian Birchinger <joker@gentoo.org> | 2004-05-22 03:04:35 +0000 |
commit | 78319a02ef957f3e9c2db54be2dce699f24f0c9b (patch) | |
tree | ac3e2973bd5cf150d67f178facc983ca9fe10623 /x11-plugins | |
parent | Initial verison. (diff) | |
download | historical-78319a02ef957f3e9c2db54be2dce699f24f0c9b.tar.gz historical-78319a02ef957f3e9c2db54be2dce699f24f0c9b.tar.bz2 historical-78319a02ef957f3e9c2db54be2dce699f24f0c9b.zip |
Added a patch to make memory monitoring work with kernel 2.6
Diffstat (limited to 'x11-plugins')
-rw-r--r-- | x11-plugins/wmmon/ChangeLog | 10 | ||||
-rw-r--r-- | x11-plugins/wmmon/Manifest | 7 | ||||
-rw-r--r-- | x11-plugins/wmmon/files/digest-wmmon-1.0_beta2-r2 | 1 | ||||
-rw-r--r-- | x11-plugins/wmmon/files/wmmon-1.0_beta2-kernel26.patch | 121 | ||||
-rw-r--r-- | x11-plugins/wmmon/wmmon-1.0_beta2-r2.ebuild | 33 |
5 files changed, 168 insertions, 4 deletions
diff --git a/x11-plugins/wmmon/ChangeLog b/x11-plugins/wmmon/ChangeLog index d3bde1682c72..68e0274ba600 100644 --- a/x11-plugins/wmmon/ChangeLog +++ b/x11-plugins/wmmon/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for x11-plugins/wmmon -# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-plugins/wmmon/ChangeLog,v 1.7 2003/12/06 16:00:06 port001 Exp $ +# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/x11-plugins/wmmon/ChangeLog,v 1.8 2004/05/22 03:04:35 joker Exp $ + +*wmmon-1.0_beta2-r2 (22 May 2004) + + 22 May 2004; Christian Birchinger <joker@gentoo.org> + wmmon-1.0_beta2-r2.ebuild, files/wmmon-1.0_beta2-kernel26.patch: + Added a patch to make memory monitoring work with kernel 2.6 06 Dec 2003; Ian Leitch <port001@gentoo.org> wmmon-1.0_beta2-r1.ebuild: Reverting the block. See #33362 diff --git a/x11-plugins/wmmon/Manifest b/x11-plugins/wmmon/Manifest index b071ac4d93f4..380045685bba 100644 --- a/x11-plugins/wmmon/Manifest +++ b/x11-plugins/wmmon/Manifest @@ -1,6 +1,9 @@ +MD5 e26264fcf02d9b7a6be3b23160af3c47 ChangeLog 1345 MD5 3037208e23835f5d52018deca6c25d95 wmmon-1.0_beta2-r1.ebuild 782 -MD5 3637b310f703c3b463196e3a79dae882 ChangeLog 1126 -MD5 62ba71d3b2fa785a4cbd5d47fdbd0eb6 metadata.xml 165 MD5 ceedfcdbed48377818f314c4d69547df wmmon-1.0_beta2.ebuild 693 +MD5 62ba71d3b2fa785a4cbd5d47fdbd0eb6 metadata.xml 165 +MD5 32bf4ac21dec612ca2e4d6d411afd8b7 wmmon-1.0_beta2-r2.ebuild 841 MD5 98b814408937f2d47b59cfedac2640e1 files/digest-wmmon-1.0_beta2 62 MD5 98b814408937f2d47b59cfedac2640e1 files/digest-wmmon-1.0_beta2-r1 62 +MD5 98b814408937f2d47b59cfedac2640e1 files/digest-wmmon-1.0_beta2-r2 62 +MD5 449f55da66d8174cae657ae52c58ebea files/wmmon-1.0_beta2-kernel26.patch 3333 diff --git a/x11-plugins/wmmon/files/digest-wmmon-1.0_beta2-r2 b/x11-plugins/wmmon/files/digest-wmmon-1.0_beta2-r2 new file mode 100644 index 000000000000..aa0d5acf08e0 --- /dev/null +++ b/x11-plugins/wmmon/files/digest-wmmon-1.0_beta2-r2 @@ -0,0 +1 @@ +MD5 1b8c780b8c24a6958c69330fef4171df wmmon-1_0b2.tar.gz 21589 diff --git a/x11-plugins/wmmon/files/wmmon-1.0_beta2-kernel26.patch b/x11-plugins/wmmon/files/wmmon-1.0_beta2-kernel26.patch new file mode 100644 index 000000000000..3b1234b4eb1c --- /dev/null +++ b/x11-plugins/wmmon/files/wmmon-1.0_beta2-kernel26.patch @@ -0,0 +1,121 @@ +diff -ruN wmmon.app.orig/wmmon/Makefile wmmon.app/wmmon/Makefile +--- wmmon.app.orig/wmmon/Makefile 1998-05-19 23:13:16.000000000 +0200 ++++ wmmon.app/wmmon/Makefile 2004-05-22 04:27:19.000000000 +0200 +@@ -5,9 +5,8 @@ + ../wmgeneral/misc.o \ + ../wmgeneral/list.o + +- + .c.o: +- cc -c -O2 -Wall $< -o $*.o ++ cc -c $(CFLAGS) $(DEFINES) -Wall $< -o $*.o + + wmmon: $(OBJS) + cc -o wmmon $^ $(LIBDIR) $(LIBS) +diff -ruN wmmon.app.orig/wmmon/wmmon.c wmmon.app/wmmon/wmmon.c +--- wmmon.app.orig/wmmon/wmmon.c 1998-05-19 23:13:16.000000000 +0200 ++++ wmmon.app/wmmon/wmmon.c 2004-05-22 04:29:39.000000000 +0200 +@@ -187,8 +187,7 @@ + + void update_stat_cpu(stat_dev *); + void update_stat_io(stat_dev *); +-void update_stat_mem(stat_dev *st, stat_dev *st2); +-void update_stat_swp(stat_dev *); ++void update_stat_mem_k26(stat_dev *st, stat_dev *st2); + + void wmmon_routine(int argc, char **argv) { + +@@ -297,8 +296,7 @@ + update_stat_io(&stat_device[1]); + + if(stat_current == 2) { +- update_stat_mem(&stat_device[2], &stat_device[3]); +-// update_stat_swp(&stat_device[3]); ++ update_stat_mem_k26(&stat_device[2], &stat_device[3]); + } + + if (stat_current < 2) { +@@ -497,47 +495,56 @@ + st->hisaddcnt += 1; + } + +-void update_stat_mem(stat_dev *st, stat_dev *st2) { ++void update_stat_mem_k26(stat_dev *st, stat_dev *st2) { + + char temp[128]; +- unsigned long free, shared, buffers, cached; ++ unsigned long free, shared, buffers, cached, swap_free; + + freopen("/proc/meminfo", "r", fp_meminfo); + while (fgets(temp, 128, fp_meminfo)) { +- if (strstr(temp, "Mem:")) { +- sscanf(temp, "Mem: %ld %ld %ld %ld %ld %ld", +- &st->rt_idle, &st->rt_stat, +- &free, &shared, &buffers, &cached); +- st->rt_idle >>= 10; +- st->rt_stat -= buffers+cached; +- st->rt_stat >>= 10; +-// break; ++ if (strstr(temp, "MemTotal:")) { ++ sscanf(temp, "MemTotal: %ld", &st->rt_idle); ++ continue; + } +- if (strstr(temp, "Swap:")) { +- sscanf(temp, "Swap: %ld %ld", &st2->rt_idle, &st2->rt_stat); +- st2->rt_idle >>= 10; +- st2->rt_stat >>= 10; +- break; ++ if (strstr(temp, "MemFree:")) { ++ sscanf(temp, "MemFree: %ld", &free); ++ continue; ++ } ++ if (strstr(temp, "Buffers:")) { ++ sscanf(temp, "Buffers: %ld", &buffers); ++ continue; ++ } ++ if (strstr(temp, "Cached:")) { ++ sscanf(temp, "Cached: %ld", &cached); ++ continue; ++ } ++ ++ if (strstr(temp, "SwapTotal:")) { ++ sscanf(temp, "SwapTotal: %ld", &st2->rt_idle); ++ continue; ++ } ++ if (strstr(temp, "SwapFree:")) { ++ sscanf(temp, "SwapFree: %ld", &swap_free); ++ continue; + } + } +-} + +-void update_stat_swp(stat_dev *st) { ++ // used = total - free; ++ st->rt_stat = st->rt_idle - free; ++ st2->rt_stat = st2->rt_idle - swap_free; + +- char temp[128]; ++ // ignore shared ++ shared = 0; + +- fseek(fp_meminfo, 0, SEEK_SET); +- while (fgets(temp, 128, fp_meminfo)) { +- if (strstr(temp, "Swap:")) { +- sscanf(temp, "Swap: %ld %ld", &st->rt_idle, &st->rt_stat); +- st->rt_idle >>= 10; +- st->rt_stat >>= 10; +- break; +- } +- } ++ st->rt_idle >>= 10; ++ st->rt_stat -= buffers+cached; ++ st->rt_stat >>= 10; + ++ st2->rt_idle >>= 10; ++ st2->rt_stat >>= 10; + } + ++ + /*******************************************************************************\ + |* get_statistics *| + \*******************************************************************************/ diff --git a/x11-plugins/wmmon/wmmon-1.0_beta2-r2.ebuild b/x11-plugins/wmmon/wmmon-1.0_beta2-r2.ebuild new file mode 100644 index 000000000000..cc005e81fef6 --- /dev/null +++ b/x11-plugins/wmmon/wmmon-1.0_beta2-r2.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-plugins/wmmon/wmmon-1.0_beta2-r2.ebuild,v 1.1 2004/05/22 03:04:35 joker Exp $ + +inherit eutils + +S="${WORKDIR}/${PN}.app" +IUSE="" +DESCRIPTION="Dockable system resources monitor applette for WindowMaker" +WMMON_VERSION=1_0b2 +SRC_URI="http://rpig.dyndns.org/~anstinus/Linux/${PN}-${WMMON_VERSION}.tar.gz" +HOMEPAGE="http://www.bensinclair.com/dockapp/" + +DEPEND="virtual/x11" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~x86 ~sparc ~amd64" + +src_unpack() { + unpack ${A} ; cd ${S}/${PN} + epatch ${FILESDIR}/${P}-kernel26.patch + sed -i -e "s|-O2|${CFLAGS}|" Makefile +} + +src_compile() { + emake -C ${PN} || die +} + +src_install () { + dobin wmmon/wmmon + dodoc BUGS CHANGES COPYING HINTS INSTALL README TODO +} |