Skip to content

Instantly share code, notes, and snippets.

@MohamedElashri
Created April 22, 2025 06:07
Show Gist options
  • Save MohamedElashri/d914dd3c0567ef42e7d8746dc6190ea3 to your computer and use it in GitHub Desktop.
Save MohamedElashri/d914dd3c0567ef42e7d8746dc6190ea3 to your computer and use it in GitHub Desktop.
condor_q cheatsheet

Condor _q Cheatsheet


1. View & Summarize Jobs

Command What it Does Example
condor_q Batched summary (one line per cluster) condor_q
condor_q -nobatch Per‑job listing (one line per proc) condor_q -nobatch 195
condor_q -all All users’ jobs (batched) condor_q -all
condor_q -all -nobatch All users’ jobs (per‑job) condor_q -all -nobatch

2. Run & Status Info

Command What it Does Example
condor_q -run Show running jobs, run‑time & execute node condor_q -run -nobatch
condor_q -hold [JobId] List held jobs + reason condor_q -hold
condor_q -better-analyze Diagnose why idle/held condor_q -better-analyze 14308195.6

3. DAG & Structure

Command What it Does Example
condor_q -dag Group by DAG tree condor_q -dag -nobatch
condor_q -long JobId Full attribute dump for one job condor_q -long 19997268.0

4. Attributes & Formatting

Command What it Does Example
-af Attr1 Attr2 … Auto‑format: show only specified attributes condor_q -af RequestMemory RequestDisk
-constraint "<expr>" Filter jobs by any ClassAd expression condor_q -constraint "JobStatus == 5" -af HoldReason

5. Batch Naming

  • Submit-time
    # in submit file
    batch_name = "CoolJobs"
    
    # or on CLI
    condor_submit my.sub -batch-name CoolJobs

6. Handy One‑Liners & Tips

  • Full held‑reason text
    condor_q -hold -af HoldReason
  • Memory/disk request vs. usage
    condor_q -af RequestMemory RequestDisk MemoryUsage
  • Jobs by DAGMan ID
    condor_q -constraint "DAGManJobId == 234567"
  • Automate hold alerts
    • Cron: condor_q -hold | mail -s "Mohamed Elashri" you@domain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment