When we cat /proc/stat, the first line is time spent in certain mode, user, nice, system, idle, iowait, irq, softirq, ext.My question is how the number of cores or the number of cpus impact the value.For example,if the computer have two cpus, each with two cores.The idle time will be the sum of all four cores?


It is the sum of idle times of all cpu's present in the machine.

Assuming the machine to have two cpu's, you shall see something like this,

cpu  12025658 7696 2460383 3405462812 174924 2 19062 144244 0 0 <----- first line
cpu0 8463714 3740 1309236 1700443907 15984 0 68 63475 0 0
cpu1 3561944 3955 1151147 1705018904 158940 2 18994 80769 0 0

I am not sure about how can we get core level information in a cpu.
For example, What is the idle time of core0 in cpu0 ?

Will update if i get to know about it.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.