Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question re 'nice'

Status
Not open for further replies.

johndrake

Technical User
Jul 25, 2002
97
Hi All,

How would one put "nice" in their .profile so that
it would execute all jobs at a lower priority? Specifically,
I have a job that runs a ksh job and it takes up a lot of cpu. Well lots of people are complaining, so I need to schedule these jobs so that they run at a lower priority.
How would I do this using Korn Shell and make it generic enough so that all my jobs would run at a lower priority
level.

-Joe
 
Should be something like this:

nice -n 19 YOUR_SCRIPT_NAME (repeat as needed)
 
As far as I know there is not a way to automatically NICE all jobs run under a particular login or account. However i'm looking to do this myself so if there is a method I would be grateful for the info too.

Just to verify, i'm not looking to explicitely "nice" every job i run by saying "nice -x scriptname.ksh", i'm looking for that nice priority to be the the default priority for any submissions under my id, which is what I beleive the other chap is looking for too, right?

I've heard beardy people talk of setting "pools" which have a particular priority config, but I am flirting ecotically with ignorance there.

Cheers, Colin.
 
As far as I know there is not a way to automatically NICE all jobs run under a particular login or account. However i'm looking to do this myself so if there is a method I would be grateful for the info too.

Just to verify, i'm not looking to explicitely "nice" every job i run by saying "nice -x scriptname.ksh", i'm looking for that nice priority to be the the default priority for any submissions under my id, which is what I beleive the other chap is looking for too, right?

I've heard beardy people talk of setting "pools" which have a particular priority config, but I am flirting wildly with ignorance there.

Cheers, Colin.
 
I'm not to sure you can just set this to globally affect your commands and scripts. I suppose you could set up an alias in your .profile for those instances in which you might want to run something at a lower priority, but that would be the only shortcut I know of....would be interesting if you could do something differently.
 
Hi All,


Thank you for the suggestions. I am to automatically NICE
all jobs.

-Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top