Htop: Feature request: new column "instructions per cycle" (IPC)

Created on 10 May 2017  路  5Comments  路  Source: hishamhm/htop

The column "CPU%" is often misleading for modern computer systems. IPC (instructions per cycle) is more informative in some cases. For background information, see http://www.brendangregg.com/blog/2017-05-09/cpu-utilization-is-wrong.html

Most helpful comment

@svenha There is an "Detailed CPU Time" that will tell you the time (in percentage) your CPU is waiting for I/O. It's already there.
IPC (instructions per cycle) could be a useful addition to the htop columns available. If you can provide a pointer on how to implement this, we will appreciate.

All 5 comments

@svenha There is an "Detailed CPU Time" that will tell you the time (in percentage) your CPU is waiting for I/O. It's already there.
IPC (instructions per cycle) could be a useful addition to the htop columns available. If you can provide a pointer on how to implement this, we will appreciate.

@Explorer09 Thanks for pointing out this option!
The tool 'tiptop' has implemented an IPC column: http://tiptop.gforge.inria.fr/

Thank you! This is really interesting. I'll take a closer look at this when I get the time allocated for it.

It needs PMCs (Performance Monitoring Counters). The main interface to access them on Linux is perf_event_open() (unless you want to do WRMSR/RDPMC instructions directly), and the perf_event_open man page has some sample code.

I should add that PMCs are often unavailable in cloud guests, but are now starting to show up: http://www.brendangregg.com/blog/2017-05-04/the-pmcs-of-ec2.html

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brendangregg picture brendangregg  路  8Comments

RalfJung picture RalfJung  路  4Comments

der-stefan picture der-stefan  路  5Comments

nuno-agostinho picture nuno-agostinho  路  6Comments

sbibauw picture sbibauw  路  7Comments