ghw icon indicating copy to clipboard operation
ghw copied to clipboard

Support querying current resource usage

Open jaypipes opened this issue 1 year ago • 1 comments

ghw was originally designed as a system capabilities library, allowing developers to query for system functionality, NUMA topology and hardware capabilities. We deliberately did not query for resource usage, instead calling out in the documentation that there were other systems that were designed for monitoring.

However, as the years have gone by, I've noticed that many systems that import ghw (and a few that call the ghwc example CLI tool) also import other libraries or shell out to many other tools (depending on the host system) to additionally collect resource usage information. And, I think it would be used for these consumer tools to be able to use ghw for both discovering capabilities as well as collecting current resource usage amounts. That way, these consumer tools don't need to shell out to other tools and can use a single library for collecting resource capability and usage information.

jaypipes avatar Dec 30 '23 17:12 jaypipes

I'm in favor of this enhancement. I wonder if we can implement the new functionality as add-on libraries on top of existing ghw packages, leaving the latter mostly unchanged. Perhaps is just more practical to bake in the new functionalities in the existing codebase?

ffromani avatar Dec 31 '23 12:12 ffromani