You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sems/apps/monitoring/tools/sems-list-calls

23 lines
544 B

#!/usr/bin/python
# -*- coding: utf-8 -*-
from xmlrpclib import *
import pprint
import sys
if len(sys.argv) == 2 and sys.argv[1] == '--help':
print "usage: %s [--full]" % sys.argv[0]
sys.exit(1)
s = ServerProxy('http://localhost:8090')
print "Active calls: %d" % s.calls()
ids = s.di('monitoring','list')
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(ids)
if len(sys.argv) == 2 and sys.argv[1] == '--full':
for callid in ids:
attrs = s.di('monitoring','get', callid)
print '----- %s -----' % callid
pp.pprint(attrs)