I want to write a program which is capable of printing out system properties. Is this possible?
If so, with C/C++, how can one learn system features/properties?
For example, the following properties:
hardware :
Memory 3.8 gib
ubuntu :
release 10.10 ( maveric )
system status:
available disk space 51.1 gib
user name :
xxx
processor :
intel ... duo cpu e4600
The platform being Linux.
In Linux You can simple use the function:
by including the header
it returns the system information as a part of the structure:
Well, if not all, atleast it gives you some
system propertiesas you said. There should be other api available which can reveal all the information you need. You will need to check out the documentation & search around a bit for that.EDIT:
Oh well, I just ripped this one off from the internet. This program shall help you run Linux commands programatically.
Api Usage:
GetSystemOutput("/usr/bin/lsb_release -a")And following the commands: