$ 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?