What are the standard C++ features and utilities for querying the properties of the hardware or operating system capabilities, on which the program is running?
For instance,
As others have pointed out, functions for obtaining such properties of the system are typically platform-specific. The STL and boost do not provide platform-independent wrappers, so you'll have to rely on other third party libraries.
I've successfully used SIGAR in the past:
The Sigar API provides a portable interface for gathering system information such as:
- System memory, swap, cpu, load average, uptime, logins
- Per-process memory, cpu, credential info, state, arguments, environment, open files
- File system detection and metrics
- Network interface detection, configuration info and metrics
- TCP and UDP connection tables
- Network route table
As a side note, Boost Filesystem does actually provide boost::filesystem::space to query "how much disk space is available to write to in a certain directory".