From owner-freebsd-stable@FreeBSD.ORG Wed Feb 1 12:15:49 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AFC2116A420 for ; Wed, 1 Feb 2006 12:15:49 +0000 (GMT) (envelope-from michael.schuh@gmail.com) Received: from uproxy.gmail.com (uproxy.gmail.com [66.249.92.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34A9F43D55 for ; Wed, 1 Feb 2006 12:15:47 +0000 (GMT) (envelope-from michael.schuh@gmail.com) Received: by uproxy.gmail.com with SMTP id q2so262146uge for ; Wed, 01 Feb 2006 04:15:46 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ucfUiEWMBxDwwScF0ph/e/2NL+sNJkPiq/jFWNRZdsSaz/H0Zm9+ZBTaw23l4kmhT5KOUav4CtZeYtnC0mEASifpfUNk6jL+yX6QyIw+q+KyqpbtG+8NDVMjvIrIyrol+CUOK+9iUzoDNtDTnHvLfc92Wu6Vjrru8sojlp8X2Tk= Received: by 10.48.221.19 with SMTP id t19mr1649570nfg; Wed, 01 Feb 2006 04:09:37 -0800 (PST) Received: by 10.48.240.4 with HTTP; Wed, 1 Feb 2006 04:09:36 -0800 (PST) Message-ID: <1dbad3150602010409x6e5874dn@mail.gmail.com> Date: Wed, 1 Feb 2006 13:09:36 +0100 From: Michael Schuh To: Stefan Esser , Michael Schuh , freebsd-stable@freebsd.org In-Reply-To: <20060130142821.GA3199@StefanEsser.FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1dbad3150601300443h7f038759h@mail.gmail.com> <1dbad3150601300449h6f73929fr@mail.gmail.com> <20060130142821.GA3199@StefanEsser.FreeBSD.org> Cc: Subject: Re: top doesn't show any Process in idle-Mode X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2006 12:15:49 -0000 Hello, sorry for the time ago, i haven't an FreeBSD-Box on my Work. The CLI-Optin -S doesn't really help me. I will test the patch from Stefan Esser, but i think my Problem are not alone SRUN-Proc's. if i run TOP with the CLI-Options -I -S so i should see Processes with status RUN and SRUN, if i was right. I have also running top described as above, and now i do a make -j 16 cleen cleandir cleandepend under /usr/src, so i unterstand things right i shoud see minimum 3 or more Processes with status RUN ( System was Sempron 2400 @1800MHz). But i shows only one and this very short, but if the system runs i could se= e an process named pagexxxxx, and if the system was idle i can see an process with status SRUN called idle.... So i get the time i will test the Patch from Stefan. If i getting new values and experiences i come back again. Tahnks to all and best regards michael 2006/1/30, Stefan Esser : > On 2006-01-30 13:49 +0100, Michael Schuh wrote: > > Hello, > > > > i use top mostly in idle-mode. > > # top > > or > > # top -I > > > > Under releng_6 (stable p4) and the older versions, > > i think down to releng_5, doesn't show a running process. > > > > I have tryed to dig in the source but my experiences are not > > so good that i can find the possible error. > > See line 603 (in HEAD) of /usr/src/usr.bin/top/machine.c: > > if (displaymode =3D=3D DISP_CPU && !show_idle && > (pp->ki_pctcpu =3D=3D 0 || pp->ki_stat !=3D SRUN)) > /* skip idle or non-running processes */ > continue; > > Since I do not like the current behaviour, I considered removing the > test for state SRUN. But I guess that the teest can not be completely > eliminated. Instead of selecting only SRUN, some states may need to > be suppressed (SZOMB, possibly also SIDL, SSTOP). > > I'll test the following version on my system: > > if (displaymode =3D=3D DISP_CPU && !show_idle && > (pp->ki_pctcpu =3D=3D 0 || pp->ki_stat =3D=3D SZOMB |= | pp->ki_stat =3D=3D SSTOP)) > /* skip idle or non-running processes */ > continue; > > > Has anyone same experiences made with top, or has > > anyone a workaround (please not like while true........) > > Patch included (not verified to apply to 5.x or 6.x, but editing the > test in place should be easy, then). > > Regards, STefan > > --- /usr/src/usr.bin/top/machine.c 18 May 2005 13:42:51 -0000 1= .74 > +++ /usr/src/usr.bin/top/machine.c 30 Jan 2006 14:26:08 -0000 > @@ -601,7 +601,7 @@ > continue; > > if (displaymode =3D=3D DISP_CPU && !show_idle && > - (pp->ki_pctcpu =3D=3D 0 || pp->ki_stat !=3D SRUN)) > + (pp->ki_pctcpu =3D=3D 0 || pp->ki_stat =3D=3D SZOMB |= | pp->ki_stat =3D=3D SSTOP)) > /* skip idle or non-running processes */ > continue; > >