I was looking for similar information, so I could see when many jobs want
to use the same lockable resource or when an agent could be better used.
As I couldn't find such information I resorted to the API (via web calls) to
poll for running jobs and locked resources. This information is stored in
a file where I can then use a script to create a table of when was running
what and where. You could probably do the same to get the desired
statistics out of this data. I wrote it in python as there's a plugin to access
Jenkins but maybe someone with more internal knowledge could turn this
into a Jenkins plugin.
import jenkins
server = jenkins.Jenkins('
http://YOURJENKINS', username='USER', password='PASS', timeout=300)
queue = server.get_queue_info()
running = server.get_running_builds()
Maybe that helps. If there is a better way I'd be glad to hear about it as
I don't like my solution too much either.
bye Fabi