Hi,

I am looking for api to get CPU utilization in linux.
I want use that api in c++ program.
anyone plz help me..

Look at the source code for iostat and mpstat in the SYSSTAT package. All the information you need is there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.