Understanding Scheduler Spool Files
Xi-Batch maintains its state in binary spool files that serve as the scheduler's working database:
- btsched_jfile - Persistent job queue
- btsched_vfile - Variable definitions and values
- btsched_reps - Activity log (text format)
These files are read at scheduler startup and updated continuously during operation.
When Reinitialization Is Appropriate
Reinitialization returns the scheduler to a fresh state by recreating spool files. This is useful when:
- Migrating to new hardware
- Testing scheduler configuration changes
- Starting a new operational phase
- Recovering from file corruption
Important: This removes all queued jobs and job history. Ensure this is acceptable before proceeding.
Backup First
Always preserve current state before reinitialization:
bash
# Create timestamped backup mkdir -p /var/spool/xi/batch.backup.$(date +%Y%m%d-%H%M%S) cp -a /var/spool/xi/batch/* /var/spool/xi/batch.backup.$(date +%Y%m%d-%H%M%S)/
Reinitialization Procedure
bash
# Stop scheduler btquit -y sleep 2 pkill -9 btsched # Clean IPC resources xb-ripc -d # (See "Managing IPC Resources" article for manual cleanup if xb-ripc unavailable) # Remove state files (log file is preserved) rm -f /var/spool/xi/batch/btsched_jfile rm -f /var/spool/xi/batch/btsched_vfile # Note: DO NOT remove btsched_reps - it's your activity log # Restart scheduler (automatically creates fresh files) btstart # Verify clean initialization btjlist -H
What Happens During Restart
When the scheduler starts without existing spool files:
- Creates new btsched_jfile with empty job queue
- Creates new btsched_vfile with default variables
- Initializes IPC resources
- Begins accepting job submissions
After Reinitialization
The system is in a clean state:
- Job queue is empty
- Variable definitions reset to defaults
- All operations respond normally
- Ready for job submissions
You'll need to resubmit any jobs that were queued. Reference your backup directory if you need to check previous job definitions or parameters.
Preserving the Activity Log
The btsched_reps file is intentionally preserved during reinitialization. This maintains your operational history and audit trail while clearing active job state.