bottom/docs/content/usage/widgets/memory.md
Clement Tsang 2736dc9b35
refactor: switch to manual implementation of meminfo parse (#548)
Manually parse `/proc/meminfo` for the purposes of memory usage.
2021-07-17 22:27:40 -04:00

1.7 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.

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.