2

So I am trying to print every task's CPU percentage and memory percentage and it looks great but for some reason "System Idle Process" shows me above 100 CPU percentage e.g(312,201) in task manager it looks fine, e.g(89%, 93%) not over 100 why is this happening

this is the code that I am using to get the percentage of each task:

running_programs = []
        for running_program in psutil.process_iter():
            infoDict = running_program.as_dict(attrs=['pid', 'name', 'cpu_percent', 'memory_percent'])
            running_programs.append(infoDict)
        print(running_programs)

and this is the output of the name "System Idle Process"

Patch
  • 694
  • 1
  • 10
  • 29

0 Answers0