You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import psutil
|
|
import logging
|
|
|
|
def get_cpu_percent():
|
|
cpu_percent = psutil.cpu_percent(interval=1)
|
|
logging.debug(f'CPU usage: {cpu_percent}%')
|
|
return cpu_percent |