Skip to main content

show_job

show_job is a custom script to quickly check the state of your pending, running, and recently completed jobs on M3.

Usage

See all current and recent jobs

To show all of your current and recent jobs, run show_job with no arguments

[lexg@m3-login3 ~]$ show_job
Job Summary
+-----------------------+--------------------------------+
| Summary | Value |
+-----------------------+--------------------------------+
| Cluster | M3 |
| User Name | Lex Gallon (Monash University) |
| Num of Submitted Jobs | 0 |
| Num of Running Job | 0 |
| Num of CPU Cores | 0 |
+-----------------------+--------------------------------+
********************
Job Details on M3
********************
+----------+------+---------+--------------------+-----------+--------+---------+--------------+------------+-------------+--------------+
| ID | USER | ACCOUNT | JOBNAME | PARTITION | QOS | STATE | RUNNING TIME | WALLTIME | NO OF NODES | DETAILS |
+----------+------+---------+--------------------+-----------+--------+---------+--------------+------------+-------------+--------------+
| 41762254 | lexg | nq46 | Very important job | comp | normal | Running | 0-00:00:23 | 0-01:00:00 | 2 | m3v[115-116] |
+----------+------+---------+--------------------+-----------+--------+---------+--------------+------------+-------------+--------------+
*********************
Job History on M3 sorted by attribute <start> start from 2024-12-10T15:43:30
*********************
+----------+--------------------------+----------+---------+----------+----------+-----------------------+-----------+
| Job ID | Job Name | Username | Account | Priority | Hostname | Requested Memory (MB) | Status |
+----------+--------------------------+----------+---------+----------+----------+-----------------------+-----------+
| 41748678 | Desktop | lexg | nq46 | 146913 | m3p008 | 56320 | TIMEOUT |
| 41748576 | Desktop | lexg | nq46 | 146913 | m3p008 | 56320 | CANCELLED |
| 41401001 | ntasks1-commands2.slurm | lexg | nq46 | 106925 | m3s108 | 4096 | COMPLETED |
| 41400991 | ntasks1-commands2.slurm | lexg | nq46 | 106925 | m3s108 | 4096 | COMPLETED |
| 41400882 | ntasks=1-2commands.slurm | lexg | nq46 | 106925 | m3j009 | 4096 | COMPLETED |
+----------+--------------------------+----------+---------+----------+----------+-----------------------+-----------+
You may run show_job --help for more information about the command

See only a specific job

To see only details about a specific job, provide the job's ID as an argument, e.g. to see details about the (completed) job with ID 41762254:

[lexg@m3-login3 ~]$ show_job 41762254
job ids ['41762254'] are not found in running jobs database
Searching in history database

Job Summary
+-----------------------+--------------------------------+
| Summary | Value |
+-----------------------+--------------------------------+
| Cluster | M3 |
| User Name | Lex Gallon (Monash University) |
| Num of Submitted Jobs | 0 |
| Num of Running Job | 0 |
| Num of CPU Cores | 0 |
+-----------------------+--------------------------------+
********************
Job Details on M3
********************
+----+------+---------+---------+-----------+-----+-------+--------------+----------+-------------+---------+
| ID | USER | ACCOUNT | JOBNAME | PARTITION | QOS | STATE | RUNNING TIME | WALLTIME | NO OF NODES | DETAILS |
+----+------+---------+---------+-----------+-----+-------+--------------+----------+-------------+---------+
+----+------+---------+---------+-----------+-----+-------+--------------+----------+-------------+---------+
*********************
Job History on M3 sorted by attribute <start> start from 2024-12-10T16:05:03
*********************
+----------+--------------------+----------+---------+----------+--------------+-----------------------+-----------+
| Job ID | Job Name | Username | Account | Priority | Hostname | Requested Memory (MB) | Status |
+----------+--------------------+----------+---------+----------+--------------+-----------------------+-----------+
| 41762254 | Very important job | lexg | nq46 | 106852 | m3v[115-116] | 4096 | COMPLETED |
+----------+--------------------+----------+---------+----------+--------------+-----------------------+-----------+
Job summary for 41762254
+------------------------------------+------------------------------------+
| Summary | Value |
+------------------------------------+------------------------------------+
| Job ID | 41762254 |
| Username | lexg |
| userdesc | Lex Gallon (Monash University) |
| ---------------------------------- | ---------------------------------- |
| Job Name | Very important job |
| Account | nq46 |
| Partition | comp |
| Status | COMPLETED |
| Elapsed Time (sec) | 50 |
| Time Limit | 60 |
| Hostname | m3v[115-116] |
| Submit Time | 2024-12-17 15:51:04 |
| Start Time | 2024-12-17 15:51:05 |
| End Time | 2024-12-17 15:51:55 |
| ---------------------------------- | ---------------------------------- |
| Requested CPUs | 2 |
| Requested Memory (MB) | 4096 |
| QoS | normal |
+------------------------------------+------------------------------------+
You may run show_job --help for more information about the command

See all available options

Run show_job --help to see other options.

[lexg@m3-login3 ~]$ show_job --help
usage: show_job [-h] [-u USERNAME [USERNAME ...]] [-r {comp,desktop,com,short,m3i,m3m,m3g,m3h,m3f,m3d,m3a,gpu,all} [{comp,desktop,com,short,m3i,m3m,m3g,m3h,m3f,m3d,m3a,gpu,all} ...]] [-nh [NUM_HISTORY_RECORDS]] [-R] [-s [SORT_BY_ATTR]] [-S START_TIME]
[-E END_TIME] [--no_color] [--no_hist]
[jobid ...]

show jobs submitted to slurm

positional arguments:
jobid the id(s) of which job you need to check. If job is not found in currently running job list, job history database between -S/-E will be checked. (default: None)

optional arguments:
-h, --help show this help message and exit
-u USERNAME [USERNAME ...], --username USERNAME [USERNAME ...]
Check user limit, this option work when -j is not selected, it can be a single user or a list of user (default: ['lexg'])
-r {comp,desktop,com,short,m3i,m3m,m3g,m3h,m3f,m3d,m3a,gpu,all} [{comp,desktop,com,short,m3i,m3m,m3g,m3h,m3f,m3d,m3a,gpu,all} ...], --partition {comp,desktop,com,short,m3i,m3m,m3g,m3h,m3f,m3d,m3a,gpu,all} [{comp,desktop,com,short,m3i,m3m,m3g,m3h,m3f,m3d,m3a,gpu,all} ...]
display jobs in spcific partition, effective when -j not selected (default: ['all'])
-nh [NUM_HISTORY_RECORDS], --num_history_records [NUM_HISTORY_RECORDS]
Display given number of history records, default is to display all records. The records are sorted by -s option. Searching in history database may take very long time. Do not use this when you have specific id to search in history
database, since result could be filtered out (default: -1)
-R, --reverse Reverse the order of history records, the most recent records are placed at the top by default. (default: True)
-s [SORT_BY_ATTR], --sort_by_attr [SORT_BY_ATTR]
sort history records based on given attribute in descending order, this option is only effective when -nh is specified. default to start time of the job. Available options are ['account', 'alloc_gres', 'alloc_nodes', 'array_job_id',
'array_max_tasks', 'array_task_id', 'array_task_str', 'associd', 'blockid', 'cluster', 'derived_ec', 'derived_es', 'elapsed', 'eligible', 'end', 'exitcode', 'gid', 'jobid', 'jobname', 'lft', 'partition', 'nodes', 'priority', 'qosid',
'req_cpus', 'req_gres', 'req_mem', 'requid', 'resvid', 'resv_name', 'show_full', 'start', 'state', 'state_str', 'stat_actual_cpufreq', 'steps', 'submit', 'suspended', 'sys_cpu_sec', 'sys_cpu_usec', 'timelimit', 'tot_cpu_sec',
'tot_cpu_usec', 'track_steps', 'tres_alloc_str', 'tres_req_str', 'uid', 'used_gres', 'user', 'user_cpu_sec', 'wckey', 'wckeyid'] (default: start)
-S START_TIME, --start_time START_TIME
Select jobs eligible after this timestamp. Default to 7 days ago. Input formats for start and end times: * today or tomorrow * midnight, noon, teatime (4PM) * HH:MM [AM|PM] * MMDDYY or MM/DD/YY or MM.DD.YY * YYYY-MM-DD[THH[:MM[:SS]]] *
now + count [minutes | hours | days | weeks] * Invalid time input results in message to stderr and return value of zero. (default: 2024-12-10T16:06:18)
-E END_TIME, --end_time END_TIME
Select jobs eligible before this timestamp. Default to now. Input formats for start and end times: * today or tomorrow * midnight, noon, teatime (4PM) * HH:MM [AM|PM] * MMDDYY or MM/DD/YY or MM.DD.YY * YYYY-MM-DD[THH[:MM[:SS]]] * now +
count [minutes | hours | days | weeks] * Invalid time input results in message to stderr and return value of zero. (default: 2024-12-17T16:06:18)
--no_color print command with no color (default: False)
--no_hist Do not query history job stats (default: False)

Output

Job summary

Very brief summary of all of your submitted and running jobs.

Job details on M3

A table of all of your pending and running jobs on M3. The columns are:

  • ID: job ID.
  • USER: username of user who submitted the job (should always be you!).
  • ACCOUNT: the Slurm account for this job. This usually looks like your HPC ID project.
  • JOBNAME: name you have given to your job.
  • PARTITION: partition your job will run on.
  • QOS: The Quality of Service your job will use.
  • STATE: whether your job is pending in the queue, running, or some other state.
  • RUNNING TIME: how long your job has been running for (if it has started).
  • WALLTIME: the maximum time allowed for your job.
  • NO OF NODES: the number of nodes your job will run on.
  • DETAILS: if your job is running, it will show the nodes that it is running on. If something is wrong with your job specification, it should show an error message.

Job History on M3

A table of all of your recent completed/cancelled jobs. It will indicate the earliest time of a job that it will display (e.g. see the start from 2024-12-10T15:43:30 in the example above). The different columns from "Job details" are:

  • Priority: the Slurm priority that your job ran under.
  • Hostname: the nodes that your job actually ran on.
  • Requested Memory (MB): how much memory your job requested/was allocated.
  • Status: same as STATE in [Job details on M3](#Job details on M3).