Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
begin work of supporting current resource usage
This patch begins the process of supporting current resource usage information in `ghw`. The first resource we support is memory on Linux systems. Users can use the `ghw.WithCollectUsage(true)` function to instruct `ghw` to gather usage information for the module in question. Alternately, users can use the `GHW_COLLECT_USAGE=1` environs variable. The following shows the effect of the variable: ``` jaypipes@lappie:~/src/github.com/jaypipes/ghw$ go run cmd/ghwc/main.go memory memory (16GB physical, 16GB usable) jaypipes@lappie:~/src/github.com/jaypipes/ghw$ GHW_COLLECT_USAGE=1 go run cmd/ghwc/main.go memory memory (16GB physical, 16GB usable, 9GB used) ``` Issue #357 Signed-off-by: Jay Pipes <[email protected]>
- Loading branch information