Is there a function in C ++ to obtain the CPU usage and memory usage of a single process?

Source: Internet
Author: User

The utilization rate is for the entire system ~~

However, some functions can get the running time and other things.

Getcommandline retrieves the command-line string for the current process.
Getcurrentprocess retrieves a pseudo handle for the current process.
Getcurrentprocessid retrieves the process identifier of the calling process.
Getenvironmentstrings retrieves the environment block for the current process.
Getenvironmentvariable retrieves the value of
Specified variable from the Environment block of
Calling process.
Getexitcodeprocess retrieves the termination status of the specified process.
Getguiresources retrieves the Count of handles
Graphical user interface (GUI) objects in use by
Specified Process.
Getpriorityclass retrieves the priority class for the specified process.
Getprocessaffinitymask retrieves a process affinity mask
For the specified process and the system affinity mask
For the system.
Getprocessiocounters Retrieves
Accounting information for all I/O operations saved med
By the specified process.
Getprocesspriorityboost retrieves the priority boost control state of the specified process.
Getprocessshutdownparameters retrieves shutdown parameters for the currently calling process.
Getprocesstimes retrieves timing information about for the specified process.
Getprocessversion retrieves the major and minor version
Numbers of the system on which the specified process
Expects to run.
Getprocessworkingsetsize Retrieves
The minimum and maximum working set sizes of
Specified Process.
Getstartupinfo retrieves
Contents of the startupinfo structure that was specified
When the calling process was created.
Getprocessmemoryinfo
Getprocesstimes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.