mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-19 21:52:27 +00:00

- tweak deploy a little further - start with rebuilding Dockerfiles - rework healthcheck for adbhoney CPU issues - bump adbhoney, ciscoasa, citrixhoneypot, conpot, cowriepot, ddospot to alpine 3.19 - fix conpot issue with py 3.11 - bump conpot to latest master - bump cowrie to latest master - add autoheal to tpotinit to restart unhealthy container (if healthcheck enabled)
10 lines
226 B
Python
10 lines
226 B
Python
import psutil
|
|
|
|
# Get the overall CPU usage percentage
|
|
cpu_usage = psutil.cpu_percent(interval=1)
|
|
print(cpu_usage)
|
|
# Check CPU usage threshold
|
|
if cpu_usage >= 75: # Adjust the threshold as needed
|
|
exit(1)
|
|
else:
|
|
exit(0)
|