diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-07 16:11:05 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-07 16:11:05 +0000 |
commit | 20476ae5226b3e4ed4f64bb57d51d7f42eff0ffe (patch) | |
tree | a4fa144f2008bf16fa24587b437b590a946b4b54 /res/snmp/agent.c | |
parent | 2db1dbb003cf4f282284b8f40dce046f545fce1e (diff) |
Add count of total number of calls processed by asterisk during it's lifetime.
Add number of total calls and current calls to SNMP.
Closes issue #10057, patch by jcmoore.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91779 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/snmp/agent.c')
-rw-r--r-- | res/snmp/agent.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/res/snmp/agent.c b/res/snmp/agent.c index b728c55a9..88d703dff 100644 --- a/res/snmp/agent.c +++ b/res/snmp/agent.c @@ -67,6 +67,8 @@ static oid asterisk_oid[] = { 1, 3, 6, 1, 4, 1, 22736, 1 }; #define ASTCONFRELOADTIME 2 #define ASTCONFPID 3 #define ASTCONFSOCKET 4 +#define ASTCONFACTIVECALLS 5 +#define ASTCONFPROCESSEDCALLS 6 #define ASTMODULES 3 #define ASTMODCOUNT 1 @@ -592,6 +594,12 @@ static u_char *ast_var_Config(struct variable *vp, oid *name, size_t *length, case ASTCONFSOCKET: *var_len = strlen(ast_config_AST_SOCKET); return (u_char *)ast_config_AST_SOCKET; + case ASTCONFACTIVECALLS: + long_ret = ast_active_calls(); + return (u_char *)&long_ret; + case ASTCONFPROCESSEDCALLS: + long_ret = ast_processed_calls(); + return (u_char *)&long_ret; default: break; } @@ -723,6 +731,8 @@ static void init_asterisk_mib(void) {ASTCONFRELOADTIME, ASN_TIMETICKS, RONLY, ast_var_Config, 2, {ASTCONFIGURATION, ASTCONFRELOADTIME}}, {ASTCONFPID, ASN_INTEGER, RONLY, ast_var_Config, 2, {ASTCONFIGURATION, ASTCONFPID}}, {ASTCONFSOCKET, ASN_OCTET_STR, RONLY, ast_var_Config, 2, {ASTCONFIGURATION, ASTCONFSOCKET}}, + {ASTCONFACTIVECALLS, ASN_GAUGE, RONLY, ast_var_Config, 2, {ASTCONFIGURATION, ASTCONFACTIVECALLS}}, + {ASTCONFPROCESSEDCALLS, ASN_INTEGER, RONLY, ast_var_Config, 2, {ASTCONFIGURATION, ASTCONFPROCESSEDCALLS}}, {ASTMODCOUNT, ASN_INTEGER, RONLY, ast_var_Modules , 2, {ASTMODULES, ASTMODCOUNT}}, {ASTINDCOUNT, ASN_INTEGER, RONLY, ast_var_indications, 2, {ASTINDICATIONS, ASTINDCOUNT}}, {ASTINDCURRENT, ASN_OCTET_STR, RONLY, ast_var_indications, 2, {ASTINDICATIONS, ASTINDCURRENT}}, |