Separate hardware monitor power and thermal senser data
The redfish thermal sensor data output clobbers the power sensor data. This update directs the thermal and power sensor readouts into two separate files so they are preserved for off box analysis and continued support for sensor_data product verification testing. Removed unused procedure that did not support two sensor data output files. Test Plan: PASS: Verify system install PASS: Verify power and sensor monitoring. PASS: Verify power fault insertion testing PASS: Verify thermal fault insertion testing Change-Id: Ie7717728944e93dd6fcc38a2c971189764276929 Story: 2005861 Task: 37203 Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
This commit is contained in:
parent
3252f33b65
commit
15c036f321
@ -98,6 +98,8 @@ typedef enum
|
||||
#define BMC_RESTART_CAUSE_FILE_SUFFIX ((const char *)("_restart_cause"))
|
||||
#define BMC_POWER_STATUS_FILE_SUFFIX ((const char *)("_power_status"))
|
||||
#define BMC_SENSOR_OUTPUT_FILE_SUFFIX ((const char *)("_sensor_data"))
|
||||
#define BMC_POWER_SENSOR_FILE_SUFFIX ((const char *)("_power_sensor_data"))
|
||||
#define BMC_THERMAL_SENSOR_FILE_SUFFIX ((const char *)("_thermal_sensor_data"))
|
||||
|
||||
#define BMC_POWER_ON_STATUS ((const char *)("on"))
|
||||
#define BMC_POWER_OFF_STATUS ((const char *)("off"))
|
||||
|
@ -2184,34 +2184,6 @@ void hwmonHostClass::modify_audit_interval ( string hostname , int interval )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* log sensor data to a tmp file to assis debug of sensor read issues */
|
||||
void hwmonHostClass::log_sensor_data ( struct hwmonHostClass::hwmon_host * host_ptr, string & sensorname, string from, string to )
|
||||
{
|
||||
string sensor_datafile = IPMITOOL_OUTPUT_DIR ;
|
||||
sensor_datafile.append(host_ptr->hostname);
|
||||
sensor_datafile.append(BMC_SENSOR_OUTPUT_FILE_SUFFIX);
|
||||
|
||||
string debugfile = "/tmp/" ;
|
||||
debugfile.append(host_ptr->hostname);
|
||||
debugfile.append(BMC_SENSOR_OUTPUT_FILE_SUFFIX);
|
||||
debugfile.append("_debug");
|
||||
|
||||
string source = pt() ;
|
||||
source.append (" - ");
|
||||
source.append (sensorname);
|
||||
source.append (" from '");
|
||||
source.append (from );
|
||||
source.append ("' to '");
|
||||
source.append (to );
|
||||
source.append ("'\n");
|
||||
daemon_log ( debugfile.data(), source.data());
|
||||
daemon_log ( debugfile.data(), host_ptr->bmc_thread_info.data.data());
|
||||
daemon_log ( debugfile.data(), daemon_read_file ( sensor_datafile.data()).data());
|
||||
daemon_log ( debugfile.data(), "---------------------------------------------------------------------\n");
|
||||
}
|
||||
|
||||
|
||||
void hwmonHostClass::print_node_info ( void )
|
||||
{
|
||||
fflush (stdout);
|
||||
|
@ -283,7 +283,6 @@ class hwmonHostClass
|
||||
/** handled deleting a host from the hwmonHostClass object */
|
||||
int delete_handler ( struct hwmonHostClass::hwmon_host * host_ptr );
|
||||
|
||||
void log_sensor_data ( struct hwmonHostClass::hwmon_host * host_ptr, string & sensorname, string data, string note);
|
||||
void mem_log_info ( struct hwmonHostClass::hwmon_host * host_ptr );
|
||||
void mem_log_options ( struct hwmonHostClass::hwmon_host * host_ptr );
|
||||
void mem_log_bm ( struct hwmonHostClass::hwmon_host * host_ptr );
|
||||
|
@ -1640,11 +1640,6 @@ int hwmonHostClass::bmc_sensor_monitor ( struct hwmonHostClass::hwmon_host * hos
|
||||
get_severity(ptr->severity).c_str(),
|
||||
ptr->status.c_str(),
|
||||
get_severity(severity).c_str());
|
||||
|
||||
/* debounce of the transient 'na' case is debounced
|
||||
* if ( host_ptr->sensor_query_count > 5 )
|
||||
* log_sensor_data ( host_ptr, ptr->sensorname, ptr->status, get_bmc_severity(ptr->sample_severity));
|
||||
*/
|
||||
}
|
||||
|
||||
blog1 ("%s %s curr:%s this:%s last:%s\n",
|
||||
|
@ -1205,7 +1205,7 @@ void * hwmonThread_redfish ( void * arg )
|
||||
{
|
||||
blog2_t ("%s read power sensors \n", info_ptr->log_prefix);
|
||||
if ( _redfishUtil_send_request( info_ptr, datafile,
|
||||
BMC_SENSOR_OUTPUT_FILE_SUFFIX,
|
||||
BMC_POWER_SENSOR_FILE_SUFFIX,
|
||||
REDFISHTOOL_READ_POWER_SENSORS_CMD ) == PASS )
|
||||
{
|
||||
/* look for the output data file */
|
||||
@ -1222,7 +1222,7 @@ void * hwmonThread_redfish ( void * arg )
|
||||
|
||||
blog2_t ("%s read thermal sensors \n", info_ptr->log_prefix);
|
||||
if (_redfishUtil_send_request( info_ptr, datafile,
|
||||
BMC_SENSOR_OUTPUT_FILE_SUFFIX,
|
||||
BMC_THERMAL_SENSOR_FILE_SUFFIX,
|
||||
REDFISHTOOL_READ_THERMAL_SENSORS_CMD ) == PASS )
|
||||
{
|
||||
/* look for the output data file */
|
||||
|
Loading…
Reference in New Issue
Block a user