diff --git a/credentials.json b/credentials.json index 191239e..50bffd7 100644 --- a/credentials.json +++ b/credentials.json @@ -1,4 +1,5 @@ { - "creds": [["miner", "miner"], ["root", "root"]] + "creds": [["miner", "miner"], ["root", "root"]], + "tea": [["noro", "fuck pizza hut"]] } diff --git a/finder.py b/finder.py index f50e558..6b5065b 100644 --- a/finder.py +++ b/finder.py @@ -107,6 +107,21 @@ def check_logs(ip, ssh_client, worker_id, current_date, error_keywords): seen_errors.add((log_file, CHIP_BIN_ERROR, f"No chip bin for chain {chain}")) return logs, asic_errors, results +# Function to write results to a text file in the specified format +def write_text_file(file_path, results): + with open(file_path, 'w') as file: + current_worker = None + for result in results: + date, worker_id, ip, log_file, error_type, error_message = result + if worker_id != current_worker: + if current_worker is not None: + file.write("\n") # Add a blank line between different workers + file.write(f"{worker_id}\n") + current_worker = worker_id + file.write(f"- {error_type}\n") + file.write(f"--- {error_message}\n") + file.write(f"-" * 80 + "\n") + # Main function to iterate over IPs and check for errors def main(): ips = read_ips('ips.txt') @@ -147,6 +162,12 @@ def main(): writer.writerow(["Date", "Worker ID", "IP Address", "Log File", "Error Type", "Error Message"]) for result in results: writer.writerow(result) + + # Write results to text file + text_file = 'results.txt' + logging.info(f"Writing results to {text_file}") + write_text_file(text_file, results) + logging.info("Done") if __name__ == "__main__": diff --git a/results.csv b/results.csv index 5eda4bd..6d51882 100644 --- a/results.csv +++ b/results.csv @@ -1,66 +1,30 @@ Date,Worker ID,IP Address,Log File,Error Type,Error Message -2024-05-28,mw9875,10.0.90.105,/var/log/miner.log,EEPROM Error,Data load fail for chain 1 -2024-05-28,mw9875,10.0.90.105,/var/log/miner.log,EEPROM Error,Data load fail for chain 2 -2024-05-28,mw9875,10.0.90.105,/var/log/messages,EEPROM Error,Data load fail for chain 1 -2024-05-28,mw9875,10.0.90.105,/var/log/messages,EEPROM Error,Data load fail for chain 2 -2024-05-28,mw8576,10.0.80.243,/var/log/miner.log,black hole,reg crc error -2024-05-28,mw6643,10.0.60.194,/var/log/miner.log,ASIC Error,Chain 0 has failed with 0 ASICs found and will power off hash board 0 -2024-05-28,mw6643,10.0.60.194,/var/log/miner/miner.log,ASIC Error,Chain 0 has failed with 0 ASICs found and will power off hash board 0 -2024-05-28,mw6643,10.0.60.194,/var/log/miner/miner.log.0,ASIC Error,Chain 0 has failed with 0 ASICs found and will power off hash board 0 -2024-05-28,mw6643,10.0.60.194,/var/log/miner/miner.log.1,ASIC Error,Chain 0 has failed with 0 ASICs found and will power off hash board 0 -2024-05-28,mw6643,10.0.60.194,/var/log/messages,ASIC Error,Chain 0 has failed with 0 ASICs found and will power off hash board 0 -2024-05-28,mw6643,10.0.60.194,/var/log/miner.log,SoC failure,ERROR_SOC_INIT: soc init failed -2024-05-28,mw6643,10.0.60.194,/var/log/miner/miner.log,SoC failure,ERROR_SOC_INIT: soc init failed -2024-05-28,mw6643,10.0.60.194,/var/log/miner/miner.log.0,SoC failure,ERROR_SOC_INIT: soc init failed -2024-05-28,mw6643,10.0.60.194,/var/log/miner/miner.log.1,SoC failure,ERROR_SOC_INIT: soc init failed -2024-05-28,mw6643,10.0.60.194,/var/log/messages,SoC failure,ERROR_SOC_INIT: soc init failed -2024-05-28,mw5513,10.0.50.164,/var/log/miner.log,ASIC Error,Chain 1 has failed with 0 ASICs found and will power off hash board 1 -2024-05-28,mw5513,10.0.50.164,/var/log/messages,ASIC Error,Chain 1 has failed with 0 ASICs found and will power off hash board 1 -2024-05-28,mw5513,10.0.50.164,/var/log/miner.log,SoC failure,ERROR_SOC_INIT: soc init failed -2024-05-28,mw5513,10.0.50.164,/var/log/messages,SoC failure,ERROR_SOC_INIT: soc init failed -2024-05-28,mw5423,10.0.50.28,/var/log/miner.log,ASIC Error,Chain 0 has failed with 0 ASICs found and will power off hash board 0 -2024-05-28,mw5423,10.0.50.28,/var/log/messages,ASIC Error,Chain 0 has failed with 0 ASICs found and will power off hash board 0 -2024-05-28,mw5383,10.0.50.156,/var/log/miner.log,black hole,reg crc error -2024-05-28,mw5383,10.0.50.156,/var/log/messages,black hole,reg crc error -2024-05-28,mw4184,10.0.40.244,/var/log/miner.log,ASIC Error,Chain 0 has failed with 96 ASICs found and will power off hash board 0 -2024-05-28,mw4184,10.0.40.244,/var/log/messages,ASIC Error,Chain 0 has failed with 96 ASICs found and will power off hash board 0 -2024-05-28,mw4184,10.0.40.244,/var/log/miner.log,SoC failure,ERROR_SOC_INIT: soc init failed -2024-05-28,mw4184,10.0.40.244,/var/log/messages,SoC failure,ERROR_SOC_INIT: soc init failed -2024-05-28,mw4122,10.0.40.203,/var/log/miner.log,ASIC Error,Chain 2 has failed with 0 ASICs found and will power off hash board 2 -2024-05-28,mw4122,10.0.40.203,/var/log/messages,ASIC Error,Chain 2 has failed with 0 ASICs found and will power off hash board 2 -2024-05-28,mw4122,10.0.40.203,/var/log/miner.log,SoC failure,ERROR_SOC_INIT: soc init failed -2024-05-28,mw4122,10.0.40.203,/var/log/messages,SoC failure,ERROR_SOC_INIT: soc init failed -2024-05-28,mw3514,10.0.30.178,/var/log/miner.log,SoC failure,ERROR_SOC_INIT: soc init failed -2024-05-28,mw3514,10.0.30.178,/var/log/miner.log,PSU,bitmain_get_power_status failed -2024-05-28,mw3514,10.0.30.178,/var/log/miner.log,PSU,power voltage can not meet the target -2024-05-28,mw3514,10.0.30.178,/var/log/messages,SoC failure,ERROR_SOC_INIT: soc init failed -2024-05-28,mw3514,10.0.30.178,/var/log/messages,PSU,bitmain_get_power_status failed -2024-05-28,mw3514,10.0.30.178,/var/log/messages,PSU,power voltage can not meet the target -2024-05-28,mw2564,10.0.20.163,/var/log/messages,ASIC Error,Chain 0 has failed with 0 ASICs found and will power off hash board 0 -2024-05-28,mw2564,10.0.20.163,/var/log/messages,ASIC Error,Chain 1 has failed with 0 ASICs found and will power off hash board 1 -2024-05-28,mw2564,10.0.20.163,/var/log/messages,ASIC Error,Chain 2 has failed with 0 ASICs found and will power off hash board 2 -2024-05-28,mw2564,10.0.20.163,/var/log/messages,EEPROM Error,Data load fail for chain 1 -2024-05-28,mw2564,10.0.20.163,/var/log/messages,Chip Bin Error,No chip bin for chain 0 -2024-05-28,mw2564,10.0.20.163,/var/log/messages,Chip Bin Error,No chip bin for chain 1 -2024-05-28,mw2564,10.0.20.163,/var/log/messages,Chip Bin Error,No chip bin for chain 2 -2024-05-28,mw2564,10.0.20.163,/var/log/messages,Temperature Error,ERROR_TEMP_TOO_HIGH -2024-05-28,mw2564,10.0.20.163,/var/log/messages,PIC Error,_pic_write_iic failed! -2024-05-28,mw2564,10.0.20.163,/var/log/messages,SoC failure,ERROR_SOC_INIT: soc init failed -2024-05-28,mw2481,10.0.20.59,/var/log/messages,SoC failure,ERROR_SOC_INIT: soc init failed -2024-05-28,mw2184,10.0.20.210,/var/log/messages,ASIC Error,Chain 0 has failed with 0 ASICs found and will power off hash board 0 -2024-05-28,mw2144,10.0.20.131,/var/log/messages,ASIC Error,Chain 0 has failed with 0 ASICs found and will power off hash board 0 -2024-05-28,mw2144,10.0.20.131,/var/log/messages,ASIC Error,Chain 1 has failed with 0 ASICs found and will power off hash board 1 -2024-05-28,mw2144,10.0.20.131,/var/log/messages,ASIC Error,Chain 2 has failed with 0 ASICs found and will power off hash board 2 -2024-05-28,mw2144,10.0.20.131,/var/log/messages,EEPROM Error,Data load fail for chain 0 -2024-05-28,mw2144,10.0.20.131,/var/log/messages,Chip Bin Error,No chip bin for chain 0 -2024-05-28,mw2144,10.0.20.131,/var/log/messages,Chip Bin Error,No chip bin for chain 1 -2024-05-28,mw2144,10.0.20.131,/var/log/messages,Chip Bin Error,No chip bin for chain 2 -2024-05-28,mw2144,10.0.20.131,/var/log/messages,Temperature Error,ERROR_TEMP_TOO_HIGH -2024-05-28,mw2144,10.0.20.131,/var/log/messages,PIC Error,_pic_write_iic failed! -2024-05-28,mw2144,10.0.20.131,/var/log/messages,SoC failure,ERROR_SOC_INIT: soc init failed -2024-05-28,mw1132,10.0.10.169,/var/log/miner.log,SoC failure,ERROR_SOC_INIT: soc init failed -2024-05-28,mw1132,10.0.10.169,/var/log/messages,SoC failure,ERROR_SOC_INIT: soc init failed -2024-05-28,mwxxx2,10.0.100.54,/var/log/miner.log,ASIC Error,Chain 1 has failed with 0 ASICs found and will power off hash board 1 -2024-05-28,mwxxx2,10.0.100.54,/var/log/miner.log,ASIC Error,Chain 2 has failed with 0 ASICs found and will power off hash board 2 -2024-05-28,mwxxx2,10.0.100.54,/var/log/messages,ASIC Error,Chain 1 has failed with 0 ASICs found and will power off hash board 1 -2024-05-28,mwxxx2,10.0.100.54,/var/log/messages,ASIC Error,Chain 2 has failed with 0 ASICs found and will power off hash board 2 +2024-06-01,mw3446,192.168.1.171,/var/log/domokun,ASIC Error,Chain 2 has failed with 0 ASICs found and will power off hash board 2 +2024-06-01,mw3446,192.168.1.171,/var/log/new2.log,ASIC Error,Chain 0 has failed with 0 ASICs found and will power off hash board 0 +2024-06-01,mw3446,192.168.1.171,/var/log/Miner_7426394.log,EEPROM Error,Data load fail for chain 1 +2024-06-01,mw3446,192.168.1.171,/var/log/Miner_7426394.log,Chip Bin Error,No chip bin for chain 0 +2024-06-01,mw3446,192.168.1.171,/var/log/Miner_7426394.log,Chip Bin Error,No chip bin for chain 1 +2024-06-01,mw3446,192.168.1.171,/var/log/Miner_7426394.log,Chip Bin Error,No chip bin for chain 2 +2024-06-01,mw3446,192.168.1.171,/var/log/Miner_6974116.log,ASIC Error,Chain 1 has failed with 0 ASICs found and will power off hash board 1 +2024-06-01,mw3446,192.168.1.171,/var/log/Miner_7426352.log,EEPROM Error,Data load fail for chain 1 +2024-06-01,mw3446,192.168.1.171,/var/log/Miner_7426352.log,EEPROM Error,Data load fail for chain 2 +2024-06-01,mw3446,192.168.1.171,/var/log/new2.log,SoC failure,ERROR_SOC_INIT: soc init failed +2024-06-01,mw3446,192.168.1.171,/var/log/Miner_3174359.log,SoC failure,ERROR_SOC_INIT: soc init failed +2024-06-01,mw3446,192.168.1.171,/var/log/Miner_3174359.log,PSU,bitmain_get_power_status failed +2024-06-01,mw3446,192.168.1.171,/var/log/Miner_3174359.log,PSU,power voltage can not meet the target +2024-06-01,mw3446,192.168.1.171,/var/log/Miner_4594191.log,voltage drop,ERROR_POWER_LOST: power voltage rise or drop +2024-06-01,mw3446,192.168.1.171,/var/log/Miner_4594191.log,black hole,reg crc error +2024-06-01,mw3446,192.168.1.171,/var/log/Miner_7426394.log,Temperature Error,ERROR_TEMP_TOO_HIGH +2024-06-01,mw3446,192.168.1.171,/var/log/Miner_7426394.log,PIC Error,_pic_write_iic failed! +2024-06-01,mw3446,192.168.1.171,/var/log/2024-03/06/cglog_init_2024-03-06_19-00-57/miner.log,SoC failure,ERROR_SOC_INIT: soc init failed +2024-06-01,mw3446,192.168.1.171,/var/log/2024-03/06/cglog_init_2024-03-06_19-00-57/messages,SoC failure,ERROR_SOC_INIT: soc init failed +2024-06-01,mw3446,192.168.1.171,/var/log/2024-03/06/cglog_init_2024-03-06_18-53-25/miner.log,SoC failure,ERROR_SOC_INIT: soc init failed +2024-06-01,mw3446,192.168.1.171,/var/log/2024-03/06/cglog_init_2024-03-06_18-53-25/messages,SoC failure,ERROR_SOC_INIT: soc init failed +2024-06-01,mw3446,192.168.1.171,/var/log/2024-03/06/cglog_init_2024-03-06_19-07-47/miner.log,SoC failure,ERROR_SOC_INIT: soc init failed +2024-06-01,mw3446,192.168.1.171,/var/log/2024-03/06/cglog_init_2024-03-06_19-07-47/messages,SoC failure,ERROR_SOC_INIT: soc init failed +2024-06-01,mw3446,192.168.1.171,/var/log/2024-03/06/cglog_init_2024-03-06_20-51-43/miner.log,SoC failure,ERROR_SOC_INIT: soc init failed +2024-06-01,mw3446,192.168.1.171,/var/log/2024-03/06/cglog_init_2024-03-06_20-51-43/messages,SoC failure,ERROR_SOC_INIT: soc init failed +2024-06-01,mw3446,192.168.1.171,/var/log/2024-03/06/cglog_init_2024-03-06_18-01-31/miner.log,SoC failure,ERROR_SOC_INIT: soc init failed +2024-06-01,mw3446,192.168.1.171,/var/log/2024-03/06/cglog_init_2024-03-06_18-01-31/messages,SoC failure,ERROR_SOC_INIT: soc init failed +2024-06-01,mw3446,192.168.1.171,/var/log/Miner_6024072.log,voltage drop,ERROR_POWER_LOST: pic check voltage drop +2024-06-01,mw3446,192.168.1.171,/var/log/test,voltage drop,ERROR_POWER_LOST: power voltage rise or drop diff --git a/results.txt b/results.txt new file mode 100644 index 0000000..aa44f11 --- /dev/null +++ b/results.txt @@ -0,0 +1,88 @@ +mw3446 +- ASIC Error +--- Chain 2 has failed with 0 ASICs found and will power off hash board 2 +-------------------------------------------------------------------------------- +- ASIC Error +--- Chain 0 has failed with 0 ASICs found and will power off hash board 0 +-------------------------------------------------------------------------------- +- EEPROM Error +--- Data load fail for chain 1 +-------------------------------------------------------------------------------- +- Chip Bin Error +--- No chip bin for chain 0 +-------------------------------------------------------------------------------- +- Chip Bin Error +--- No chip bin for chain 1 +-------------------------------------------------------------------------------- +- Chip Bin Error +--- No chip bin for chain 2 +-------------------------------------------------------------------------------- +- ASIC Error +--- Chain 1 has failed with 0 ASICs found and will power off hash board 1 +-------------------------------------------------------------------------------- +- EEPROM Error +--- Data load fail for chain 1 +-------------------------------------------------------------------------------- +- EEPROM Error +--- Data load fail for chain 2 +-------------------------------------------------------------------------------- +- SoC failure +--- ERROR_SOC_INIT: soc init failed +-------------------------------------------------------------------------------- +- SoC failure +--- ERROR_SOC_INIT: soc init failed +-------------------------------------------------------------------------------- +- PSU +--- bitmain_get_power_status failed +-------------------------------------------------------------------------------- +- PSU +--- power voltage can not meet the target +-------------------------------------------------------------------------------- +- voltage drop +--- ERROR_POWER_LOST: power voltage rise or drop +-------------------------------------------------------------------------------- +- black hole +--- reg crc error +-------------------------------------------------------------------------------- +- Temperature Error +--- ERROR_TEMP_TOO_HIGH +-------------------------------------------------------------------------------- +- PIC Error +--- _pic_write_iic failed! +-------------------------------------------------------------------------------- +- SoC failure +--- ERROR_SOC_INIT: soc init failed +-------------------------------------------------------------------------------- +- SoC failure +--- ERROR_SOC_INIT: soc init failed +-------------------------------------------------------------------------------- +- SoC failure +--- ERROR_SOC_INIT: soc init failed +-------------------------------------------------------------------------------- +- SoC failure +--- ERROR_SOC_INIT: soc init failed +-------------------------------------------------------------------------------- +- SoC failure +--- ERROR_SOC_INIT: soc init failed +-------------------------------------------------------------------------------- +- SoC failure +--- ERROR_SOC_INIT: soc init failed +-------------------------------------------------------------------------------- +- SoC failure +--- ERROR_SOC_INIT: soc init failed +-------------------------------------------------------------------------------- +- SoC failure +--- ERROR_SOC_INIT: soc init failed +-------------------------------------------------------------------------------- +- SoC failure +--- ERROR_SOC_INIT: soc init failed +-------------------------------------------------------------------------------- +- SoC failure +--- ERROR_SOC_INIT: soc init failed +-------------------------------------------------------------------------------- +- voltage drop +--- ERROR_POWER_LOST: pic check voltage drop +-------------------------------------------------------------------------------- +- voltage drop +--- ERROR_POWER_LOST: power voltage rise or drop +--------------------------------------------------------------------------------