Batch Operations Guide
Efficiently manage multiple jobs simultaneously with S9S's batch operation capabilities.
Overview
Batch operations allow you to:
- Manage multiple jobs with a single command
- Apply operations to filtered jobs
- Perform bulk job maintenance tasks
- Export output from multiple jobs
Selection Methods
Visual Selection
Use visual selection mode to choose multiple items:
| Key | Action | Description |
|---|---|---|
| Toggle selection | Select/deselect current item |
| Visual mode | Enter visual selection mode |
| Visual line mode | Select entire rows |
| Select all | Select all visible items |
| Deselect all | Clear all selections |
| Invert selection | Invert current selection |
Filter-Based Selection
Select items using filters:
# Select all failed jobs /state:FAILED # Select jobs by user /user:alice # Combine multiple filters /state:PENDING user:bob
Available Batch Operations
S9S supports the following batch operations on selected jobs:
Cancel Jobs
Cancel all selected jobs:
# Select jobs and press 'c' or choose "Cancel Jobs" from the menu # Confirmation dialog will appear before execution
Operation: Calls
scancelHold Jobs
Put selected jobs on hold:
# Select jobs and press 'H' or choose "Hold Jobs" from the menu # Jobs will be prevented from starting
Operation: Calls
scontrol holdRelease Jobs
Release held jobs:
# Select held jobs and press 'r' or choose "Release Jobs" from the menu # Jobs will be eligible to run again
Operation: Calls
scontrol releaseRequeue Jobs
Requeue selected jobs:
# Select jobs and press 'q' or choose "Requeue Jobs" from the menu # Jobs will be requeued for execution
Operation: Calls
scontrol requeueExport Job Output
Export job output for all selected jobs:
# Select jobs and press 'e' or choose "Export Output" from the menu # Choose output format: Text, JSON, CSV, or Markdown # Files saved to ~/slurm_exports/ by default
Formats Available:
- Text: Plain text with header information
- JSON: Structured JSON with metadata
- CSV: CSV format (line-by-line for analysis)
- Markdown: Markdown format with code blocks
Operation: Retrieves job output and saves to local files Use Case: Archive job results, analyze output across multiple jobs
Interactive Batch Operations
Using the Batch Operations Menu
- Select Jobs: Use visual selection (key) or filters to select multiple jobs
Space - Open Batch Menu: Press (or configured batch key) to open the batch operations menu
b - Choose Operation: Navigate the menu or use keyboard shortcuts:
- - Cancel Jobs
c - - Hold Jobs
H - - Release Jobs
r - - Requeue Jobs
q - - Export Output
e
- Confirm: Review the confirmation dialog showing affected jobs
- Execute: Confirm to execute the batch operation
- Monitor Progress: Watch the progress bar as operations are applied to each job
Progress Tracking
The batch operations interface shows:
- Number of jobs being processed
- Current job being processed
- Success/failure count
- Overall completion status
Common Workflows
Cleanup Failed Jobs
# Step 1: Filter failed jobs /state:FAILED # Step 2: Review the filtered list # Step 3: Press 'c' to cancel all failed jobs # Step 4: Confirm the operation
Hold User Jobs for Maintenance
# Step 1: Filter user's pending jobs /user:alice state:PENDING # Step 2: Press 'H' to hold all jobs # Step 3: Perform maintenance # Step 4: Filter held jobs and press 'r' to release them
Requeue Failed Jobs
# Step 1: Filter failed jobs /state:FAILED # Step 2: Press 'q' to requeue # Step 3: Jobs will be requeued and eligible to run again
Export Results from Completed Jobs
# Step 1: Filter completed jobs /state:COMPLETED user:alice # Step 2: Press 'e' to export # Step 3: Choose export format (Text, JSON, CSV, or Markdown) # Step 4: Files saved to ~/slurm_exports/
Safety and Validation
Confirmation Dialogs
All destructive batch operations (cancel, hold, requeue) require confirmation:
- Shows the number of jobs affected
- Lists job IDs that will be modified
- Requires explicit "Yes" to proceed
- Can be canceled with "No" or
Esc
Progress Feedback
Batch operations provide real-time feedback:
- Progress bar showing completion percentage
- Current job being processed
- Success and failure counts
- Final summary of results
Error Handling
If a batch operation fails on individual jobs:
- Operation continues with remaining jobs
- Errors are counted and reported
- Final summary shows successful vs. failed operations
Configuration
Export Settings
Configure default export behavior:
# Default export path (defaults to ~/slurm_exports) export: defaultPath: ~/my_job_exports # Default export format defaultFormat: json
Troubleshooting
Common Issues
"No jobs selected for batch operations"
- Solution: Select at least one job using or visual selection mode
Space
"Permission denied" errors during batch operations
- Solution: You can only perform operations on your own jobs (unless admin)
"Operation failed" for some jobs
- Cause: Job state may have changed, or job may not support the operation
- Solution: Review the final summary to identify which jobs failed
Export files not found
- Solution: Check directory or configured export path
~/slurm_exports/ - Note: Directory is created automatically on first export
Keyboard Reference
| Key | Operation | Description |
|---|---|---|
| Open batch menu | Open batch operations on selected jobs |
| Toggle selection | Select/deselect individual jobs |
| Cancel jobs | Cancel all selected jobs |
| Hold jobs | Put selected jobs on hold |
| Release jobs | Release held jobs |
| Requeue jobs | Requeue selected jobs |
| Export output | Export job output |
| Close menu | Close batch operations menu |
Next Steps
- Learn more about Advanced Filtering for precise job selection
- Explore Export capabilities for detailed output analysis
- Review Job Management for single-job operations