LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

lsmem

List the ranges of available memory with their online status

TLDR

List memory information
$ lsmem
copy
List all individual memory blocks
$ lsmem --all
copy
Output as JSON
$ lsmem --json
copy
Show sizes in bytes
$ lsmem --bytes
copy
Show only the summary
$ lsmem --summary=only
copy
Select specific output columns
$ lsmem --output [RANGE,SIZE,STATE,REMOVABLE]
copy

SYNOPSIS

lsmem [options]

DESCRIPTION

lsmem lists the ranges of available memory with their online status. The listed memory blocks correspond to the memory block representation in sysfs. The command also shows the memory block size and the amount of memory in online and offline state. Part of util-linux.

PARAMETERS

-J, --json

Output in JSON format
-b, --bytes
Print sizes in bytes
-o, --output COLUMNS
Specify output columns
-a, --all
Show all memory blocks
-n, --noheadings
Suppress column headers
-r, --raw
Raw output without formatting
--summary [WHEN]
Control summary output: never, always, only.
-S, --split LIST
Columns to split memory blocks: STATE, REMOVABLE, NODE, ZONES, or none.
-s, --sysroot DIR
Gather memory data for another Linux instance.
-P, --pairs
Produce key="value" output, suitable for shell `eval`.
-h, --help, -V, --version
Show help or version information.

INSTALL

sudo apt install util-linux
copy
sudo dnf install util-linux
copy
sudo pacman -S util-linux
copy
sudo apk add util-linux-misc
copy
sudo zypper install util-linux
copy
brew install util-linux
copy
nix profile install nixpkgs#util-linux
copy

CAVEATS

Only available on Linux. Requires sysfs to be mounted. Shows kernel's view of memory, not physical DIMM information.

SEE ALSO

free(1), chmem(8), dmidecode(8)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid