Date: Wed, 17 Nov 2004 01:46:52 +0100 (CET) From: Svein Halvor Halvorsen <svein-freebsd-questions@theloosingend.net> To: "David J. Weller-Fahy" <dave-lists-freebsd-questions@weller-fahy.com> Cc: freebsd-questions@freebsd.org Subject: Re: Question about nice Message-ID: <20041117014040.U82191@maren.thelosingend.net> In-Reply-To: <20041116144450.GA70461@weller-fahy.com> References: <20041116144450.GA70461@weller-fahy.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[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 <anyprogram>" without a password. Cheers, Svein Halvor
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041117014040.U82191>