From owner-freebsd-bugs Sat May 4 17:40: 7 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 40B2D37B400 for ; Sat, 4 May 2002 17:40:04 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g450e4C23386; Sat, 4 May 2002 17:40:04 -0700 (PDT) (envelope-from gnats) Date: Sat, 4 May 2002 17:40:04 -0700 (PDT) Message-Id: <200205050040.g450e4C23386@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bruce Evans Subject: Re: bin/37702: /usr/bin/top uses 100% cpu in 'system' Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/37702; it has been noted by GNATS. From: Bruce Evans To: David Malone Cc: Edwin Groothuis , Subject: Re: bin/37702: /usr/bin/top uses 100% cpu in 'system' Date: Sun, 5 May 2002 10:39:24 +1000 (EST) On Sat, 4 May 2002, David Malone wrote: > On Fri, May 03, 2002 at 05:50:07AM -0700, Edwin Groothuis wrote: > > case 's': > > - if ((delay = atoi(optarg)) < 0) > > + if ((delay = atoi(optarg)) <= 0) > > { > > I think this has been fixed in -current in another way: > > if ((delay = atoi(optarg)) < 0 || (delay == 0 && getuid() != 0)) > > this means you're only alowd to get continious updates if you're > root. (This change came from the last beta version of top which > was released by the original authors.) -current still has the bad options parsing, and a delay of 0 causes strange synchronization at least on syscons consoles: the user/nice/system/interrupt/idle percentages are usually all displayed as "0.0". Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message