Module: sip-router
Branch: master
Commit: 3bcff044593687f7f0e71cb7f084b071dd09bff0
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3bcff04…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Jul 18 08:54:56 2012 +0200
kamctl: stats command can print a single group of statistics
- groupid can be given as command parameter
---
utils/kamctl/kamctl | 6 +++++-
utils/kamctl/kamctl.ctlbase | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/utils/kamctl/kamctl b/utils/kamctl/kamctl
index 2cfb951..e0fb0e4 100755
--- a/utils/kamctl/kamctl
+++ b/utils/kamctl/kamctl
@@ -2548,7 +2548,11 @@ case $1 in
stats)
require_ctlengine
- $CTLCMD get_statistics all
+ if [ "$#" -eq 1 ] ; then
+ $CTLCMD get_statistics all
+ else
+ $CTLCMD get_statistics "${2}:"
+ fi
;;
restart)
diff --git a/utils/kamctl/kamctl.ctlbase b/utils/kamctl/kamctl.ctlbase
index 1148cbb..15abe46 100644
--- a/utils/kamctl/kamctl.ctlbase
+++ b/utils/kamctl/kamctl.ctlbase
@@ -93,7 +93,7 @@ EOF
mecho " -- command 'stats' - print internal statistics"
echo
cat <<EOF
- stats .............................. dump all internall statistics
+ stats [group]....................... dump all or a group of internall statistics
EOF
}
USAGE_FUNCTIONS="$USAGE_FUNCTIONS usage_ctlcommon"