Question

I am currently creating a program which identifies processes which are hung/out-of-control, and using an entire CPU core. The program then terminates them, so the CPU usage can be kept under control.

However, I have run into a problem: When I execute the 'tasklist' command on Windows, it outputs this:


Image Name:   Blockland.exe
PID:          4880
Session Name: Console
Session#:     6
Mem Usage:    127,544 K
Status:       Running
User Name:    [removed]\[removed]
CPU Time:     0:00:22
Window Title: C:\HammerHost\Blockland\Blockland.exe

So I know that the line which says "CPU Time" is an indication of the total time, in seconds, used by the program ever since it started.

But let's suppose there are 4 CPU cores on the system. Does this mean that it used up 22 seconds of one core, and therefore used 5.5 seconds on the entire CPU in total? Or does this mean that the process used up 22 seconds on the entire CPU?

No correct solution

OTHER TIPS

It's the total CPU time across all cores. So, if the task used 10 seconds on one core and then 15 seconds later on a different core it would report 25 seconds. If it used 5 seconds on all four cores simultaneously, it would report 20 seconds.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top