I want to make a program that monitors your cpu, virtual and physical memory. Can anyone give me a head start. Is there a standard function to know cpu usage, how much memory left, etc

Whats the right term to search for monitoring computer resources in c? I tried some google search but to no avail.

Thanks in advance

11 Years
Discussion Span
Last Post by Covinus

> Is there a standard function to know cpu usage, how much memory left, etc
No there isn't, which is why you need to state your OS and compiler if you want to make progress on this.


I know this isnt what you asked for, but you could always use managed C++ and use the .NET framework to easialy access the information (i made a similar app in VB). Speed isnt an important factor so managed C++ might suit you.

just suggesting...


Debian, and some other linuces, have /proc directory, where is information about cpu, memory and devices.


@ jbennet

i have a program in c# its from Microsoft it was a featured code from there magazine. I just want to do it in C.
Never tried c# before.


yeah C# uses the .NET framework. You can get most of the info by using the "System.Diagnostics" and "System.Information" namespaces or by using WMI (windows management something)


im not sure if i can convert it. never seen a VB.net code yet. and when i installed my Visual studio.net i did not include VB.net..

Im trying to analyze the C# code i have but im getting confused.


This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.