I'm writing a distributed, embedded, multi master / slave application for my college coursework and as a part of that I need a way to determine the CPU Speed, CPU usage and available Memory of each system in realtime without a lot of memory respectively cpu consumption, in order to automatically adjust the configuration of the network and the devices.
Triggering system calls periodically or reading out files (open-read-close ....) does not really pose a resource friendly option. I'm sure there must be some POSIX compliant solution to this?
The systems will all be using Linux as an OS and I'm supposed to exclusively use LGPL or BSD libraries for the release.
So far I haven't found any solutions that would fit the criteria.
Any ideas?
hwloc could be what you are searching for. It is opensource and it looks that it even supports several platforms.