peak sessions step 1

This commit is contained in:
Ken Rice
2013-07-20 15:00:06 -05:00
parent f08c3309f6
commit 7fb4369932
8 changed files with 52 additions and 3 deletions

View File

@@ -91,6 +91,8 @@ static void send_heartbeat(void)
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Session-Per-Sec-Max", "%u", runtime.sps_peak);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Session-Per-Sec-FiveMin", "%u", runtime.sps_peak_fivemin);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Session-Since-Startup", "%" SWITCH_SIZE_T_FMT, switch_core_session_id() - 1);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Session-Peak-Max", "%u", runtime.sessions_peak);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Session-Peak-FiveMin", "%u", runtime.sessions_peak_fivemin);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Idle-CPU", "%f", switch_core_idle_cpu());
switch_event_fire(&event);
}
@@ -2488,6 +2490,12 @@ SWITCH_DECLARE(int32_t) switch_core_session_ctl(switch_session_ctl_t cmd, void *
case SCSC_SPS_PEAK_FIVEMIN:
newintval = runtime.sps_peak_fivemin;
break;
case SCSC_SESSIONS_PEAK:
newintval = runtime.sessions_peak;
break;
case SCSC_SESSIONS_PEAK_FIVEMIN:
newintval = runtime.sessions_peak_fivemin;
break;
case SCSC_MAX_DTMF_DURATION:
newintval = switch_core_max_dtmf_duration(oldintval);
break;