diff --git a/kernel/mars_server.c b/kernel/mars_server.c index 5ca7206f..3c06f15a 100644 --- a/kernel/mars_server.c +++ b/kernel/mars_server.c @@ -666,6 +666,9 @@ EXPORT_SYMBOL_GPL(server_brick_type); // strategy layer +int server_show_statist = 0; +EXPORT_SYMBOL_GPL(server_show_statist); + static int _server_thread(void *data) { struct mars_global server_global = { @@ -699,7 +702,8 @@ static int _server_thread(void *data) server_global.global_version++; - show_statistics(&server_global, "server"); + if (server_show_statist) + show_statistics(&server_global, "server"); status = mars_kill_brick_when_possible(&server_global, &server_global.brick_anchor, false, (void*)&server_brick_type, false); MARS_DBG("kill server bricks (when possible) = %d\n", status); diff --git a/kernel/mars_server.h b/kernel/mars_server.h index 4b8b0554..afce35e4 100644 --- a/kernel/mars_server.h +++ b/kernel/mars_server.h @@ -7,6 +7,8 @@ #include "mars_net.h" #include "lib_limiter.h" +extern int server_show_statist; + extern struct mars_limiter server_limiter; extern atomic_t server_handler_count; diff --git a/kernel/sy_old/mars_proc.c b/kernel/sy_old/mars_proc.c index 1c2729ee..d126fd51 100644 --- a/kernel/sy_old/mars_proc.c +++ b/kernel/sy_old/mars_proc.c @@ -203,7 +203,8 @@ ctl_table mars_table[] = { INT_ENTRY("show_log_messages", brick_say_logging, 0600), #ifdef CONFIG_MARS_DEBUG INT_ENTRY("show_debug_messages", brick_say_debug, 0600), - INT_ENTRY("show_statistics", global_show_statist, 0600), + INT_ENTRY("show_statistics_global", global_show_statist, 0600), + INT_ENTRY("show_statistics_server", server_show_statist, 0600), INT_ENTRY("show_connections", global_show_connections, 0600), #endif INT_ENTRY("logger_completion_semantics", trans_logger_completion_semantics, 0600),