Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Sep 2000 04:45:56 +0900 (KST)
From:      jhp@freebsd.hanirc.org
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        wmtop@tanelorn.demon.co.uk
Subject:   ports/21401: Update sysutils/wmtop 0.81 to 0.83 with fix for current
Message-ID:  <200009191945.e8JJjuI68133@cocoja.holywar.net>

next in thread | raw e-mail | index | archive | help

>Number:         21401
>Category:       ports
>Synopsis:       Update port sysutils/wmtop to 0.83 with fix for current
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 19 12:50:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Park JongHwan
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:

FreeBSD jhp.yi.org 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Thu Sep 14 11:02:12 KST 2000
jhp@jhp.yi.org:/usr/obj/usr/src/sys/JHP  i386

>Description:

In -CURRENT with recent SMPng commit, there is system process named 'idle' 
which reports cpu idle as its utilization.  we have to prevent system 
processes displayed from wmtop to get top 3 processes. :)

>How-To-Repeat:

run wmtop on -current with SMPng. 

>Fix:

if (ppid == 0 && !strcmp(procname, "idle")) rather than 
if (ppid == 0 && !show_system) would be better for not display 'idle' process.
(remove show_system crap then)

diff -urN ../sysutils/wmtop/Makefile wmtop/Makefile
--- ../sysutils/wmtop/Makefile	Mon Aug  7 16:28:54 2000
+++ wmtop/Makefile	Wed Sep 20 04:02:45 2000
@@ -5,9 +5,10 @@
 # $FreeBSD: ports/sysutils/wmtop/Makefile,v 1.3 2000/08/03 09:26:42 asami Exp $
 
 PORTNAME=	wmtop
-PORTVERSION=	0.81
+PORTVERSION=	0.83
 CATEGORIES=	sysutils
-MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
+MASTER_SITES=	http://wmtop.sourceforge.net/ \
+		${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
 
 MAINTAINER=	wmtop@tanelorn.demon.co.uk
diff -urN ../sysutils/wmtop/files/md5 wmtop/files/md5
--- ../sysutils/wmtop/files/md5	Mon May  8 06:06:09 2000
+++ wmtop/files/md5	Wed Sep 20 03:53:14 2000
@@ -1 +1 @@
-MD5 (wmtop-0.81.tar.gz) = 76c520de993daf649a34a0a6981b8628
+MD5 (wmtop-0.83.tar.gz) = 948bdcbd0b18c119532153d1ec20ee64
diff -urN ../sysutils/wmtop/patches/patch-ab wmtop/patches/patch-ab
--- ../sysutils/wmtop/patches/patch-ab	Thu Jan  1 09:00:00 1970
+++ wmtop/patches/patch-ab	Wed Sep 20 03:48:56 2000
@@ -0,0 +1,55 @@
+--- wmtop.c.orig	Wed May 17 05:08:20 2000
++++ wmtop.c	Wed Sep 20 03:48:43 2000
+@@ -78,6 +78,10 @@
+  */
+ int mode = 0;
+ 
++#if defined(FREEBSD)
++int show_system = 0;
++#endif
++
+ #if defined(DEBUG)
+ /*
+  * Memory handler
+@@ -234,7 +238,7 @@
+     char deparenthesised_name[WMTOP_BUFLENGTH];
+ #endif /* defined(LINUX) */
+ #if defined(FREEBSD)
+-    int us,um,ks,km;
++    int us,um,ks,km,ppid;
+ #endif /* defined(FREEBSD) */
+ 
+ #if defined(PARANOID)
+@@ -298,11 +302,18 @@
+      * Extract cpu times from data in /proc/<pid>/stat
+      * XXX: Process name extractor for FreeBSD is untested right now.
+      */
+-    rc = sscanf(line,"%s %*s %*s %*s %*s %*s %*s %*s %d,%d %d,%d",
+-	    procname,
++    rc = sscanf(line,"%s %*s %d %*s %*s %*s %*s %*s %d,%d %d,%d",
++	    procname, &ppid,
+ 	    &us,&um,&ks,&km);
+     if (rc<5)
+ 	return 1;
++
++    if (ppid == 0 && !show_system)
++    {
++	process->time_stamp=0;
++	return 1;
++    }
++
+     if (process->name)
+ 	wmtop_free(process->name);
+     process->name = wmtop_strdup(procname);
+@@ -725,6 +736,11 @@
+ 		    i++;
+ 		}
+ 		break;
++#if defined (FREEBSD)
++	    case 'S':
++		show_system = 1;
++		break;
++#endif
+ 	    case 'r':
+ 		if (argc > (i+1)) {
+ 		    refresh_rate = (atoi(argv[i+1]) * 1000);

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009191945.e8JJjuI68133>