Using C++ is there anyway I could get basic information about the computer? For example is there a way I could check how much memory is being used (by the whole computer not just my computer), the total memory available, virtual memory usage, CPU usage, networks stats and so on?
I am using Mac OS X Snow Leopard but I would prefer a solution that could be implemented for all Mac OSs (i.e. Lion)
For system-wide memory usage information under MacOS/X, open and read the file /usr/bin/vm_stat, something like this:
For a CPU usage indicator, do something like this:
For network statistics, I don't know the solution (other than maybe to run netstat and parse the results somehow... it depends on what network statistics you are interested in I suppose).
First off if you are focusing on Mac OS only, then the language of choice should be Objective - C.
Steps you need to follow