| Next revision | Previous revision |
| cluster:managing_jobs [2018/10/02 13:23] – created support | cluster:managing_jobs [2024/11/11 20:30] (current) – mcloughlin |
|---|
| ======Managing Jobs====== | ======Managing Jobs====== |
| =====Managing Jobs on the Cluster===== | |
| The above commands work well when you have not logged out of the cluster while running the job. Because of the cluster's [[Hardware_Configuration|setup]], there are many nodes that could be running your job. When you log in to <code>cluster.econ.umd.edu</code>, you are automatically sent to a particular node <code>econ0</code> through <code>econ5</code>. This might not be the same node that is running your job. | |
| |
| One way to get to the node that has your job is log in and then go to the particular node like: | |
| <code>ssh econ3</code> | |
| |
| And then to see processes that are running under your username in this node: | |
| <code>ps -ux</code> | |
| |
| There are also special cluster tools to manage jobs between nodes. You can use the command | |
| <code>cluster-ps</code> | |
| |
| This returns a list of processes on each node that are associated with your user id. (As of 2014-06-26 it only works for econ0-5.) You can choose a process to kill by noting the node and process id ('PID' in the cluster-ps output) and then using the command | |
| <code>cluster-kill -n <node> -p <PID></code> | |
| |
| ======Renice-ing===== | |
| You can change how many CPU cycles are given to your job by using the command <code>renice</code>. Once you know the process id, you can use the command: | |
| <code>renice -n <priority> -p <process id></code> | |
| to change the [[nice]]ness of your process. If you are running a computationally intensive job, please set your job to a high niceness level, so that you don't monopolize cluster resources :) | |
| =====General Job Management===== | =====General Job Management===== |
| |
| Once you have a job running, you might want to change it's priority (<code>renice</code>) or stop it. To check on the list of running jobs, use the command <code>top</code>. | Once you have a job running, you might want to change its priority or stop it. To check on the list of running jobs, use the command <code>htop</code> |
| | |
| [[http://unixhelp.ed.ac.uk/CGI/man-cgi?top|Top]] is an interactive program that dynamically lists processes running on the server. Pressing '?' will get you to a help page. Pressing 'q' gets out of the help page, and also quits top altogether. | |
| |
| You can also see all running jobs statically with | You can also see all running jobs statically with |
| Alternatively, press 'q' to stop top. Then, type use the <code>kill</code> command. | Alternatively, press 'q' to stop top. Then, type use the <code>kill</code> command. |
| <code>kill <process id></code> | <code>kill <process id></code> |
| | |
| | ======Renice-ing===== |
| | You can change how many CPU cycles are given to your job by using the command <code>renice</code>. Once you know the process id, you can use the command: |
| | <code>renice -n <priority> -p <process id></code> |
| | to change the niceness of your process. If you are running a computationally intensive job, please set your job to a high niceness level, so that you don't monopolize cluster resources :) |
| |