]>
Commit | Line | Data |
---|---|---|
cad2d1ac HC |
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 | |
4775cc69 | 6 | [options] |
cad2d1ac HC |
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. | |
4775cc69 | 12 | |
d12e945d | 13 | The default output compatible with original implementation from s390-tools, but |
1b0af4ba KZ |
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. | |
4775cc69 | 17 | |
d12e945d | 18 | The \fBlsmem\fP command lists a new memory range always when the current memory |
96cbe362 KZ |
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. | |
d12e945d KZ |
25 | |
26 | Note that some output columns may provide inaccurate information if a split policy | |
73afd3f8 | 27 | forces \fBlsmem\fP to ignore differences in some attributes. For example if you |
d12e945d KZ |
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 | ||
cad2d1ac HC |
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 | ||
12f17a23 | 34 | Use the \fB\-\-help\fR option to see the columns description. |
4775cc69 | 35 | |
cad2d1ac HC |
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 | |
4775cc69 KZ |
42 | .BR \-b , " \-\-bytes" |
43 | Print the SIZE column in bytes rather than in a human-readable format. | |
cad2d1ac HC |
44 | .TP |
45 | .BR \-h ", " \-\-help | |
46 | Display help text and exit. | |
47 | .TP | |
4775cc69 KZ |
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. | |
60a7e9e9 GS |
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). | |
4775cc69 | 59 | .TP |
fcd4bbff SK |
60 | .B \-\-output\-all |
61 | Output all available columns. | |
62 | .TP | |
4775cc69 KZ |
63 | .BR \-P , " \-\-pairs" |
64 | Produce output in the form of key="value" pairs. | |
65 | All potentially unsafe characters are hex-escaped (\\x<code>). | |
4775cc69 KZ |
66 | .TP |
67 | .BR \-r , " \-\-raw" | |
68 | Produce output in raw format. All potentially unsafe characters are hex-escaped | |
69 | (\\x<code>). | |
d12e945d KZ |
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. | |
cad2d1ac HC |
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. | |
4775cc69 KZ |
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 | |
7cd784d0 | 87 | omitted, it defaults to \fB"only"\fR. The summary output is suppressed for |
4775cc69 KZ |
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. | |
cad2d1ac HC |
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 | |
d673b74e | 97 | .UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/ |
cad2d1ac HC |
98 | Linux Kernel Archive |
99 | .UE . |