diff --git a/conf/kni.conf b/conf/kni.conf index 781a35f..cd12202 100644 --- a/conf/kni.conf +++ b/conf/kni.conf @@ -30,9 +30,9 @@ listen_eth = eth0 listen_port = 2475 [watch_dog] +switch = 1 listen_eth = eth0 listen_port = 2476 -keepalive_switch = 1 keepalive_idle = 2 keepalive_intvl = 1 keepalive_cnt = 3 diff --git a/entry/src/tfe_mgr.cpp b/entry/src/tfe_mgr.cpp index 131ddce..1cb50c7 100644 --- a/entry/src/tfe_mgr.cpp +++ b/entry/src/tfe_mgr.cpp @@ -18,7 +18,7 @@ struct tfe_mgr{ int tfe_enabled_node_count; int tfe_alive_nodes[TFE_COUNT_MAX]; int tfe_alive_node_count; - int keepalive_switch; + int watch_dog_switch; void *logger; }; @@ -290,9 +290,9 @@ struct tfe_mgr* tfe_mgr_init(int tfe_node_count, const char* profile, void *logg int ret; //load keepalive conf char section[KNI_SYMBOL_MAX] = "watch_dog"; - MESA_load_profile_int_def(profile, section, "keepalive_switch", &(mgr->keepalive_switch), 0); - KNI_LOG_ERROR(logger, "MESA_prof_load, [%s]:\n keepalive_switch: %d", section, mgr->keepalive_switch); - if(mgr->keepalive_switch == 0){ + MESA_load_profile_int_def(profile, section, "switch", &(mgr->watch_dog_switch), 0); + KNI_LOG_ERROR(logger, "MESA_prof_load, [%s]:\n switch: %d", section, mgr->watch_dog_switch); + if(mgr->watch_dog_switch == 0){ return mgr; } int keepalive_idle, keepalive_cnt, keepalive_intvl; @@ -386,7 +386,7 @@ error_out: int tfe_mgr_alive_node_get(struct tfe_mgr *mgr, int thread_seq){ int tfe_id = -1; - if(mgr->keepalive_switch == 0){ + if(mgr->watch_dog_switch == 0){ if(mgr->tfe_enabled_node_count > 0){ int i = thread_seq % mgr->tfe_enabled_node_count; tfe_id = mgr->tfe_enabled_nodes[i].tfe_id;