Linux Version number and hardwares list

Hi,

I am looking for a C/C++ code to get the Linux Version number and the hardwares list in the system like drive size, RAM size etc.

Also, Is is possible to get the OS version and hardwares list using same code on any linux flavour?? For e.g. Fedora, ubuntu, Debian etc?

Can anyone suggest some code for this.

Any help is greatly appreciated.

Thanks
Arun
for version you can parse /proc/version

will update on the hardware calls.
Take a look at the "smolt" program and see how it does it.
Topic archived. No new replies allowed.