I have the following process:
PID = 1245
p = psutil.Process(PID)
When I calculate the cpu
utilization of this process:
print(p.cpu_percent())
it gives something like 25%
. While the whole CPU utilization is about 3%
:
print(psutil.cpu_pecent())
How come? How can I get a representative percentage of this particular process ?