Justin Martin e4a6e751ec
feature: Add gpu proc info (#1276)
* Add gpu util, power and procs.

Consolidated gpu calls into `data_harvester`.

Changed config flag from `enable_gpu_memory` to `enable_gpu`.

Added GPU utilization to the cpu widget.

Added GPU process memory usage and utilization percentage to the proc widget.
Added key binds for gpu process toggling.

Added GPU power usage to the battery widget.
Added bounds check to battery widget header.
Show battery widget header when `gpu_enable`.

Added feature flag `legacy-functions` to `nvml-wrapper`.

updated config file(s).
updated help text.
updated docs.

* Code Review:

Remove GPU util from cpu widget
Remove GPU power from battery widget
Use reference for gpu widgets_to_harvest
Extract match arm to function for feature gate

* Code Review: add gmem% toggle

* Do not poll gpu temp when filtered

* Code Review Two Changes:

adjust doc wordings
remove extra references
remove extra widget harvest checks
init proc gpu values
use convert_temp_unit for gpu temp
2023-11-19 23:54:15 -05:00

1.8 KiB

Memory Widget

The memory widget provides a visual representation of RAM and swap usage over time.

A picture of an expanded memory widget.

Features

The legend displays the current usage in terms of percentage and actual usage in binary units (KiB, MiB, GiB, etc.). If the total RAM or swap available is 0, then it is automatically hidden from the legend and graph.

One can also adjust the displayed time range through either the keyboard or mouse, with a range of 30s to 600s.

This widget can also be configured to display Nvidia GPU memory usage (--enable_gpu on Linux/Windows) or cache memory usage (--enable_cache_memory).

Key bindings

Note that key bindings are generally case-sensitive.

Binding Action
++plus++ Zoom in on chart (decrease time range)
++minus++ Zoom out on chart (increase time range)
++equal++ Reset zoom

Mouse bindings

Binding Action
++"Scroll"++ Scrolling up or down zooms in or out of the graph respectively

Calculations

Memory usage is calculated using the following formula based on values from /proc/meminfo (based on htop's implementation):

MemTotal - MemFree - Buffers - (Cached + SReclaimable - Shmem)

You can find more info on /proc/meminfo and its fields here.