1

$ cat /proc/stat reports the time each core spends in different modes since boot.

http://www.linuxhowtos.org/System/procstat.htm explains these different modes as

•user: normal processes executing in user mode

•nice: niced processes executing in user mode

•system: processes executing in kernel mode

•idle: twiddling thumbs

•iowait: waiting for I/O to complete

•irq: servicing interrupts

•softirq: servicing softirqs

/sys/devices/system/cpu/cpuX/online tells if the core is online/offline. What is the difference between a core Idling and a core offline? does the statistics reported in /pro/stat also include the time when the core was offline ? or does it just keep the record of the time the core was online and what modes it was running in during the online duration?

Zohaib Hassan
  • 379
  • 1
  • 4
  • 13

1 Answers1

2

Idling: The idle task (a.k.a. swapper task) is chosen to run when no more runnable tasks in the run queue at the point of task scheduling. It has the lowest possible priority, so that's why it's running of no other task is runnable. While the idle task is running, CPU core is still executing cycles

Offline:

The core offline literally means the core is offline. That is the core is not powered up and thus the core is not able to execute any instructions.

While the system boots up, the primary core comes up first and then the code runs there brings up all the other cores one by one. When the cores comes up, they will idle before they get runnable tasks.

joe
  • 1,136
  • 9
  • 17