]> git.ipfire.org Git - thirdparty/util-linux.git/blame - sys-utils/lsmem.1.adoc
Merge branch 'patch-23' of https://github.com/mariobl/util-linux
[thirdparty/util-linux.git] / sys-utils / lsmem.1.adoc
CommitLineData
295b3979 1//po4a: entry man manual
6d5b6948
MB
2= lsmem(1)
3:doctype: manpage
f42ed819 4:man manual: User Commands
6d5b6948
MB
5:man source: util-linux {release-version}
6:page-layout: base
7:command: lsmem
8
9== NAME
10
11lsmem - list the ranges of available memory with their online status
12
13== SYNOPSIS
14
4d297435 15*lsmem* [options]
6d5b6948
MB
16
17== DESCRIPTION
18
19The *lsmem* command 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.
20
bd67ca44 21The default output is compatible with original implementation from s390-tools, but it's strongly recommended to avoid using default outputs in your scripts. Always explicitly define expected columns by using the *--output* option together with a columns list in environments where a stable output is required.
6d5b6948
MB
22
23The *lsmem* command lists a new memory range always when the current memory block distinguish from the previous block by some output column. This default behavior is possible to override by the *--split* option (e.g., *lsmem --split=ZONES*). The special word "none" may be used to ignore all differences between memory blocks and to create as large as possible continuous ranges. The opposite semantic is *--all* to list individual memory blocks.
24
25Note that some output columns may provide inaccurate information if a split policy forces *lsmem* to ignore differences in some attributes. For example if you merge removable and non-removable memory blocks to the one range than all the range will be marked as non-removable on *lsmem* output.
26
27Not all columns are supported on all systems. If an unsupported column is specified, *lsmem* prints the column but does not provide any data for it.
28
29Use the *--help* option to see the columns description.
30
31== OPTIONS
32
33*-a*, *--all*::
4eab78d3 34List each individual memory block, instead of combining memory blocks with similar attributes.
6d5b6948
MB
35
36*-b*, *--bytes*::
4c989ad4 37include::man-common/in-bytes.adoc[]
6d5b6948 38
6d5b6948 39*-J*, *--json*::
4eab78d3 40Use JSON output format.
6d5b6948
MB
41
42*-n*, *--noheadings*::
4eab78d3 43Do not print a header line.
6d5b6948
MB
44
45*-o*, *--output* _list_::
4eab78d3 46Specify which output columns to print. Use *--help* to get a list of all supported columns. The default list of columns may be extended if _list_ is specified in the format **+**__list__ (e.g., *lsmem -o +NODE*).
6d5b6948
MB
47
48*--output-all*::
4eab78d3 49Output all available columns.
6d5b6948
MB
50
51*-P*, *--pairs*::
4eab78d3 52Produce output in the form of key="value" pairs. All potentially unsafe value characters are hex-escaped (\x<code>).
6d5b6948
MB
53
54*-r*, *--raw*::
4eab78d3 55Produce output in raw format. All potentially unsafe characters are hex-escaped (\x<code>).
6d5b6948
MB
56
57*-S*, *--split* _list_::
c83a52f0 58Specify which columns (attributes) use to split memory blocks to ranges. The supported columns are STATE, REMOVABLE, NODE and ZONES, or "none". The other columns are silently ignored. For more details see *DESCRIPTION* above.
6d5b6948
MB
59
60*-s*, *--sysroot* _directory_::
4eab78d3 61Gather memory data for a Linux instance other than the instance from which the *lsmem* command is issued. The specified _directory_ is the system root of the Linux instance to be inspected.
6d5b6948 62
2b2d3172 63include::man-common/help-version.adoc[]
6d5b6948
MB
64
65*--summary*[=_when_]::
4eab78d3 66This option controls summary lines output. The optional argument _when_ can be *never*, *always* or *only*. If the _when_ argument is omitted, it defaults to *"only"*. The summary output is suppressed for *--raw*, *--pairs* and *--json*.
6d5b6948
MB
67
68== AUTHORS
69
70*lsmem* was originally written by Gerald Schaefer for s390-tools in Perl. The C version for util-linux was written by Clemens von Mann, Heiko Carstens and Karel Zak.
71
72== SEE ALSO
73
74*chmem*(8)
75
625e9c61 76include::man-common/bugreports.adoc[]
6d5b6948 77
625e9c61 78include::man-common/footer.adoc[]
6d5b6948
MB
79
80ifdef::translation[]
625e9c61 81include::man-common/translation.adoc[]
6d5b6948 82endif::[]