diff --git a/meta-celestica/meta-as58xx-cl/recipes-core/fan-ctrl/fan-ctrl/fand32_v2.cpp b/meta-celestica/meta-as58xx-cl/recipes-core/fan-ctrl/fan-ctrl/fand32_v2.cpp index e09297f4df0c..8f270670413d 100755 --- a/meta-celestica/meta-as58xx-cl/recipes-core/fan-ctrl/fan-ctrl/fand32_v2.cpp +++ b/meta-celestica/meta-as58xx-cl/recipes-core/fan-ctrl/fan-ctrl/fand32_v2.cpp @@ -1871,7 +1871,7 @@ int fan_speed_okay(const int fan, int speed, const int slop) syslog(LOG_WARNING, "%s-1 speed %d, less than %d%% of max speed(%d) detected", fantray->name, front_speed, 100 - slop, speed); if(fan_info->front_failed == FAN_FAIL_COUNT) - syslog(LOG_ERR, "%s-1 status is ABNORMAL, speed is set to 100% but real speed is lower than 70% of max speed", + syslog(LOG_ERR, "%s-1 status is ABNORMAL, speed is set to 100%% but real speed is lower than 70%% of max speed", fantray->name); if(fan_info->front_failed > FAN_FAIL_COUNT) fan_info->front_failed = FAN_FAIL_COUNT; @@ -1906,7 +1906,7 @@ int fan_speed_okay(const int fan, int speed, const int slop) syslog(LOG_WARNING, "%s-2 speed %d, less than %d%% of max speed(%d) detected", fantray->name, rear_speed, 100 - slop, speed); if(fan_info->rear_failed == FAN_FAIL_COUNT) - syslog(LOG_ERR, "%s-2 status is ABNORMAL, speed is set to 100% but real speed is lower than 70% of max speed", + syslog(LOG_ERR, "%s-2 status is ABNORMAL, speed is set to 100%% but real speed is lower than 70%% of max speed", fantray->name); if(fan_info->rear_failed > FAN_FAIL_COUNT) fan_info->rear_failed = FAN_FAIL_COUNT; @@ -1984,7 +1984,7 @@ int psu_speed_okay(const int fan, int speed, const int slop) syslog(LOG_WARNING, "%s speed %d, less than %d%% of max speed(%d) detected", fantray->name, psu_speed, 100 - slop, speed); if(fan_info->front_failed == FAN_FAIL_COUNT) - syslog(LOG_ERR, "%s status is ABNORMAL, speed is set to 100% but real speed is lower than 70% of max speed", + syslog(LOG_ERR, "%s status is ABNORMAL, speed is set to 100%% but real speed is lower than 70%% of max speed", fantray->name); if(fan_info->front_failed > FAN_FAIL_COUNT) fan_info->front_failed = FAN_FAIL_COUNT; @@ -2127,11 +2127,11 @@ static int get_fan_direction(int direction) if(pn = find_sub_string(buffer, FAN_DIR_F2B_STR, sizeof(buffer))) { f2r_fan_cnt++; if(fantray->direction == FAN_DIR_FAULT) { + syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); if(fantray->eeprom_fail) { - syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); - fantray->eeprom_fail = 0; - } else syslog(LOG_WARNING, "%s model match, part number is %s", fantray->name, FAN_DIR_F2B_STR); + fantray->eeprom_fail = 0; + } } fantray->direction = FAN_DIR_F2B; if(direction != fantray->direction) @@ -2141,11 +2141,11 @@ static int get_fan_direction(int direction) } else if(find_sub_string(buffer, FAN_DIR_B2F_STR, sizeof(buffer))) { r2f_fan_cnt++; if(fantray->direction == FAN_DIR_FAULT) { + syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); if(fantray->eeprom_fail) { - syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); - fantray->eeprom_fail = 0; - } else syslog(LOG_WARNING, "%s model match, part number is %s", fantray->name, FAN_DIR_B2F_STR); + fantray->eeprom_fail = 0; + } } fantray->direction = FAN_DIR_B2F; if(direction != fantray->direction) @@ -2155,21 +2155,20 @@ static int get_fan_direction(int direction) } else { fantray->direction = FAN_DIR_FAULT; if(ret > 0) { - fantray->eeprom_fail = 0; + fantray->eeprom_fail = 1; syslog(LOG_CRIT, "%s model mismatch, part number is %s", fantray->name, pn); } else { - fantray->eeprom_fail = 1; syslog(LOG_WARNING, "%s eeprom is ABNORMAL, read %s eeprom failed", fantray->name, fantray->name); } } } else { if(pn = find_sub_string(buffer, DELTA_PSU_DIR_F2B_STR, sizeof(buffer))) { if(fantray->direction == FAN_DIR_FAULT) { + syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); if(fantray->eeprom_fail) { - syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); - fantray->eeprom_fail = 0; - } else syslog(LOG_WARNING, "%s model match, part number is %s", fantray->name, DELTA_PSU_DIR_F2B_STR); + fantray->eeprom_fail = 0; + } } fantray->direction = FAN_DIR_F2B; if(direction != fantray->direction) @@ -2178,11 +2177,11 @@ static int get_fan_direction(int direction) syslog(LOG_WARNING, "%s airflow direction match, direction is F2B, system direction is F2B", fantray->name); } else if(find_sub_string(buffer, DELTA_PSU_DIR_B2F_STR, sizeof(buffer))) { if(fantray->direction == FAN_DIR_FAULT) { + syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); if(fantray->eeprom_fail) { - syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); - fantray->eeprom_fail = 0; - } else syslog(LOG_WARNING, "%s model match, part number is %s", fantray->name, DELTA_PSU_DIR_B2F_STR); + fantray->eeprom_fail = 0; + } } fantray->direction = FAN_DIR_B2F; if(direction != fantray->direction) @@ -2191,11 +2190,11 @@ static int get_fan_direction(int direction) syslog(LOG_WARNING, "%s airflow direction match, direction is B2F, system direction is B2F", fantray->name); } else if(find_sub_string(buffer, ACBEL_PSU_DIR_F2B_STR, sizeof(buffer))) { if(fantray->direction == FAN_DIR_FAULT) { + syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); if(fantray->eeprom_fail) { - syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); - fantray->eeprom_fail = 0; - } else syslog(LOG_WARNING, "%s model match, part number is %s", fantray->name, ACBEL_PSU_DIR_F2B_STR); + fantray->eeprom_fail = 0; + } } fantray->direction = FAN_DIR_F2B; if(direction != fantray->direction) @@ -2204,11 +2203,11 @@ static int get_fan_direction(int direction) syslog(LOG_WARNING, "%s airflow direction match, direction is F2B, system direction is F2B", fantray->name); } else if(find_sub_string(buffer, ACBEL_PSU_DIR_B2F_STR, sizeof(buffer))) { if(fantray->direction == FAN_DIR_FAULT) { + syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); if(fantray->eeprom_fail) { - syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); - fantray->eeprom_fail = 0; - } else syslog(LOG_WARNING, "%s model match, part number is %s", fantray->name, ACBEL_PSU_DIR_B2F_STR); + fantray->eeprom_fail = 0; + } } fantray->direction = FAN_DIR_B2F; if(direction != fantray->direction) @@ -2218,10 +2217,9 @@ static int get_fan_direction(int direction) } else { fantray->direction = FAN_DIR_FAULT; if(ret > 0) { - fantray->eeprom_fail = 0; + fantray->eeprom_fail = 1; syslog(LOG_CRIT, "%s model mismatch, part number is %s", fantray->name, pn); } else { - fantray->eeprom_fail = 1; syslog(LOG_WARNING, "%s eeprom is ABNORMAL, read %s eeprom failed", fantray->name, fantray->name); } } diff --git a/meta-celestica/meta-as58xx-cl/recipes-core/fan-ctrl/fan-ctrl/fand_phalanx.cpp b/meta-celestica/meta-as58xx-cl/recipes-core/fan-ctrl/fan-ctrl/fand_phalanx.cpp index 10c565cd1168..9eb9b418ae33 100755 --- a/meta-celestica/meta-as58xx-cl/recipes-core/fan-ctrl/fan-ctrl/fand_phalanx.cpp +++ b/meta-celestica/meta-as58xx-cl/recipes-core/fan-ctrl/fan-ctrl/fand_phalanx.cpp @@ -712,7 +712,7 @@ static struct fantray_info_stu_sysfs fantray_info[] = { .fan1 = fan1_info, }, { - .name = "PSU 1-1", + .name = "PSU 1", .present = 1, .read_eeprom = 1, .status = 1, @@ -722,7 +722,7 @@ static struct fantray_info_stu_sysfs fantray_info[] = { .fan1 = psu1_fan_info, }, { - .name = "PSU 1-2", + .name = "PSU 2", .present = 1, .read_eeprom = 1, .status = 1, @@ -732,7 +732,7 @@ static struct fantray_info_stu_sysfs fantray_info[] = { .fan1 = psu2_fan_info, }, { - .name = "PSU 2-1", + .name = "PSU 3", .present = 1, .read_eeprom = 1, .status = 1, @@ -742,7 +742,7 @@ static struct fantray_info_stu_sysfs fantray_info[] = { .fan1 = psu3_fan_info, }, { - .name = "PSU 2-2", + .name = "PSU 4", .present = 1, .read_eeprom = 1, .status = 1, @@ -2031,7 +2031,7 @@ int fan_speed_okay(const int fan, int speed, const int slop) syslog(LOG_WARNING, "%s-1 speed %d, less than %d%% of max speed(%d) detected", fantray->name, front_speed, 100 - slop, speed); if(fan_info->front_failed == FAN_FAIL_COUNT) - syslog(LOG_ERR, "%s-1 status is ABNORMAL, speed is set to 100% but real speed is lower than 70% of max speed", + syslog(LOG_ERR, "%s-1 status is ABNORMAL, speed is set to 100%% but real speed is lower than 70%% of max speed", fantray->name); if(fan_info->front_failed > FAN_FAIL_COUNT) fan_info->front_failed = FAN_FAIL_COUNT; @@ -2072,7 +2072,7 @@ int fan_speed_okay(const int fan, int speed, const int slop) syslog(LOG_WARNING, "%s-2 speed %d, less than %d%% of max speed(%d) detected", fantray->name, rear_speed, 100 - slop, speed); if(fan_info->rear_failed == FAN_FAIL_COUNT) - syslog(LOG_ERR, "%s-2 status is ABNORMAL, speed is set to 100% but real speed is lower than 70% of max speed", + syslog(LOG_ERR, "%s-2 status is ABNORMAL, speed is set to 100%% but real speed is lower than 70%% of max speed", fantray->name); if(fan_info->rear_failed > FAN_FAIL_COUNT) fan_info->rear_failed = FAN_FAIL_COUNT; @@ -2156,7 +2156,7 @@ int psu_speed_okay(const int fan, int speed, const int slop) syslog(LOG_WARNING, "%s speed %d, less than %d%% of max speed(%d) detected", fantray->name, psu_speed, 100 - slop, speed); if(fan_info->front_failed == FAN_FAIL_COUNT) - syslog(LOG_ERR, "%s status is ABNORMAL, speed is set to 100% but real speed is lower than 70% of max speed", + syslog(LOG_ERR, "%s status is ABNORMAL, speed is set to 100%% but real speed is lower than 70%% of max speed", fantray->name); if(fan_info->front_failed > FAN_FAIL_COUNT) fan_info->front_failed = FAN_FAIL_COUNT; @@ -2312,11 +2312,11 @@ static int get_fan_direction(int direction) if(pn = find_sub_string(buffer, FAN_DIR_F2B_STR, sizeof(buffer))) { f2r_fan_cnt++; if(fantray->direction == FAN_DIR_FAULT) { + syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); if(fantray->eeprom_fail) { - syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); - fantray->eeprom_fail = 0; - } else syslog(LOG_WARNING, "%s model match, part number is %s", fantray->name, FAN_DIR_F2B_STR); + fantray->eeprom_fail = 0; + } } fantray->direction = FAN_DIR_F2B; if(direction != fantray->direction) @@ -2332,21 +2332,20 @@ static int get_fan_direction(int direction) } */else { fantray->direction = FAN_DIR_FAULT; if(ret > 0) { - fantray->eeprom_fail = 0; + fantray->eeprom_fail = 1; syslog(LOG_CRIT, "%s model mismatch, part number is %s", fantray->name, pn); } else { - fantray->eeprom_fail = 1; syslog(LOG_WARNING, "%s eeprom is ABNORMAL, read %s eeprom failed", fantray->name, fantray->name); } } } else { if(pn = find_sub_string(buffer, DELTA_PSU_DIR_F2B_STR, sizeof(buffer))) { if(fantray->direction == FAN_DIR_FAULT) { + syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); if(fantray->eeprom_fail) { - syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); - fantray->eeprom_fail = 0; - } else syslog(LOG_WARNING, "%s model match, part number is %s", fantray->name, DELTA_PSU_DIR_F2B_STR); + fantray->eeprom_fail = 0; + } } fantray->direction = FAN_DIR_F2B; if(direction != fantray->direction) @@ -2355,11 +2354,11 @@ static int get_fan_direction(int direction) syslog(LOG_WARNING, "%s airflow direction match, direction is F2B, system direction is F2B", fantray->name); } else if(find_sub_string(buffer, DELTA_PSU_DIR_B2F_STR, sizeof(buffer))) { if(fantray->direction == FAN_DIR_FAULT) { + syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); if(fantray->eeprom_fail) { - syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); - fantray->eeprom_fail = 0; - } else syslog(LOG_WARNING, "%s model match, part number is %s", fantray->name, DELTA_PSU_DIR_B2F_STR); + fantray->eeprom_fail = 0; + } } fantray->direction = FAN_DIR_B2F; if(direction != fantray->direction) @@ -2368,11 +2367,11 @@ static int get_fan_direction(int direction) syslog(LOG_WARNING, "%s airflow direction match, direction is B2F, system direction is B2F", fantray->name); } else if(find_sub_string(buffer, ACBEL_PSU_DIR_F2B_STR, sizeof(buffer))) { if(fantray->direction == FAN_DIR_FAULT) { + syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); if(fantray->eeprom_fail) { - syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); - fantray->eeprom_fail = 0; - } else syslog(LOG_WARNING, "%s model match, part number is %s", fantray->name, ACBEL_PSU_DIR_F2B_STR); + fantray->eeprom_fail = 0; + } } fantray->direction = FAN_DIR_F2B; if(direction != fantray->direction) @@ -2381,11 +2380,11 @@ static int get_fan_direction(int direction) syslog(LOG_WARNING, "%s airflow direction match, direction is F2B, system direction is F2B", fantray->name); } else if(find_sub_string(buffer, ACBEL_PSU_DIR_B2F_STR, sizeof(buffer))) { if(fantray->direction == FAN_DIR_FAULT) { + syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); if(fantray->eeprom_fail) { - syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); - fantray->eeprom_fail = 0; - } else syslog(LOG_WARNING, "%s model match, part number is %s", fantray->name, ACBEL_PSU_DIR_B2F_STR); + fantray->eeprom_fail = 0; + } } fantray->direction = FAN_DIR_B2F; if(direction != fantray->direction) @@ -2395,10 +2394,9 @@ static int get_fan_direction(int direction) } else { fantray->direction = FAN_DIR_FAULT; if(ret > 0) { - fantray->eeprom_fail = 0; + fantray->eeprom_fail = 1; syslog(LOG_CRIT, "%s model mismatch, part number is %s", fantray->name, pn); } else { - fantray->eeprom_fail = 1; syslog(LOG_WARNING, "%s eeprom is ABNORMAL, read %s eeprom failed", fantray->name, fantray->name); } } @@ -2606,10 +2604,10 @@ void fand_interrupt(int sig) } const char *psu_name[TOTAL_PSUS] = { - "PSU 1-1", - "PSU 1-2", - "PSU 2-1", - "PSU 2-2", + "PSU 1", + "PSU 2", + "PSU 3", + "PSU 4", }; int main(int argc, char **argv) { int critical_temp; diff --git a/meta-celestica/meta-as58xx-cl/recipes-core/fan-ctrl/fan-ctrl/fand_v2.cpp b/meta-celestica/meta-as58xx-cl/recipes-core/fan-ctrl/fan-ctrl/fand_v2.cpp index 9039bb3cd0b8..9d2999439a56 100755 --- a/meta-celestica/meta-as58xx-cl/recipes-core/fan-ctrl/fan-ctrl/fand_v2.cpp +++ b/meta-celestica/meta-as58xx-cl/recipes-core/fan-ctrl/fan-ctrl/fand_v2.cpp @@ -1867,7 +1867,7 @@ int fan_speed_okay(const int fan, int speed, const int slop) syslog(LOG_WARNING, "%s-1 speed %d, less than %d%% of max speed(%d) detected", fantray->name, front_speed, 100 - slop, speed); if(fan_info->front_failed == FAN_FAIL_COUNT) - syslog(LOG_ERR, "%s-1 status is ABNORMAL, speed is set to 100% but real speed is lower than 70% of max speed", + syslog(LOG_ERR, "%s-1 status is ABNORMAL, speed is set to 100%% but real speed is lower than 70%% of max speed", fantray->name); if(fan_info->front_failed > FAN_FAIL_COUNT) fan_info->front_failed = FAN_FAIL_COUNT; @@ -1902,7 +1902,7 @@ int fan_speed_okay(const int fan, int speed, const int slop) syslog(LOG_WARNING, "%s-2 speed %d, less than %d%% of max speed(%d) detected", fantray->name, rear_speed, 100 - slop, speed); if(fan_info->rear_failed == FAN_FAIL_COUNT) - syslog(LOG_ERR, "%s-2 status is ABNORMAL, speed is set to 100% but real speed is lower than 70% of max speed", + syslog(LOG_ERR, "%s-2 status is ABNORMAL, speed is set to 100%% but real speed is lower than 70%% of max speed", fantray->name); if(fan_info->rear_failed > FAN_FAIL_COUNT) fan_info->rear_failed = FAN_FAIL_COUNT; @@ -1980,7 +1980,7 @@ int psu_speed_okay(const int fan, int speed, const int slop) syslog(LOG_WARNING, "%s speed %d, less than %d%% of max speed(%d) detected", fantray->name, psu_speed, 100 - slop, speed); if(fan_info->front_failed == FAN_FAIL_COUNT) - syslog(LOG_ERR, "%s status is ABNORMAL, speed is set to 100% but real speed is lower than 70% of max speed", + syslog(LOG_ERR, "%s status is ABNORMAL, speed is set to 100%% but real speed is lower than 70%% of max speed", fantray->name); if(fan_info->front_failed > FAN_FAIL_COUNT) fan_info->front_failed = FAN_FAIL_COUNT; @@ -2123,11 +2123,11 @@ static int get_fan_direction(int direction) if(pn = find_sub_string(buffer, FAN_DIR_F2B_STR, sizeof(buffer))) { f2r_fan_cnt++; if(fantray->direction == FAN_DIR_FAULT) { + syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); if(fantray->eeprom_fail) { - syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); - fantray->eeprom_fail = 0; - } else syslog(LOG_WARNING, "%s model match, part number is %s", fantray->name, FAN_DIR_F2B_STR); + fantray->eeprom_fail = 0; + } } fantray->direction = FAN_DIR_F2B; if(direction != fantray->direction) @@ -2137,11 +2137,11 @@ static int get_fan_direction(int direction) } else if(find_sub_string(buffer, FAN_DIR_B2F_STR, sizeof(buffer))) { r2f_fan_cnt++; if(fantray->direction == FAN_DIR_FAULT) { + syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); if(fantray->eeprom_fail) { - syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); - fantray->eeprom_fail = 0; - } else syslog(LOG_WARNING, "%s model match, part number is %s", fantray->name, FAN_DIR_B2F_STR); + fantray->eeprom_fail = 0; + } } fantray->direction = FAN_DIR_B2F; if(direction != fantray->direction) @@ -2151,21 +2151,20 @@ static int get_fan_direction(int direction) } else { fantray->direction = FAN_DIR_FAULT; if(ret > 0) { - fantray->eeprom_fail = 0; + fantray->eeprom_fail = 1; syslog(LOG_CRIT, "%s model mismatch, part number is %s", fantray->name, pn); } else { - fantray->eeprom_fail = 1; syslog(LOG_WARNING, "%s eeprom is ABNORMAL, read %s eeprom failed", fantray->name, fantray->name); } } } else { if(pn = find_sub_string(buffer, DELTA_PSU_DIR_F2B_STR, sizeof(buffer))) { if(fantray->direction == FAN_DIR_FAULT) { + syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); if(fantray->eeprom_fail) { - syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); - fantray->eeprom_fail = 0; - } else syslog(LOG_WARNING, "%s model match, part number is %s", fantray->name, DELTA_PSU_DIR_F2B_STR); + fantray->eeprom_fail = 0; + } } fantray->direction = FAN_DIR_F2B; if(direction != fantray->direction) @@ -2174,11 +2173,11 @@ static int get_fan_direction(int direction) syslog(LOG_WARNING, "%s airflow direction match, direction is F2B, system direction is F2B", fantray->name); } else if(find_sub_string(buffer, DELTA_PSU_DIR_B2F_STR, sizeof(buffer))) { if(fantray->direction == FAN_DIR_FAULT) { + syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); if(fantray->eeprom_fail) { - syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); - fantray->eeprom_fail = 0; - } else syslog(LOG_WARNING, "%s model match, part number is %s", fantray->name, DELTA_PSU_DIR_B2F_STR); + fantray->eeprom_fail = 0; + } } fantray->direction = FAN_DIR_B2F; if(direction != fantray->direction) @@ -2187,11 +2186,11 @@ static int get_fan_direction(int direction) syslog(LOG_WARNING, "%s airflow direction match, direction is B2F, system direction is B2F", fantray->name); } else if(find_sub_string(buffer, ACBEL_PSU_DIR_F2B_STR, sizeof(buffer))) { if(fantray->direction == FAN_DIR_FAULT) { + syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); if(fantray->eeprom_fail) { - syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); - fantray->eeprom_fail = 0; - } else syslog(LOG_WARNING, "%s model match, part number is %s", fantray->name, ACBEL_PSU_DIR_F2B_STR); + fantray->eeprom_fail = 0; + } } fantray->direction = FAN_DIR_F2B; if(direction != fantray->direction) @@ -2200,11 +2199,11 @@ static int get_fan_direction(int direction) syslog(LOG_WARNING, "%s airflow direction match, direction is F2B, system direction is F2B", fantray->name); } else if(find_sub_string(buffer, ACBEL_PSU_DIR_B2F_STR, sizeof(buffer))) { if(fantray->direction == FAN_DIR_FAULT) { + syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); if(fantray->eeprom_fail) { - syslog(LOG_WARNING, "%s eeprom is NORMAL", fantray->name); - fantray->eeprom_fail = 0; - } else syslog(LOG_WARNING, "%s model match, part number is %s", fantray->name, ACBEL_PSU_DIR_B2F_STR); + fantray->eeprom_fail = 0; + } } fantray->direction = FAN_DIR_B2F; if(direction != fantray->direction) @@ -2214,10 +2213,9 @@ static int get_fan_direction(int direction) } else { fantray->direction = FAN_DIR_FAULT; if(ret > 0) { - fantray->eeprom_fail = 0; + fantray->eeprom_fail = 1; syslog(LOG_CRIT, "%s model mismatch, part number is %s", fantray->name, pn); } else { - fantray->eeprom_fail = 1; syslog(LOG_WARNING, "%s eeprom is ABNORMAL, read %s eeprom failed", fantray->name, fantray->name); } } diff --git a/meta-celestica/meta-as58xx-cl/recipes-kernel/i2c-module/files/cpu_error.c b/meta-celestica/meta-as58xx-cl/recipes-kernel/i2c-module/files/cpu_error.c index 32a9bcbf3518..91639b7c5c05 100644 --- a/meta-celestica/meta-as58xx-cl/recipes-kernel/i2c-module/files/cpu_error.c +++ b/meta-celestica/meta-as58xx-cl/recipes-kernel/i2c-module/files/cpu_error.c @@ -25,6 +25,9 @@ #include #include #include +#include +#include + #ifdef DEBUG @@ -68,6 +71,8 @@ static int aer_1_assert = 0; static int aer_2_assert = 0; static int mca_assert = 0; +static int error_assert = 0; + static irqreturn_t cpu_error_handler(int irq, void *dev_id) { int gpio; @@ -192,6 +197,54 @@ static int gpio_data_init(struct cpu_error_struct *cpu_error) return 0; } +static ssize_t cpu_error_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + + error_assert = (aer_0_assert || aer_1_assert || aer_2_assert || mca_assert); + + return sprintf(buf, "%d\n", error_assert); +} + +static ssize_t cpu_error_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) +{ + int ret; + int val; + + ret = kstrtol(buf, 0, &val); + + if(ret != 0) { + return -EFAULT; + } + error_assert = val; + + return count; +} + +static DEVICE_ATTR(error, S_IRUGO | S_IWUSR, + cpu_error_show, cpu_error_store); + +static struct attribute *cpu_error_attrs[] = { + &dev_attr_error.attr, + NULL +}; +static struct attribute_group cpu_error_attr_group = { + .attrs = cpu_error_attrs, +}; + + +static const struct file_operations cpu_error_fops = { + .owner = THIS_MODULE, + //.read = cpu_error_read, + //.write = cpu_error_write, +}; + +static struct miscdevice cpu_error_misc_device = { + .minor = MISC_DYNAMIC_MINOR, + .name = "cpu_error", + .fops = &cpu_error_fops, +}; static int __init cpu_error_init(void) { @@ -210,13 +263,24 @@ static int __init cpu_error_init(void) mca_wq = create_workqueue("CPU error workqueue"); if (mca_wq == NULL) { - printk(KERN_ERR "%s: error creating CPU error workqueue", __func__); + printk(KERN_ERR "%s: error creating CPU error workqueue\n", __func__); return -1; } else { INIT_DELAYED_WORK(&mca_dwq, mca_error_delay_worker); queue_delayed_work(mca_wq, &mca_dwq, MAC_ERROR_POLL_TIME * HZ); } + ret = misc_register(&cpu_error_misc_device); + if (ret) { + printk(KERN_ERR "%s: unable to register a misc device, ret=%d\n", __func__, ret); + return ret; + } + ret = sysfs_create_group(&cpu_error_misc_device.this_device->kobj, &cpu_error_attr_group); + if (ret) { + printk(KERN_ERR "%s: create sysfs node error, ret=%d\n", __func__, ret); + return ret; + } + CPU_ERROR_DEBUG("done\n"); return 0; } @@ -224,6 +288,8 @@ static int __init cpu_error_init(void) static void __exit cpu_error_exit(void) { kfree(cpu_error); + sysfs_remove_group(&cpu_error_misc_device.this_device->kobj, &cpu_error_attr_group); + misc_deregister(&cpu_error_misc_device); return ; } diff --git a/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/board-utils.sh b/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/board-utils.sh index fbb89dd297db..5b477cf4a59b 100755 --- a/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/board-utils.sh +++ b/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/board-utils.sh @@ -29,6 +29,9 @@ wedge_power() { elif [ "$1" == "reset" ]; then echo 0 > $PWR_RESET_SYSFS sleep 10 + elif [ "$1" == "cycle" ]; then + echo 0 > /sys/bus/i2c/devices/0-000d/pwr_cycle + sleep 25 else echo -n "Invalid parameter" return 1 diff --git a/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/power b/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/power index 57fbb1b68d46..dab5e57da4de 100644 --- a/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/power +++ b/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/power @@ -29,6 +29,8 @@ usage() { echo echo " on: Power on cpu" echo + echo " cycle: Power cycle cpu" + echo } do_status() { @@ -66,7 +68,7 @@ do_on() { # need to check if uS is on or not if wedge_is_us_on 10 "."; then echo "Operation failed, current CPU power status is ON" - logger "Operation failed, current CPU power status is ON" + logger -p user.warning "Operation failed, current CPU power status is ON" return 1 fi fi @@ -79,23 +81,23 @@ do_on() { ret=$? if [ $ret -eq 0 ]; then echo "Operation done, current CPU power status is ON" - logger "Operation done, current CPU power status is ON" + logger -p user.warning "Operation done, current CPU power status is ON" else echo "Operation done, current CPU power status is UNKNOWN" - logger "Operation done, current CPU power status is UNKNOWN" + logger -p user.warning "Operation done, current CPU power status is UNKNOWN" fi else wedge_is_us_on ret=$? if [ $ret -eq 0 ]; then echo "Operation failed, current CPU power status is ON" - logger "Operation failed, current CPU power status is ON" + logger -p user.warning "Operation failed, current CPU power status is ON" elif [ $ret -eq 1 ]; then echo "Operation failed, current CPU power status is OFF" - logger "Operation failed, current CPU power status is OFF" + logger -p user.warning "Operation failed, current CPU power status is OFF" else echo "Operation failed, current CPU power status is UNKNOWN" - logger "Operation failed, current CPU power status is UNKNOWN" + logger -p user.warning "Operation failed, current CPU power status is UNKNOWN" fi fi return $ret @@ -110,23 +112,54 @@ do_off() { ret=$? if [ $ret -eq 1 ]; then echo "Operation done, current CPU power status is OFF" - logger "Operation done, current CPU power status is OFF" + logger -p user.warning "Operation done, current CPU power status is OFF" + else + echo "Operation done, current CPU power status is UNKNOWN" + logger -p user.warning "Operation done, current CPU power status is UNKNOWN" + fi + else + wedge_is_us_on + ret=$? + if [ $ret -eq 0 ]; then + echo "Operation failed, current CPU power status is ON" + logger -p user.warning "Operation failed, current CPU power status is ON" + elif [ $ret -eq 1 ]; then + echo "Operation failed, current CPU power status is OFF" + logger -p user.warning "Operation failed, current CPU power status is OFF" + else + echo "Operation failed, current CPU power status is UNKNOWN" + logger -p user.warning "Operation failed, current CPU power status is UNKNOWN" + fi + fi + return $ret +} + +do_cycle() { + local ret + wedge_power cycle + ret=$? + if [ $ret -eq 0 ]; then + wedge_is_us_on + ret=$? + if [ $ret -eq 0 ]; then + echo "Operation done, current CPU power status is ON" + logger -p user.warning "Operation done, current CPU power status is ON" else echo "Operation done, current CPU power status is UNKNOWN" - logger "Operation done, current CPU power status is UNKNOWN" + logger -p user.warning "Operation done, current CPU power status is UNKNOWN" fi else wedge_is_us_on ret=$? if [ $ret -eq 0 ]; then echo "Operation failed, current CPU power status is ON" - logger "Operation failed, current CPU power status is ON" + logger -p user.warning "Operation failed, current CPU power status is ON" elif [ $ret -eq 1 ]; then echo "Operation failed, current CPU power status is OFF" - logger "Operation failed, current CPU power status is OFF" + logger -p user.warning "Operation failed, current CPU power status is OFF" else echo "Operation failed, current CPU power status is UNKNOWN" - logger "Operation failed, current CPU power status is UNKNOWN" + logger -p user.warning "Operation failed, current CPU power status is UNKNOWN" fi fi return $ret @@ -151,6 +184,9 @@ case "$command" in off) do_off $@ ;; + cycle) + do_cycle $@ + ;; *) usage exit -1 diff --git a/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/power_monitor_phalanx.py b/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/power_monitor_phalanx.py index 82560726ad3b..8e4dfc35de42 100755 --- a/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/power_monitor_phalanx.py +++ b/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/power_monitor_phalanx.py @@ -53,10 +53,10 @@ ['ir3584-i2c-4-15' , 'CPU_CORE VCCIN_1.82V(CPU core 1.82V'], ['ir3584-i2c-4-16' , 'CPU_VCC/VCCIO_1.05V(CPU 1.05V voltage'], ['ir38062-i2c-4-42' , 'Baseboard_Standby_3.3V Voltage(Baseboard standby 3.3V'], - ['ir3584-i2c-16-70' , 'Switch_PVDD_0.8V Voltage(Switch PVDD 0.8V'], + ['ir3584-i2c-16-70' , 'Switch_TRVDD_0.8V Voltage(Switch TRVDD 0.8V'], ['ir38062-i2c-16-49' , 'Switch_TVDD_1.2V(Switch TVDD 1.2V'], ['ir38060-i2c-17-45' , 'Switch_FPGA_1.0V Voltage(Switch FPGA 1.0V'], - ['ir38062-i2c-17-49' , 'Switch_TRVDD_0.8V Voltage(Switch TRVDD 0.8V'], + ['ir38062-i2c-17-49' , 'Switch_PVDD_0.8V Voltage(Switch PVDD 0.8V'], ['ir3584-i2c-19-30' , 'TOP_LC_port&CPLD_Supply_3.3V(TOP Linecard 3.3V'], ['ir3584-i2c-19-50' , 'TOP_LC_VDD_A_0.8(TOP Linecard left DVDD 0.8V'], ['ir3584-i2c-19-70' , 'TOP_LC_DVDDM_A_0.8V(TOP Linecard left DVDDM 0.8V'], @@ -443,10 +443,10 @@ def psu_reinit(): def psu_rename(num): psu_name = { - 1 : '1-1', - 2 : '1-2', - 3 : '2-1', - 4 : '2-2' + 1 : '1', + 2 : '2', + 3 : '3', + 4 : '4' } return psu_name.get(num, None) diff --git a/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/setup_sensors_fishbone.sh b/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/setup_sensors_fishbone.sh index 534a4ec38a18..56d1ffb3007a 100755 --- a/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/setup_sensors_fishbone.sh +++ b/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/setup_sensors_fishbone.sh @@ -92,21 +92,21 @@ set_value 4 16 curr1_label "CPU_VCC/VCCIO_1.05V Current" #Fan1-4 set_value 8 0d fan1_min 1000 -set_value 8 0d fan1_max 26000 +set_value 8 0d fan1_max 27170 set_value 8 0d fan2_min 1000 -set_value 8 0d fan2_max 30000 +set_value 8 0d fan2_max 32670 set_value 8 0d fan3_min 1000 -set_value 8 0d fan3_max 26000 +set_value 8 0d fan3_max 27170 set_value 8 0d fan4_min 1000 -set_value 8 0d fan4_max 30000 +set_value 8 0d fan4_max 32670 set_value 8 0d fan5_min 1000 -set_value 8 0d fan5_max 26000 +set_value 8 0d fan5_max 27170 set_value 8 0d fan6_min 1000 -set_value 8 0d fan6_max 30000 +set_value 8 0d fan6_max 32670 set_value 8 0d fan7_min 1000 -set_value 8 0d fan7_max 26000 +set_value 8 0d fan7_max 27170 set_value 8 0d fan8_min 1000 -set_value 8 0d fan8_max 30000 +set_value 8 0d fan8_max 32670 #PSU1 #add it to sensors.config @@ -114,8 +114,8 @@ val=$(get_hwmon_id 24 58 in1_min) if [ "$val" -gt "0" ] ; then set_hwmon_value 24 58 $val in1_min 90000 set_hwmon_value 24 58 $val in1_max 264000 - set_hwmon_value 24 58 $val in2_min 11640 - set_hwmon_value 24 58 $val in2_max 12360 + set_hwmon_value 24 58 $val in2_min 10800 + set_hwmon_value 24 58 $val in2_max 13200 set_hwmon_value 24 58 $val fan1_min 1000 set_hwmon_value 24 58 $val fan1_max 30000 set_hwmon_value 24 58 $val temp1_max_hyst 60000 @@ -135,8 +135,8 @@ val=$(get_hwmon_id 25 59 in1_min) if [ "$val" -gt "0" ] ; then set_hwmon_value 25 59 $val in1_min 90000 set_hwmon_value 25 59 $val in1_max 264000 - set_hwmon_value 25 59 $val in2_min 11640 - set_hwmon_value 25 59 $val in2_max 12360 + set_hwmon_value 25 59 $val in2_min 10800 + set_hwmon_value 25 59 $val in2_max 13200 set_hwmon_value 25 59 $val fan1_min 1000 set_hwmon_value 25 59 $val fan1_max 30000 set_hwmon_value 25 59 $val temp1_max_hyst 60000 diff --git a/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/setup_sensors_phalanx.sh b/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/setup_sensors_phalanx.sh index 1e68daeeb9e0..b0aa3a294277 100755 --- a/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/setup_sensors_phalanx.sh +++ b/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/setup_sensors_phalanx.sh @@ -77,10 +77,10 @@ set_value 8 0d fan9_max 18000 set_value 8 0d fan10_min 1000 set_value 8 0d fan10_max 18000 -set_value 16 70 in0_label "Switch_PVDD_0.8V Voltage" +set_value 16 70 in0_label "Switch_TRVDD_0.8V Voltage" set_value 16 70 in0_max 840 set_value 16 70 in0_min 760 -set_value 16 70 curr1_label "Switch_PVDD_0.8V Current" +set_value 16 70 curr1_label "Switch_TRVDD_0.8V Current" set_value 16 70 curr1_max 75000 set_value 16 70 curr1_min 0 set_value 16 49 in0_label "Switch_TVDD_1.2V Voltage" @@ -95,10 +95,10 @@ set_value 17 45 in0_min 950 set_value 17 45 curr1_label "Switch_FPGA_1.0V Current" set_value 17 45 curr1_max 1500 set_value 17 45 curr1_min 0 -set_value 17 49 in0_label "Switch_TRVDD_0.8V Voltage" -set_value 17 49 in0_max 860 +set_value 17 49 in0_label "Switch_PVDD_0.8V Voltage" +set_value 17 49 in0_max 880 set_value 17 49 in0_min 760 -set_value 17 49 curr1_label "Switch_TRVDD_0.8V Current" +set_value 17 49 curr1_label "Switch_PVDD_0.8V Current" set_value 17 49 curr1_max 15000 set_value 17 49 curr1_min 0 set_value 19 30 in0_label "TOP_LC_port&CPLD_Supply_3.3V Voltage" @@ -202,8 +202,8 @@ val=$(get_hwmon_id 24 58 in1_min) if [ "$val" -gt "0" ] ; then set_hwmon_value 24 58 $val in1_min 90000 set_hwmon_value 24 58 $val in1_max 264000 - set_hwmon_value 24 58 $val in2_min 11640 - set_hwmon_value 24 58 $val in2_max 12360 + set_hwmon_value 24 58 $val in2_min 10800 + set_hwmon_value 24 58 $val in2_max 13200 set_hwmon_value 24 58 $val fan1_min 1000 set_hwmon_value 24 58 $val fan1_max 30000 set_hwmon_value 24 58 $val temp1_max_hyst 60000 @@ -224,8 +224,8 @@ val=$(get_hwmon_id 25 58 in1_min) if [ "$val" -gt "0" ] ; then set_hwmon_value 25 58 $val in1_min 90000 set_hwmon_value 25 58 $val in1_max 264000 - set_hwmon_value 25 58 $val in2_min 11640 - set_hwmon_value 25 58 $val in2_max 12360 + set_hwmon_value 25 58 $val in2_min 10800 + set_hwmon_value 25 58 $val in2_max 13200 set_hwmon_value 25 58 $val fan1_min 1000 set_hwmon_value 25 58 $val fan1_max 30000 set_hwmon_value 25 58 $val temp1_max_hyst 60000 @@ -245,8 +245,8 @@ val=$(get_hwmon_id 26 58 in1_min) if [ "$val" -gt "0" ] ; then set_hwmon_value 26 58 $val in1_min 90000 set_hwmon_value 26 58 $val in1_max 264000 - set_hwmon_value 26 58 $val in2_min 11640 - set_hwmon_value 26 58 $val in2_max 12360 + set_hwmon_value 26 58 $val in2_min 10800 + set_hwmon_value 26 58 $val in2_max 13200 set_hwmon_value 26 58 $val fan1_min 1000 set_hwmon_value 26 58 $val fan1_max 30000 set_hwmon_value 26 58 $val temp1_max_hyst 60000 @@ -266,8 +266,8 @@ val=$(get_hwmon_id 27 58 in1_min) if [ "$val" -gt "0" ] ; then set_hwmon_value 27 58 $val in1_min 90000 set_hwmon_value 27 58 $val in1_max 264000 - set_hwmon_value 27 58 $val in2_min 11640 - set_hwmon_value 27 58 $val in2_max 12360 + set_hwmon_value 27 58 $val in2_min 10800 + set_hwmon_value 27 58 $val in2_max 13200 set_hwmon_value 27 58 $val fan1_min 1000 set_hwmon_value 27 58 $val fan1_max 30000 set_hwmon_value 27 58 $val temp1_max_hyst 60000 diff --git a/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/us_monitor.sh b/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/us_monitor.sh index c5e1d97ced09..0428136d5b03 100755 --- a/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/us_monitor.sh +++ b/meta-celestica/meta-as58xx-cl/recipes-plat/plat-utils/files/us_monitor.sh @@ -24,17 +24,17 @@ psu_path=( "/sys/bus/i2c/devices/i2c-24/24-0058/hwmon" ) psu_register=( -"i2c_device_delete 25 0x59;i2c_device_delete 25 0x51;i2c_device_add 25 0x59 dps1100;i2c_device_add 25 0x51 24c32" -"i2c_device_delete 24 0x58;i2c_device_delete 24 0x50;i2c_device_add 24 0x58 dps1100;i2c_device_add 24 0x50 24c32" +"i2c_device_delete 25 0x59;i2c_device_delete 25 0x51;i2c_device_add 25 0x59 dps1100;i2c_device_add 25 0x51 24c32;set_hwmon_threshold 25 59 in1_min 90000;set_hwmon_threshold 25 59 in1_max 264000" +"i2c_device_delete 24 0x58;i2c_device_delete 24 0x50;i2c_device_add 24 0x58 dps1100;i2c_device_add 24 0x50 24c32;set_hwmon_threshold 24 58 in1_min 90000;set_hwmon_threshold 24 58 in1_max 264000" ) PHALANX_PSU_NUM=4 phalanx_psu_status=(0 0 0 0) phalanx_psu_register=( -"i2c_device_delete 27 0x58;i2c_device_delete 27 0x50;i2c_device_add 27 0x58 dps1100;i2c_device_add 27 0x50 24c32" -"i2c_device_delete 26 0x58;i2c_device_delete 26 0x50;i2c_device_add 26 0x58 dps1100;i2c_device_add 26 0x50 24c32" -"i2c_device_delete 25 0x58;i2c_device_delete 25 0x50;i2c_device_add 25 0x58 dps1100;i2c_device_add 25 0x50 24c32" -"i2c_device_delete 24 0x58;i2c_device_delete 24 0x50;i2c_device_add 24 0x58 dps1100;i2c_device_add 24 0x50 24c32" +"i2c_device_delete 27 0x58;i2c_device_delete 27 0x50;i2c_device_add 27 0x58 dps1100;i2c_device_add 27 0x50 24c32;set_hwmon_threshold 27 58 in1_min 90000;set_hwmon_threshold 27 58 in1_max 264000" +"i2c_device_delete 26 0x58;i2c_device_delete 26 0x50;i2c_device_add 26 0x58 dps1100;i2c_device_add 26 0x50 24c32;set_hwmon_threshold 26 58 in1_min 90000;set_hwmon_threshold 26 58 in1_max 264000" +"i2c_device_delete 25 0x58;i2c_device_delete 25 0x50;i2c_device_add 25 0x58 dps1100;i2c_device_add 25 0x50 24c32;set_hwmon_threshold 25 58 in1_min 90000;set_hwmon_threshold 25 58 in1_max 264000" +"i2c_device_delete 24 0x58;i2c_device_delete 24 0x50;i2c_device_add 24 0x58 dps1100;i2c_device_add 24 0x50 24c32;set_hwmon_threshold 24 58 in1_min 90000;set_hwmon_threshold 24 58 in1_max 264000" ) board_type=$(board_type) @@ -237,12 +237,14 @@ cpu_temp_update() { echo 0 >/sys/bus/i2c/devices/i2c-0/0-000d/temp2_input return 0 fi - temp=$(get_cpu_temp) - if [ -z "$temp" ]; then - return 0 + if /usr/local/bin/wedge_power.sh status |grep "on"; then + temp=$(get_cpu_temp) + if [ -z "$temp" ]; then + return 0 + fi + val=$(($temp*1000)) + echo $val >/sys/bus/i2c/devices/i2c-0/0-000d/temp2_input fi - val=$(($temp*1000)) - echo $val >/sys/bus/i2c/devices/i2c-0/0-000d/temp2_input } fan_wdt_monitor() { @@ -315,7 +317,7 @@ bios_boot_monitor() { fi return 1 else - if [ $1 -ne 2 -a $1 -ge 5 ]; then + if [ $1 -ne 2 -a $1 -ge 72 ]; then logger -p user.crit "BIOS boot from secondary flash failed" sys_led yellow slow return 2 @@ -332,7 +334,7 @@ bios_boot_monitor() { fi return 1 else - if [ $1 -ne 2 -a $1 -ge 5 ]; then + if [ $1 -ne 2 -a $1 -ge 72 ]; then logger -p user.error "BIOS boot from primary flash failed" return 2 elif [ $1 -ne 2 ]; then @@ -458,6 +460,15 @@ cpld_refresh_monitor() { fi } +cpu_error_autodump() { + val=$(cat /sys/class/misc/cpu_error/error) + if [ "$val" = "1" ]; then + logger -p user.warning "CPU error detected, auto dump it" + /usr/local/bin/autodump.sh & + echo 0 >/sys/class/misc/cpu_error/error + fi +} + if [ "$board_type" = "Fishbone48" -o "$board_type" = "Fishbone32" ]; then psu_status_init else @@ -546,5 +557,7 @@ while true; do fi fi + cpu_error_autodump + usleep 3000000 done diff --git a/meta-celestica/recipes-extended/rsyslog/files/rsyslog.conf b/meta-celestica/recipes-extended/rsyslog/files/rsyslog.conf index e2d06e316dda..a2e521e688fb 100644 --- a/meta-celestica/recipes-extended/rsyslog/files/rsyslog.conf +++ b/meta-celestica/recipes-extended/rsyslog/files/rsyslog.conf @@ -50,7 +50,8 @@ else if $syslogfacility-text == 'local3' then $outchannel consolefile_channel, /var/log/console.log, 20480000, /usr/local/fbpackages/rotate/console_log local3.* :omfile:$consolefile_channel; -else /var/log/messages;LogUtilFileFormat +else /var/log/bmc_debug.log;LogUtilFileFormat +*.info;local3.none /var/log/syslog;LogUtilFileFormat # Save boot messages also to boot.log local7.* /var/log/boot.log;LogUtilFileFormat @@ -69,7 +70,7 @@ $RepeatedMsgReduction on # give up after 10 attempts while retrying every second (20 second timeout). # Also keep it at the end if we need to just amend the server name using cfg-util. template (name="ForwardFormatInContainer" type="string" string="<%PRI%>%TIMESTAMP:::date-rfc3339% %HOSTNAME% bmc#%syslogtag%%msg:::sp-if-no-1st-sp%%msg%") -*.* action(type="omfwd" target="240.1.1.2" port="514" template="ForwardFormatInContainer" protocol="udp" +*.info;local3.none action(type="omfwd" target="240.1.1.2" port="514" template="ForwardFormatInContainer" protocol="udp" queue.type="LinkedList" action.resumeRetryCount="1" action.resumeInterval="60" queue.size="100" queue.workerthreadminimummessages="101" queue.discardseverity="0" queue.timeoutenqueue="0" queue.timeoutshutdown="10" queue.timeoutactioncompletion="100" diff --git a/meta-celestica/recipes-extended/rsyslog/files/rsyslog.logrotate b/meta-celestica/recipes-extended/rsyslog/files/rsyslog.logrotate index 0fafc3ee8984..5d6c864f06f7 100644 --- a/meta-celestica/recipes-extended/rsyslog/files/rsyslog.logrotate +++ b/meta-celestica/recipes-extended/rsyslog/files/rsyslog.logrotate @@ -1,7 +1,7 @@ # /etc/logrotate.d/rsyslog -/var/log/dhclient.log -/var/log/messages +/var/log/bmc_debug.log +/var/log/syslog { rotate 9 missingok @@ -14,24 +14,6 @@ endscript } -/var/log/auth.log -/var/log/daemon.log -/var/log/kern.log -/var/log/user.log -/var/log/cron.log -/var/log/debug -{ - rotate 3 - size 5M - missingok - notifempty - compress - delaycompress - sharedscripts - postrotate - /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true - endscript -} /var/log/console.log { rotate 9