Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

begin work of supporting current resource usage #358

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Commits on Dec 30, 2023

  1. 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 <jaypipes@gmail.com>
    jaypipes committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    095f26c View commit details
    Browse the repository at this point in the history