Re: Query on "nice" command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25Feb2008 11:57, Ravi Shanmugam <ravi.shanmugam@xxxxxxxxxx> wrote:
| I am writing a shell script, but I run that shell script with "nice -18"
| priority without invoking from command line like "nice -18 <script
| name>.
| Is it possible to embed the "nice" command in the same shell script? If
| yes, could somebody help me.

If you are thinking "make the script make itself nice", then yes. You want
the "renice" command, for adjusting the niceness of an existing process.
Apply it to the current process using $$ (the shell's script's process id):

  renice 18 -p $$

See "man renice" for details.

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux