I have been poking around the Linux programming manuals for some time now, but there seems to be a lack of function calls that retrieves system information like CPU info, hardware info, memory, hard disk, devices and so on.
I know that some of the information can be retrieved from configuration files, but the problem is that there is no generic location for certain config files in Linux. Also this seems to be a somewhat unsatisfactory solution.
What is the best way to retrieve system information in a generic way in Linux?
- Call the command-line system information calls from and retrieve info from the shell?
- Functions calls from within C?
- Reading configuration files and/or other directories?
Thank you.