aze Posted January 19, 2003 Report Share Posted January 19, 2003 Hi! how do I start a program with high priority? Quote Link to comment Share on other sites More sharing options...
MottS Posted January 19, 2003 Report Share Posted January 19, 2003 take a look at 'nice' nice --help man nice help that help MOttS Quote Link to comment Share on other sites More sharing options...
aze Posted January 20, 2003 Author Report Share Posted January 20, 2003 nice -n-20 gedit Started gedit with normal priority :( The range is from -20 (highest) to 19 (lowest). Maybe I typed the wrong syntax? Quote Link to comment Share on other sites More sharing options...
MottS Posted January 21, 2003 Report Share Posted January 21, 2003 I don't understand why it does not works. I use nice on a crontab job on my server. Here is the command. */15 * * * * nice -n 19 webalizer Also, I just tryed. I typed nice -n -20 kwrite AS ROOT and ksysguard (CTRL-ESC when in KDE) told me that kwrite was started with a -20 priority. Don't forget that you can't start -20 job as a normal user. MOttS Quote Link to comment Share on other sites More sharing options...
aru Posted January 21, 2003 Report Share Posted January 21, 2003 Don't forget that you can't start -20 job as a normal user. even a -1 job. Only root can set negative priorities; so let your user start a job, and then tell root to change its priority with /usr/bin/renice Quote Link to comment Share on other sites More sharing options...
aze Posted January 21, 2003 Author Report Share Posted January 21, 2003 i tried as su: nice -n -20 gedit the I started gnome-system-monitor and it says priority is 0 (normal) :?: Quote Link to comment Share on other sites More sharing options...
MottS Posted January 21, 2003 Report Share Posted January 21, 2003 What about changing the priority of your job with renice ? I don't know the syntax but 'man renice' or 'renice --help' with tell you more about that. MOttS Quote Link to comment Share on other sites More sharing options...
aze Posted January 21, 2003 Author Report Share Posted January 21, 2003 renice needs the PID it will give more work. Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted January 21, 2003 Report Share Posted January 21, 2003 nice -n-20 gedit Started gedit with normal priority :( The range is from -20 (highest) to 19 (lowest). Maybe I typed the wrong syntax? You gotta put a space in between the -n and the -20. It works for me. Quote Link to comment Share on other sites More sharing options...
aze Posted January 21, 2003 Author Report Share Posted January 21, 2003 I tested with other apps and it worked. it just don't work with gedit :( (-n-20 = -n -20) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.