提交 a8efae99 authored 作者: Daniel Swarbrick's avatar Daniel Swarbrick

Add FreeSWITCH-Version string and Uptime-msec (uptime in *milliseconds*) to heartbeat events

上级 a06eb2db
......@@ -82,6 +82,8 @@ static void send_heartbeat(void)
duration.sec, duration.sec == 1 ? "" : "s",
duration.ms, duration.ms == 1 ? "" : "s", duration.mms, duration.mms == 1 ? "" : "s");
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "FreeSWITCH-Version", SWITCH_VERSION_FULL);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Uptime-msec", "%lu", switch_core_uptime() / 1000);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Session-Count", "%u", switch_core_session_count());
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Max-Sessions", "%u", switch_core_session_limit(0));
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Session-Per-Sec", "%u", runtime.sps);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论