Linux command
lsmem 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Example
lsmem
Example
lsmem --all
Example
lsmem --json
Example
lsmem --bytes
Example
lsmem --summary=only
Example
lsmem --output [RANGE,SIZE,STATE,REMOVABLE]
说明
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.
参数
- -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.
FAQ
What is the lsmem command used for?
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.
How do I run a basic lsmem example?
Run `lsmem` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -J, --json do in lsmem?
Output in JSON format