I know I can use qacct
to get all kind of statistics about running jobs. Now is there a way get some statistics about how many jobs are pending and how long do they need to wait on average?
Bonus question: can I get statistics about "idling" (or empty) slots in SGE?
qacct mostly gets information about jobs that have finished rather than ones that are running. If you set
MONITOR=1
in the sched_conf params the scheduler will log information about reservations to the schedule file. You can use this to find out how long those specific jobs still have to wait.Alternatively the accounting file records historical job start and submission times (for finished jobs).
If you want stats on how many jobs are queued then you could try a cronjob that samples the output of
qstat -s p -u '*'
.