Skip to content

Commit

Permalink
kamctl: implemented moni command for jsonrpc engine
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Dec 2, 2016
1 parent 3b8d795 commit e8086c7
Showing 1 changed file with 33 additions and 17 deletions.
50 changes: 33 additions & 17 deletions utils/kamctl/kamctl.rpcfifo
Expand Up @@ -204,49 +204,65 @@ rpc_kamailio_monitor() {

cat < $path | filter_fl &
cat > $RPCFIFOPATH <<EOF
:version:$name

{
"jsonrpc": "2.0",
"method": "core.version",
"reply_name": "${name}",
"id": $$
}
EOF
wait

cat < $path | filter_fl &
cat > $RPCFIFOPATH << EOF
:uptime:$name

{
"jsonrpc": "2.0",
"method": "core.uptime",
"reply_name": "${name}",
"id": $$
}
EOF
wait
echo

mecho "Transaction Statistics: "
cat < $path | filter_fl &
cat > $RPCFIFOPATH <<EOF
:get_statistics:$name
UAS_transactions
UAC_transactions
inuse_transactions

{
"jsonrpc": "2.0",
"method": "stats.get_statistics",
"params": [ "UAS_transactions", "UAC_transactions", "inuse_transactions"],
"reply_name": "${name}",
"id": $$
}
EOF
wait
echo

mecho "Stateless Server Statistics: "
cat < $path | filter_fl &
cat > $RPCFIFOPATH <<EOF
:get_statistics:$name
sent_replies
sent_err_replies
received_ACKs

{
"jsonrpc": "2.0",
"method": "stats.get_statistics",
"params": [ "sent_replies", "sent_err_replies", "received_ACKs"],
"reply_name": "${name}",
"id": $$
}
EOF
wait
echo

mecho "UsrLoc Stats: "
cat < $path | filter_fl &
cat > $RPCFIFOPATH <<EOF
:get_statistics:$name
usrloc:

{
"jsonrpc": "2.0",
"method": "stats.get_statistics",
"params": [ "usrloc:"],
"reply_name": "${name}",
"id": $$
}
EOF
wait

Expand Down

0 comments on commit e8086c7

Please sign in to comment.