#!/usr/bin/env python3
import shutil
import psutil
def check_disk_usage(disk...
Computers and Technology, 05.10.2021 20:10 bloop3r
#!/usr/bin/env python3
import shutil
import psutil
def check_disk_usage(disk):
"""Verifies that there's enough free space on disk"""
du = shutil. disk_usage(disk)
free = du. free / du. total * 100
return free > 20
def check_cpu_usage():
"""Verifies that there's enough unused CPU"""
usage = psutil. cpu_percent(1)
return usage <75
#If there's not enough disk, or not enough CPU, print an error
if not check_disk_usage('/') or not check_cpu_usage():
print("ERROR!")
print("Everything ok")
else:
print("Network checks failed")
i cant seem to find the bug in the code, ive written it multiple times. can someone help me?
Answers: 2
Computers and Technology, 23.06.2019 15:00
Based on the current economic situation do you expect the employment demand for graduating engineers to increase or decrease? explain the basis for your answer. with a significant economic recovery, what do you think will happen to future enrollments in graduating engineering programs?
Answers: 1
Computers and Technology, 23.06.2019 20:00
Me ajude por favor , coloquei uma senha e nĂŁo consigo tira-la no chorme
Answers: 2
Computers and Technology, 24.06.2019 23:30
True or false when a host gets an ip address from a dhcp server it is said to be configured manually
Answers: 1
Computers and Technology, 25.06.2019 13:40
We are looking at a “sum-scan” (a scan with addition as the operator).sum-scan has two variants. in an “exclusive sum-scan”, the output at each data element isthe sum of all the input elements that came before that element. in an “inclusive sum-scan”,the output at each data element is the sum of all the input elements up to?
Answers: 2
Mathematics, 25.01.2022 02:00
English, 25.01.2022 02:00
Biology, 25.01.2022 02:00
Mathematics, 25.01.2022 02:00
Mathematics, 25.01.2022 02:00
Mathematics, 25.01.2022 02:00
Mathematics, 25.01.2022 02:00