简体   繁体   中英

Measure CPU usage starting from OS boot

How to write and run program capable of showing CPU usage starting from OS boot time?

I'd like to measure how much processor, hard disk and RAM is being used during system start-up.

OS: Ubuntu 16.04 or Win 7 or any other on which it'll be easier to implement that.

Windows: you can call GetTickCount64 to get the time since the system was started, and QueryIdleProcessorCycleTime to get idle time. Subtract to get the time spent doing something useful.

As for HDD and RAM usage depends on what do you mean by 'used'... Number of reads? writes? Allocated pages? Committed pages? Virtual or physical memory? Page file requests - are they considered as HDD or RAM usage?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM