net: select server statistics separately

This commit is contained in:
Thomas Schoebel-Theuer 2013-04-12 09:59:44 +02:00
parent 8af110184a
commit 6570a8ea59
3 changed files with 9 additions and 2 deletions

View File

@ -666,6 +666,9 @@ EXPORT_SYMBOL_GPL(server_brick_type);
// strategy layer // strategy layer
int server_show_statist = 0;
EXPORT_SYMBOL_GPL(server_show_statist);
static int _server_thread(void *data) static int _server_thread(void *data)
{ {
struct mars_global server_global = { struct mars_global server_global = {
@ -699,7 +702,8 @@ static int _server_thread(void *data)
server_global.global_version++; 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); 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); MARS_DBG("kill server bricks (when possible) = %d\n", status);

View File

@ -7,6 +7,8 @@
#include "mars_net.h" #include "mars_net.h"
#include "lib_limiter.h" #include "lib_limiter.h"
extern int server_show_statist;
extern struct mars_limiter server_limiter; extern struct mars_limiter server_limiter;
extern atomic_t server_handler_count; extern atomic_t server_handler_count;

View File

@ -203,7 +203,8 @@ ctl_table mars_table[] = {
INT_ENTRY("show_log_messages", brick_say_logging, 0600), INT_ENTRY("show_log_messages", brick_say_logging, 0600),
#ifdef CONFIG_MARS_DEBUG #ifdef CONFIG_MARS_DEBUG
INT_ENTRY("show_debug_messages", brick_say_debug, 0600), 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), INT_ENTRY("show_connections", global_show_connections, 0600),
#endif #endif
INT_ENTRY("logger_completion_semantics", trans_logger_completion_semantics, 0600), INT_ENTRY("logger_completion_semantics", trans_logger_completion_semantics, 0600),