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