def read_metric(*args):
 ret = {}
 if _TRAFFICCTL:
  cmd = _traffic_ctl('metric', 'get')
 else:
  cmd = _traffic_line('-r')
 try:
  for arg in args:
   log.debug('Querying: %s', arg)
   ret[arg] = _subprocess('{0} {1}'.format(cmd, arg))
 except KeyError:
  pass
 return ret

def read_metric ( * args ) : ret = { } if _TRAFFICCTL : cmd = _traffic_ctl ( 'metric' , 'get' ) else : cmd = _traffic_line ( '-r' ) try : for arg in args : log . debug ( 'Querying: %s' , arg ) ret [ arg ] = _subprocess ( '{0} {1}' . format ( cmd , arg ) ) except KeyError : pass return ret
read traffic server one or more metrics .