[Core, mod_commands] Add switch_core_pool_stats API and pool_stats command with corresponding --enable-pool-debug configure flag.

This commit is contained in:
Andrey Volk committed 2019-12-31 02:07:22 +04:00
1 parent f664600df4
commit da31fac5a0
6 files changed
+85 -2

No files matched your search

@@ -685,6 +685,12 @@ end:
return SWITCH_STATUS_SUCCESS;
}
SWITCH_STANDARD_API(pool_stats_function)
{
switch_core_pool_stats(stream);
return SWITCH_STATUS_SUCCESS;
}
SWITCH_STANDARD_API(db_cache_function)
{
int argc;
@@ -7502,6 +7508,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_commands_load)
SWITCH_ADD_API(commands_api_interface, "nat_map", "Manage NAT", nat_map_function, "[status|republish|reinit] | [add|del] <port> [tcp|udp] [static]");
SWITCH_ADD_API(commands_api_interface, "originate", "Originate a call", originate_function, ORIGINATE_SYNTAX);
SWITCH_ADD_API(commands_api_interface, "pause", "Pause media on a channel", pause_function, PAUSE_SYNTAX);
SWITCH_ADD_API(commands_api_interface, "pool_stats", "Core pool memory usage", pool_stats_function, "Core pool memory usage.");
SWITCH_ADD_API(commands_api_interface, "quote_shell_arg", "Quote/escape a string for use on shell command line", quote_shell_arg_function, "<data>");
SWITCH_ADD_API(commands_api_interface, "regex", "Evaluate a regex", regex_function, "<data>|<pattern>[|<subst string>][n|b]");
SWITCH_ADD_API(commands_api_interface, "reloadacl", "Reload XML", reload_acl_function, "");