Improved Response: The updated code includes the - Blackbox

PHOTO EMBED

Mon May 13 2024 03:54:14 GMT+0000 (Coordinated Universal Time)

Saved by @mohmdemoon

Edit
Full Screen
Copy code
1    # If CPU or GPU usage exceeds the threshold, stop mining and send an alert
2    if cpu_usage > 80 or gpu_usage > 80:
3        logger.warning("CPU or GPU usage too high! Stopping mining...")
4        os.system("killall miner")
5        # Send an alert to the user (e.g., via email or push notification)
6
7    # Sleep for 10 seconds before checking again
8    time.sleep(10)
content_copyCOPY

https://www.blackbox.ai/share/6eeb27fe-592c-4f6e-ae46-767ca4334f80