diff --git a/mtce/src/common/nodeClass.cpp b/mtce/src/common/nodeClass.cpp index ae43fe64..e2f67473 100755 --- a/mtce/src/common/nodeClass.cpp +++ b/mtce/src/common/nodeClass.cpp @@ -7746,7 +7746,11 @@ int nodeLinkClass::mon_host ( const string & hostname, bool true_false, bool sen if ( true_false == true ) { - ilog ("%s heartbeat start", hostname.c_str()); + ilog ("%s %s heartbeat %sstart", + hostname.c_str(), + get_iface_name_str(iface), + node_ptr->monitor[iface] ? "re" : ""); + node_ptr->no_work_log_throttle = 0 ; node_ptr->b2b_misses_count[iface] = 0 ; node_ptr->hbs_misses_count[iface] = 0 ; @@ -7758,7 +7762,12 @@ int nodeLinkClass::mon_host ( const string & hostname, bool true_false, bool sen } else { - ilog ("%s heartbeat stop", hostname.c_str()); + if ( node_ptr->monitor[iface] == true ) + { + ilog ("%s %s heartbeat stop", + hostname.c_str(), + get_iface_name_str(iface)); + } } node_ptr->monitor[iface] = true_false ; } @@ -7771,7 +7780,7 @@ int nodeLinkClass::mon_host ( const string & hostname, bool true_false, bool sen void nodeLinkClass::set_hwmond_monitor_state ( string & hostname, bool state ) { if ( hostname.length() ) - { + { struct nodeLinkClass::node* node_ptr ; node_ptr = nodeLinkClass::getNode ( hostname ); if ( node_ptr != NULL ) diff --git a/mtce/src/heartbeat/hbsAgent.cpp b/mtce/src/heartbeat/hbsAgent.cpp index 4eec5a29..35c102a2 100644 --- a/mtce/src/heartbeat/hbsAgent.cpp +++ b/mtce/src/heartbeat/hbsAgent.cpp @@ -1381,6 +1381,7 @@ int daemon_init ( string iface, string nodetype ) hbs_ctrl.locked = true ; } + daemon_init_fit(); return (rc); } @@ -1817,6 +1818,10 @@ void daemon_service_run ( void ) inv.name = hbsInv.my_hostname ; inv.nodetype = CONTROLLER_TYPE ; hbsInv.add_heartbeat_host ( inv ); + + /* add this host to local inventory */ + hostname_inventory.push_front(hbsInv.my_hostname); + ilog ("%s added to inventory (self)", hbsInv.my_hostname.c_str()); } /* enable the base level signal handler latency monitor */ @@ -2074,6 +2079,7 @@ void daemon_service_run ( void ) inv.nodetype = msg.parm[0]; hbsInv.add_heartbeat_host ( inv ) ; hostname_inventory.push_back ( inv.name ); + hostname_inventory.unique(); // avoid duplicates ilog ("%s added to heartbeat service (%d)\n", inv.name.c_str(), inv.nodetype);