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
int server_show_statist = 0;
EXPORT_SYMBOL_GPL(server_show_statist);
static int _server_thread(void *data)
{
struct mars_global server_global = {
@ -699,6 +702,7 @@ static int _server_thread(void *data)
server_global.global_version++;
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);

View File

@ -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;

View File

@ -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),