University Systems --> Glue --> General Glue Information --> How to use the nice command -->

How to use the nice command

This Web page explains how to run a program on the WAM or Glue systems while NOT logged on. If you are trying to run programs while not being logged on, and it's not working properly, these pages should explain why. If you do not follow these directions, your job will probably be killed by the system. Results from the job being killed are unpredictable, but would result in at least missing or incomplete output file(s).

If you want to to have programs continue to run after you log off, you will need to alter the priority of the process so it will be allowed to continue to run after you have logged off.

To run a long (or any) job without being logged on, you need to use the nice command. The standard syntax of the nice command is:

nice -19 COMMAND

For example, if you normally run your program with:

myprog < myinfile > myoutfile &

where myprog reads from "myinfile" and writes to "myoutfile", you would instead use:

nice -19 myprog < myinfile > myoutfile &

This would run it in the background (that's what the "&" does) with a low priority, which the system will allow to run.

If you are interested in learning more about the specifics of process priority, how processes NOT associated with a terminal (tty) are dealt with, and the nice command, click here.

If you have already started a process, and wish to alter it's priority so it will continue to execute after you log off, click here.

There are some considerations to take into account when you intend on running a job while not logged in; for details, click here.

If you have any questions about this, you can try checking the online manual pages for nice and renice with:

man nice

man renice

How do I:
How are we doing? Comments on this page?
Office of Information Technology
Office of Information Technology Help Desk Web Site University of Maryland Web Site Office of Information Technology Web Site