So if I'm understanding you corectly, the syntax I'm looking for is:
 csh>  sudo -u $USER  nice -15  [scriptname]  >&  logfile.log &

I am a bit confused on your other point - I read the man page and it
states that minus values increase priority such that -20 is highest
priority and (+)20 is the lowest.

Thanks,
-mike

On 1/14/07, Rob Sherwood <[EMAIL PROTECTED]> wrote:
On Sat, Jan 13, 2007 at 11:39:23PM -0500, Michael Hughes wrote:
> The run scheduler as user thread caught my attention.  I'm in csh, and I
> want to run a compilation at a very high priority.  I tried:
> nice  -15  [scriptname]  >&  logfile.log &
>
> but you can't raise priority without elevating your privileges.  So I tried:
> sudo nice -15  [scriptname]  >&  logfile.log &

Hiya,

First, a quick bit on confusing nice syntax.  Not that this is a surprise
to you, but what you have up here is correct because you are using csh,
where if you had been invoking /usr/bin/nice, it would have *reduced* the
priority of your process, where as for /usr/bin/nice you would want "--15".


Second, both 'su' and sudo take parameters to exec what ever you want after them
with the specified users:

sudo -u user ./foo bar
or
su user -c ./foo bar

- Rob
.

Reply via email to