@@ -0,0 +1,1439 @@
+from __future__ import print_function%0Aimport matplotlib%0Amatplotlib.use('Agg')%0Aimport pylab as plt%0Aimport qdo%0Aimport sys%0Aimport argparse%0A    %0Aparser = argparse.ArgumentParser()%0Aparser.add_argument('--wrap', action='store_true',%0A                    help='Wrap RA at 180 degrees?')%0Aparser.add_argument('args',nargs=argparse.REMAINDER)%0Aopt = parser.parse_args()%0Aargs = opt.args%0Aif len(args) != 1:%0A    print('Need one arg: qdo queue name')%0A    sys.exit(-1)%0A%0Aqname = args%5B0%5D%0A%0Aq = qdo.connect(qname, create_ok=False)%0Aprint('Connected to QDO queue', qname, q)%0A%0Aplt.clf()%0A%0Acmap = %7B qdo.Task.WAITING: 'k',%0A         qdo.Task.PENDING: '0.5',%0A         qdo.Task.RUNNING: 'b',%0A         qdo.Task.SUCCEEDED: 'g',%0A         qdo.Task.FAILED: 'r',%0A%7D%0A%0Alp,lt = %5B%5D,%5B%5D%0A%0Afor state in qdo.Task.VALID_STATES:%0A    print('State', state)%0A%0A    ra,dec = %5B%5D,%5B%5D%0A    tasks = q.tasks(state=state)%0A    print(len(tasks), 'tasks with state', state)%0A    %0A    for task in tasks:%0A        brick = task.task%0A        rastr = brick%5B:4%5D%0A        r = int(rastr, 10) / 10.%0A        decstr = brick%5B5:%5D%0A        d = int(decstr, 10) / 10.%0A        d *= (-1 if brick%5B4%5D == 'm' else 1)%0A        #print('Brick', brick, '-%3E', r, d)%0A        if opt.wrap:%0A            if r %3E 180:%0A                r -= 360.%0A        ra.append(r)%0A        dec.append(d)%0A%0A        %0A    p = plt.plot(ra, dec, '.', color=cmap.get(state, 'y'))%0A    lp.append(p%5B0%5D)%0A    lt.append(state)%0Aplt.legend(lp, lt)%0Aplt.savefig('status.png')%0A

add script to plot the RA,Dec distribution of qdo jobs