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