NAME
lsjobs - List your jobs (or others), and delete them if you wish
VERSION
version 0.21.0
SYNOPSIS
lsjobs [options] [jobid ... | pattern]
DESCRIPTION
This script lists the jobs and provides the option to delete them. It allows filtering the jobs based on various criteria such as user, name, and status.
OPTIONS
- -u, --user <username>
-
Show only jobs from the specified user. Default: current user.
- -n, --name <pattern>
-
Show only jobs with the specified name pattern. Default: .+ (matches any name).
- -s, --status <pattern>
-
Show only jobs with the specified status pattern (regex). Default: .+ (matches any status).
- -r, --running
-
Show only running jobs. This is a convenience flag equivalent to
-s RUNNING. - -p, --pending
-
Show only pending jobs. This is a convenience flag equivalent to
-s PENDING. - -t, --tab
-
Output in simple TSV format (tip: pipe to
vdfor interactive table) - --summary
-
Print a compact per-state summary table with one column for the selected user and one for the total matching jobs.
- --hide <column>
-
Hide specified column from display. Uses case-insensitive substring matching with a minimum of 3 characters. Can be specified multiple times to hide multiple columns. Examples:
--hide time --hide memory --hide nodelist - -d, --delete
-
Delete the selected jobs. This option must be used with caution, but an interactive prompt is provided
- --verbose
-
Display verbose output.
If a single job is selected, for example by giving a precise ID, the full job details will be displayed.
- --help
-
Print the help message and exit.
ARGUMENTS
- jobid ... | pattern
-
Optional. Specify either job IDs (many) or a pattern (single) to filter the jobs based on their names.
EXAMPLES
- Example 1:
-
List all jobs:
lsjobs - Example 2:
-
List jobs with the name "myjob":
lsjobs -n myjob - Example 3:
-
List running jobs of a specific user:
lsjobs -r -u username - Example 4:
-
Delete some of my jobs (only pending, and with name containing MEGAHIT):
lsjobs -d --pending MEGAHIT - Example 5:
-
List jobs with a simplified view (hide some columns):
lsjobs --hide nodelist --hide reason --hide totaltime - Example 6:
-
Show a summary table for a specific user against all jobs:
lsjobs --summary -u username
FORMAT
The output looks like
╔════════════════════════════════════════════════════════════════╗
║ SLURM Job Queue Summary ║
╚════════════════════════════════════════════════════════════════╝
▶ Running: 115 ◷ Pending: 4
→ Showing: 2 of 119 total jobs
┌──────────┬──────────┬─────────────┬────────────┬───────┬────────────┬────────────┬──────┬────────┬────────┐
│ JobID │ User │ Queue │ Name │ State │ Time │ TotalTime │ CPUS │ Memory │ Reason │
├──────────┼──────────┼─────────────┼────────────┼───────┼────────────┼────────────┼──────┼────────┼────────┤
│ 18938400 │ telatina │ qib-compute │ session │ ▶ RUN │ 1-02:05:08 │ 1-09:00:00 │ 12 │ 24000M │ ✓ None │
│ 19091254 │ telatina │ qib-compute │ nf-NFCORE> │ ▶ RUN │ 19:57 │ 4:00:00 │ 1 │ 7G │ ✓ None │
└──────────┴──────────┴─────────────┴────────────┴───────┴────────────┴────────────┴──────┴────────┴────────┘
SEE ALSO
AUTHOR
Andrea Telatin <proch@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2023-2025 by Andrea Telatin.
This is free software, licensed under:
The MIT (X11) License