Point was that 
kamctl rpc stats.fetch usrloc
or
kamctl rpc stats.fetch shmem

both return

{
 "jsonrpc":  "2.0",
 "error":  {
   "code": 500,
   "message":  "Method Not Found"
 },
 "id": 29575
}

shmem was the specific example given by Daniel Constantin Mierla so I'm not sure why its not working. I ended up using "kamcmd stats.get_statistics all" and parsing the raw text returned there. 


On Mon, Aug 6, 2018 at 2:53 PM, Henning Westerholt <hw@kamailio.org> wrote:
Am Montag, 6. August 2018, 19:23:33 CEST schrieb Daniel Greenwald:
> Looking to get usrloc stats in pure json format.
>
> When trying to run from the example above:
>
>  kamctl rpc stats.fetch shmem:
>
> I get a message of Method Not Found
>
>
> Was this command not released, or is there another way to do this?
> [..]

Hello,

probably a stupid question, but do you tried to execute the command with ":"
at the end? Do you get a result with kamctl rpc stats.fetch shmem?

And why are you looking into the shmem stats for usrloc statistics?

Best regards,

Henning

--
Henning Westerholt
https://skalatan.de/blog/