From owner-freebsd-questions@FreeBSD.ORG Tue Nov 16 18:59:15 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 42E6116A4CE for ; Tue, 16 Nov 2004 18:59:15 +0000 (GMT) Received: from weller-fahy.com (pD9FFF4B8.dip.t-dialin.net [217.255.244.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2794F43D31 for ; Tue, 16 Nov 2004 18:59:14 +0000 (GMT) (envelope-from dave-lists-freebsd-questions@weller-fahy.com) Received: (qmail 80568 invoked by uid 1001); 16 Nov 2004 18:59:12 -0000 Date: Tue, 16 Nov 2004 19:59:12 +0101 From: "David J. Weller-Fahy" To: freebsd-questions@freebsd.org Message-ID: <20041116185850.GA78958@weller-fahy.com> Mail-Followup-To: freebsd-questions@freebsd.org References: <20041116144450.GA70461@weller-fahy.com> <20041116155632.GD80412@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041116155632.GD80412@dan.emsphone.com> X-URL-Me: http://www.weller-fahy.com X-URL-Family: http://www.weller-kin.com X-Accept-Language: en X-Location: Germany, Gangelt, Hof Grootfeld User-Agent: Mutt/1.5.6i Subject: Re: Question about nice X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2004 18:59:15 -0000 * Dan Nelson [2004-11-16 16:56 +0100]: > In the last episode (Nov 16), David J. Weller-Fahy said: > > If so, what is the difference between the following two commands (in > > terms of priority level)? > > nice isoqlog > > isoqlog > > man nice: > 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. Doh! I missed that in the man page. Ok, I dug a little deeper and found that the default priority is 0 (man setpriority, who would've figured? :). So, to answer my own question (with your prompting): Prepending 'nice' to any command runs it at priority 10, without 'nice' it would run at 0 (or 'normal'). Idle priorities range from 0 to 31, realtime from 0 to 31, and normal priority is in between (and, according to setpriority, is also 0... lots of zeros). So it will make a difference. > > nice sudo isoqlog > > sudo nice isoqlog > The first may take longer to execute on a busy machine, since sudo > itself is running at a lower priority. The 2nd may be a security > hazard, depending on whether you allowed "nice isoqlog" or just "nice" > (with any command) in your sudo config file. I had decided not to allow 'nice' with any command, it's pleasant to see that I was correct. So using the first syntax for non-time-sensitive programs would keep those from hogging the machines resources, correct? Well, I think I've got it, now. Thanks again for a pointer to the obvious. ;] Regards, -- dave [ please don't CC me ]