On 13.07.2009 19:51 Uhr, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
here is what mi_rpc modules does:
- it receives a rpc handler form the rpc interface in core
- reads first parameter and then lookups MI command, if not found then
returns error, if found:
- reads all parameters as string and build internal MI tree
ok, after andrei fixed some bug, i got stats working via mi_rpc and
xmlrpc module interface.
all stats except "tm:", which is now implemented using tm.stats command.
MI tm stats are exported natively via tmx module.
Cheers,
Daniel
res = c.tm.stats()
provides this kind of result:
{'2xx': 0, 'created': 0, '5xx': 0, 'delayed_free': 0,
'current': 0, 'total_local': 0, 'waiting': 0, '6xx': 0,
'4xx': 0, '3xx': 0, 'total': 0, 'replied_locally': 0,
'freed': 0}
whereas mi based stat results look like this:
['200 OK\n', '+ :: core:rcv_requests = 3', '+ :: core:rcv_replies =
0', '+ :: core:fwd_requests = 0', '+ :: core:fwd_replies = 0', '+
:: core:drop_requests = 0', '+ :: core:drop_replies = 0', '+ ::
core:err_requests = 0', '+ :: core:err_replies = 0', '+ ::
core:bad_URIs_rcvd = 0', '+ :: core:unsupported_methods = 3', '+ ::
core:bad_msg_hdr = 0']
would it be possible to get the result in same (preferable the former)
format in both cases?
-- juha