I\'m trying to get information like OS version, hard disk space, disk space available, and installed RAM on a Linux system in C++. I know I can use system()
to run
System information is by definition not portable, so there is no standard solution. Your best bet is using a library that does most of the work for you. One such cross platform library (unlike hal, which is currently Linux specific) is SIGAR API, which is open source BTW. I've used it in a C++ project without much trouble (the installation is a bit non-standard but can be figured out easily)