From 241e9f45edf77acf92b3e23671b9aa991aaf6484 Mon Sep 17 00:00:00 2001
From: Ken Rice <krice@freeswitch.org>
Date: Fri, 19 Jul 2013 17:06:17 -0500
Subject: [PATCH] Add to the MIB and small tweak to subagent.c

---
 src/mod/event_handlers/mod_snmp/FREESWITCH-MIB | 8 ++++++++
 src/mod/event_handlers/mod_snmp/subagent.c     | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/mod/event_handlers/mod_snmp/FREESWITCH-MIB b/src/mod/event_handlers/mod_snmp/FREESWITCH-MIB
index 8667b51d84..b68f3e537e 100644
--- a/src/mod/event_handlers/mod_snmp/FREESWITCH-MIB
+++ b/src/mod/event_handlers/mod_snmp/FREESWITCH-MIB
@@ -141,6 +141,14 @@ maxSessionsPerSecond OBJECT-TYPE
         "Maximum permissible sessions per second"
     ::= { systemStats 7 }
 
+peakSessionsPerSecond OBJECT-TYPE
+    SYNTAX      Gauge32
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+        "Maximum sessions per second"
+    ::= { systemStats 8 }
+
 
 ChannelEntry ::= SEQUENCE {
     chanIndex           Integer32,
diff --git a/src/mod/event_handlers/mod_snmp/subagent.c b/src/mod/event_handlers/mod_snmp/subagent.c
index 0a6771c137..179dda11e7 100644
--- a/src/mod/event_handlers/mod_snmp/subagent.c
+++ b/src/mod/event_handlers/mod_snmp/subagent.c
@@ -158,7 +158,7 @@ void init_subagent(switch_memory_pool_t *pool)
 	DEBUGMSGTL(("init_subagent", "mod_snmp subagent initializing\n"));
 
 	netsnmp_register_scalar_group(netsnmp_create_handler_registration("identity", handle_identity, identity_oid, OID_LENGTH(identity_oid), HANDLER_CAN_RONLY), 1, 2);
-	netsnmp_register_scalar_group(netsnmp_create_handler_registration("systemStats", handle_systemStats, systemStats_oid, OID_LENGTH(systemStats_oid), HANDLER_CAN_RONLY), 1, 7);
+	netsnmp_register_scalar_group(netsnmp_create_handler_registration("systemStats", handle_systemStats, systemStats_oid, OID_LENGTH(systemStats_oid), HANDLER_CAN_RONLY), 1, 8);
 
 	ch_table_info = switch_core_alloc(pool, sizeof(netsnmp_table_registration_info));
 	netsnmp_table_helper_add_indexes(ch_table_info, ASN_INTEGER, 0);