Da gibts mal wieder ein API:
Retrieve Output Queue Information (QSPROUTQ) API