From owner-freebsd-questions@FreeBSD.ORG Wed Nov 17 00:46:54 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE88916A4CE for ; Wed, 17 Nov 2004 00:46:54 +0000 (GMT) Received: from fri.itea.ntnu.no (fri.itea.ntnu.no [129.241.7.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 33E7E43D31 for ; Wed, 17 Nov 2004 00:46:54 +0000 (GMT) (envelope-from svein-freebsd-questions@theloosingend.net) Received: from localhost (localhost [127.0.0.1]) by fri.itea.ntnu.no (Postfix) with ESMTP id DBD537F80 for ; Wed, 17 Nov 2004 01:46:52 +0100 (CET) Received: from mirrorball.thelosingend.net (m069c.studby.ntnu.no [129.241.130.69]) by fri.itea.ntnu.no (Postfix) with SMTP for ; Wed, 17 Nov 2004 01:46:52 +0100 (CET) Received: (qmail 31389 invoked from network); 17 Nov 2004 00:46:52 -0000 Received: from m190d.studby.ntnu.no (129.241.131.190) by m069c.studby.ntnu.no with QMQP; 17 Nov 2004 00:46:52 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 17 Nov 2004 00:46:52 -0000 Date: Wed, 17 Nov 2004 01:46:52 +0100 (CET) From: Svein Halvor Halvorsen X-X-Sender: sveinhal@maren.thelosingend.net To: "David J. Weller-Fahy" In-Reply-To: <20041116144450.GA70461@weller-fahy.com> Message-ID: <20041117014040.U82191@maren.thelosingend.net> References: <20041116144450.GA70461@weller-fahy.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Content-Scanned: with sophos and spamassassin at mailgw.ntnu.no. cc: freebsd-questions@freebsd.org Subject: Re: Question about nice X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2004 00:46:54 -0000 [David J. Weller-Fahy, 2004-11-16] > 1. I understand nice is useful if you need to run a program at a certain > priority. Is nice useful when not passing a priority? If so, what is > the difference between the following two commands (in terms of priority > level)? > > nice isoqlog > isoqlog According to the man page nice(1) The nice utility runs utility at an altered scheduling priority, by incrementing its ``nice'' value by the specified increment, or a default value of 10. The lower the nice value of a process, the higher its scheduling priority. If you don't specify tge priority level, then mice adds 10. > 2. If it is useful to run nice without passing a priority, then are the > following two commands equivalent? If not, which one would be preferred > and why? > > nice sudo isoqlog > sudo nice isoqlog The former will run sudo nice, which in turn will make isoqlog run as root, with the priority level inherited. The latter will make sudo run nice as root, and in turn run isoqlog with priority 10, with the effective user inherited. The obvoius difference, is that you let sudo run nice without a password, you could do "sudo nice " without a password. Cheers, Svein Halvor