Package: memsparkline
memsparklineTrack the RAM usage (resident set size) of a process, its children, its children's children, etc. in real time with a Unicode textsparkline. See the average and the maximum usage after the process exits, as well as the run time.Examples> memsparkline -- chromium-browser --incognito http://localhost:8081/
▁▁▁▁▄▇▇▇█ 789.5
 avg: 371.0
 max: 789.5
time: 0:00:12.0> memsparkline -n -o log du /usr/ >/dev/null 2>&1 &
> tail -f log
█ 2.8
▆█ 3.3
▆▇█ 3.6
▆▇▇█ 3.9
▆▇▇█▆ 3.3
▆▇▇█▆▆ 3.3
▆▇▇█▆▆▆ 3.3
▆▇▇█▆▆▆▆ 3.3
▄▅▅▆▅▅▅▅█ 5.2
▄▅▅▆▅▅▅▅██ 5.2
 avg: 3.7
 max: 5.2
time: 0:00:10.1Compatibility and limitationsmemsparkline works on POSIX systems supported bypsutil. It has been tested on Debian, Ubuntu, FreeBSD, NetBSD, and OpenBSD. It seems to work on Windows, but Windows support has received minimal testing. The sparkline displays incorrectly in the Command Prompt andConEmuon Windows 7 with the stock console fonts but correctly on Windows 10 with the font NSimSun.memsparkline measures run time less precisely than time(1). The granularity with which it measures run time depends on the--waitoption.Installationmemsparkline requires Python 3.7 or later.Installing from PyPIThe recommended way to install memsparkline isfrom PyPIwithpipx.pipxinstallmemsparklineYou can also use pip:pipinstall--usermemsparklineManual installationInstall the dependencies from package repositories for your OS. You will find instructions for some operating systems below.Downloadsrc/memsparkline/main.pyand copy it to a directory inPATHasmemsparkline. For example,gitclonehttps://gitlab.com/dbohdan/memsparklinecdmemsparkline
sudoinstallsrc/memsparkline/main.py/usr/local/bin/memsparklineDependenciesDebian/Ubuntusudoaptinstallpython3-psutilDragonFly BSD 6.6, FreeBSD 13.1sudopkginstallpy39-psutilNetBSD 9.3sudopkgininpy310-psutilOpenBSDdoaspkg_addpy3-psutilUsageusage: memsparkline [-h] [-v] [-d path] [-l n] [-m fmt] [-n] [-o path] [-q]
                    [-t fmt] [-w ms]
                    command ...

Track the RAM usage (resident set size) of a process and its descendants in
real time.

positional arguments:
  command               command to run
  arg                   arguments to command

options:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -d path, --dump path  file to which to write full memory usage history when
                        finished
  -l n, --length n      sparkline length (default: 20)
  -m fmt, --mem-format fmt
                        format string for memory amounts (default: "%0.1f")
  -n, --newlines        print new sparkline on new line instead of over
                        previous
  -o path, --output path
                        output file to append to ("-" for standard error)
  -q, --quiet           do not print sparklines, only final report
  -t fmt, --time-format fmt
                        format string for run time (default: "%d:%02d:%04.1f")
  -w ms, --wait ms      how long to wait between taking samples (default:
                        1000)LicenseMIT.See alsomemusg and spark inspired this project.Tracking  memory usageDragonFly BSD,FreeBSD,NetBSD,OpenBSD, andmacOStime(1) flag-l.GNU time(1)flag-v.memusg— a Bash script for FreeBSD, Linux, and macOS that measures the peak resident set size of a process.Sparklinesspark— a Bash script that generates a Unicode text sparkline from a list of numbers.sparkline.tcl— a Tcl script by the developer of this project that does the same. Adds a--minand--maxoption for setting the scale.