7 lines
101 B
Python
Executable file
7 lines
101 B
Python
Executable file
#!/usr/bin/env python
|
|
|
|
import psutil
|
|
|
|
usage = psutil.cpu_percent(interval=1)
|
|
|
|
print(f" {usage}%")
|