]> git.ipfire.org Git - thirdparty/util-linux.git/blame_incremental - sys-utils/lsmem.1
fstrim: update man page, reuse libmnt_iter
[thirdparty/util-linux.git] / sys-utils / lsmem.1
... / ...
CommitLineData
1.TH LSMEM 1 "October 2016" "util-linux" "User Commands"
2.SH NAME
3lsmem \- list the ranges of available memory with their online status
4.SH SYNOPSIS
5.B lsmem
6[options]
7.SH DESCRIPTION
8The \fBlsmem\fP command lists the ranges of available memory with their online
9status. The listed memory blocks correspond to the memory block representation
10in sysfs. The command also shows the memory block size and the amount of memory
11in online and offline state.
12
13The default output compatible with original implementation from s390-tools, but
14it's strongly recommended to avoid using default outputs in your scripts.
15Always explicitly define expected columns by using the \fB\-\-output\fR option
16together with a columns list in environments where a stable output is required.
17
18The \fBlsmem\fP command lists a new memory range always when the current memory
19block distinguish from the previous block by some output column. This default
20behavior is possible to override by the \fB\-\-split\fR option (e.g. \fBlsmem
21\-\-split=ZONES\fR). The special word "none" may be used to ignore all
22differences between memory blocks and to create as large as possible continuous
23ranges. The opposite semantic is \fB\-\-all\fR to list individual memory
24blocks.
25
26Note that some output columns may provide inaccurate information if a split policy
27forces \fBlsmem\fP to ignore differences in some attributes. For example if you
28merge removable and non-removable memory blocks to the one range than all
29the range will be marked as non-removable on \fBlsmem\fP output.
30
31Not all columns are supported on all systems. If an unsupported column is
32specified, \fBlsmem\fP prints the column but does not provide any data for it.
33
34Use the \fB\-\-help\fR option to see the columns description.
35
36.SH OPTIONS
37.TP
38.BR \-a ", " \-\-all
39List each individual memory block, instead of combining memory blocks with
40similar attributes.
41.TP
42.BR \-b , " \-\-bytes"
43Print the SIZE column in bytes rather than in a human-readable format.
44.TP
45.BR \-h ", " \-\-help
46Display help text and exit.
47.TP
48.BR \-J , " \-\-json"
49Use JSON output format.
50.TP
51.BR \-n , " \-\-noheadings"
52Do not print a header line.
53.TP
54.BR \-o , " \-\-output " \fIlist\fP
55Specify which output columns to print. Use \fB\-\-help\fR
56to get a list of all supported columns.
57The default list of columns may be extended if \fIlist\fP is
58specified in the format \fB+\fIlist\fP (e.g. \fBlsmem \-o +NODE\fP).
59.TP
60.B \-\-output\-all
61Output all available columns.
62.TP
63.BR \-P , " \-\-pairs"
64Produce output in the form of key="value" pairs.
65All potentially unsafe characters are hex-escaped (\\x<code>).
66.TP
67.BR \-r , " \-\-raw"
68Produce output in raw format. All potentially unsafe characters are hex-escaped
69(\\x<code>).
70.TP
71.BR \-S , " \-\-split " \fIlist\fP
72Specify which columns (attributes) use to split memory blocks to ranges. The
73supported columns are STATE, REMOVABLE, NODE and ZONES, or "none". The another columns are
74silently ignored. For more details see DESCRIPTION above.
75.TP
76.BR \-s , " \-\-sysroot " \fIdirectory\fP
77Gather memory data for a Linux instance other than the instance from which the
78\fBlsmem\fP command is issued. The specified \fIdirectory\fP is the system
79root of the Linux instance to be inspected.
80.TP
81.BR \-V ", " \-\-version
82Display version information and exit.
83.TP
84\fB\-\-summary\fR[=\fIwhen\fR]
85This option controls summary lines output. The optional argument \fIwhen\fP can be
86\fBnever\fR, \fBalways\fR or \fBonly\fR. If the \fIwhen\fR argument is
87omitted, it defaults to \fB"only"\fR. The summary output is suppressed for
88\fB\-\-raw\fR, \fB\-\-pairs\fR and \fB\-\-json\fR.
89.SH AUTHOR
90.B lsmem
91was originally written by Gerald Schaefer for s390-tools in Perl. The C version
92for util-linux was written by Clemens von Mann, Heiko Carstens and Karel Zak.
93.SH SEE ALSO
94.BR chmem (8)
95.SH AVAILABILITY
96The \fBlsmem\fP command is part of the util-linux package and is available from
97.UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
98Linux Kernel Archive
99.UE .