Skip to main content

Quick Start (Requires Python 3.11+):

  • Install: pipx install -f memfo
  • Run: memfo (and enter ? for help) OR memfo -h (for CLI options)

memfo: Memory Footprint Observer

An efficient, real-time Linux memory monitoring tool built in Python.

memfo provides a low-overhead, stable, and highly customizable view of your system's /proc/meminfo data, designed for both short-term and long-term monitoring and performance debugging.

Features at a Glance

memfo is a viewer for /proc/meminfo that shows its data:

  • as a continuously updated display of current and past values,
  • with numbers represented in chosen units as absolute or delta values,
  • in chosen time intervals,
  • with selected fields at the top in the frozen section of the display,
  • with the ability to hide certain fields, and
  • more.

Also, it features:

  • Fixed-Interval Stability: Unlike standard tools, memfo offers a stable, fixed-interval sliding window display (e.g., 5s buckets). Historical columns remain fixed until a new interval is fully completed, eliminating the frustrating visual "drift" common in adaptive monitoring tools.
  • Adaptive History Mode ('Var'): Automatically samples the entire history buffer, distributing samples evenly across the display columns for a high-level overview.
  • Minimal Overhead: Consumes less than 1% CPU and minimal memory, making it ideal for monitoring resource-constrained environments or performance-sensitive applications.
  • Data Flexibility: Switch units instantly (MiB, KiB, GiB), toggle between absolute values and per-second deltas, and hide zero values.
  • Full History Dump: Easily export the entire accumulated history (up to 600 samples cover the last 24 hours at most).

Additionally, memfod is a utility script that starts memfo in a tmux session if not already running, and then attaches to the new or preexisting session. Run memfod help to see its arguments, but normally, just run it w/o arguments.

Example memfo Output

memfo:  [u]nits:MiB [i]tvl=Var [d]eltas=off [z]eros=off [D]ump [c]lock [e]dit ?:help [q]uit
        0s        15s        30s        35s 10/20 22:44:08
   7,813.4    7,813.4    7,813.4    7,813.4 MemTotal
   1,344.1    1,318.9    1,306.6    1,335.2 MemAvailable
─────────────────────────────────────────────────────────────────
     418.6      385.1      356.9      385.2 MemFree
       0.0        0.0        0.0        0.0 Buffers
   2,153.7    2,151.2    2,155.1    2,155.3 Cached
       7.9        7.9        7.9        7.9 SwapCached

NOTES:

  • the columns are absolute or delta values for the given statistic for that interval; in this case, absolute values are shown.
  • the non-scrolling stats above the line are chosen by the "edit" menu.
  • in this example, the fourth column (35s) is the current, live, and incomplete interval, while the preceding columns represent full 15s buckets.

Interaction keys:

  • i - Interval control. Cycles reporting interval (Var, 5s, 15s, 30s, 1m, 5m, 15m, 1h). Var means to fit the full time span of the data.
  • u - Units control. Cycles display units between MiB, KiB, and GiB.
  • d - Deltas control. Toggles the display between absolute values and changes of the values.
  • z - Zeros control. Toggles display of stat lines where the value is zero (helps focus on active metrics).
  • e - Edit Mode. Allows nailing to top or hiding specific memory fields.
  • D - Dump History. Exports all historical samples to /tmp/memfo.csv for analysis.
  • c - clock mode. Shows clock as monotonic time since start of run, wall clock, or both.
  • q - Quit. Exits the program.
  • ? - Help. Displays the help text.
  • < > - Horizontally, shift columns left/right by 1.
  • { } - Horizontally, shift columns left/right by about 1/8 of the time span of the data.
  • [ ] - Horizontally, shift columns to the beginning / end of the data.

About Horizontal Scrolling

After the program has been running a while (and there are enough columns), then horizontal scrolling is available. When you scroll left (or back in time), only the last column updates, and the first columns will have reverse video times to indicate they are scrolled. Those columns will be fixed until their data is removed or compressed in a way that affects them.

About memfod [Daemon mode, Optional, Esoteric]

memfod runs memfo in a named, special tmux session aimed to keep that one version of memfo running until you shut it down. This feature requires:

  • that you install tmux (e.g., on Debian-based distros, sudo apt intall tmux)
  • that you configure tmux to outlive logging out (e.g., on systemd distros, run sudo loginctl enable-linger {username}).

Normally, just use memfod but it can take one command argument:

  • start - start memfo in the special tmux session w/o attaching
  • stop - stop memfo running the special tmux session
  • restart - start memfo running the special tmux session after stopping it
  • status - show whether memfo is running the special tmux session
  • attach - attach to the memfo running the special tmux session, starting if not running.

You could use start to arrange for memfod to start on reboot using cron if desired.

Metadata

Release files for memfo 2.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for memfo 2.1.3
File Size Uploaded Provenance Actions
memfo-2.1.3.tar.gz 20.3 kB Without provenance Details for memfo-2.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for memfo 2.1.3
File Interpreter ABI Platform Actions
memfo-2.1.3-py3-none-any.whl Python 3 none any Details for memfo-2.1.3-py3-none-any.whl

Total release size: 40.1 kB

Release files / memfo-2.1.3.tar.gz

Download URL memfo-2.1.3.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f8153588d61633c501af7e90bfea134d2bcf7b1c33df5c4b35eb0dc36c91fecd
BLAKE2b-256 checksum
How to use checksums
052fea13d9956f9ab9239415edd309ea8737a3a806c3235ba895ee18b1d2d121
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / memfo-2.1.3-py3-none-any.whl

Download URL memfo-2.1.3-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac1f8f722e04f65559dafbd7a23eb8c55a69967c67e02fc0a13f471c51535dc4
BLAKE2b-256 checksum
How to use checksums
54073582b82c9466915d478ef31787f012f750e5c506f84f09cb9874c576cc7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for memfo 2.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.1.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page