The simplest command for monitoring the state of a job is
qstat. Run without options,
qstat will produce a long list of every job queued and running on the system, probably more than you wish to see. To see the state only of your own jobs, use:
In Unix, the shell sets an environment variable
USER to your username (at NYU this is your NetID). In the example above this environment variable is used instead of explicitly typing my NetID.
qstat, as in the following example:
Most of the fields in the output are self-explanatory. The second-last column "S" is the job status, which can be :
- Q meaning "Queued"
- H meaning "Held" - this may be the result of a manual hold or of a job dependency
- R meaning "Running"
- C meaning "Completed". After the job finishes, it will remain with "completed" status for a short time before being removed from the batch system.
Other, less common job status flags are described in the manual (
Note that the output format in this example differs from that of the first example, which shows the time, memory and total number of nodes and tasks requested as well as the elapsed time. To see this extra information add the "
-a" switch to
For detailed information about a specific job,
qstat -f produces about a page of output detailing the resources requested, resources used, nodes on which the job is running and much more:
Finally, for more options and more detail on output of
qstat, see the manual page: