1LSMEM(1)                         User Commands                        LSMEM(1)
2
3
4

NAME

6       lsmem - list the ranges of available memory with their online status
7

SYNOPSIS

9       lsmem [options]
10

DESCRIPTION

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 differences 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

OPTIONS

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       -J, --json
57              Use JSON output format.
58
59       -n, --noheadings
60              Do not print a header line.
61
62       -o, --output list
63              Specify which output columns to print.  Use --help to get a list
64              of  all  supported  columns.  The default list of columns may be
65              extended if list is specified in the format +list (e.g. lsmem -o
66              +NODE).
67
68       -P, --pairs
69              Produce  output  in  the  form of key="value" pairs.  All poten‐
70              tially unsafe characters are hex-escaped (\x<code>).
71
72       -r, --raw
73              Produce output in raw format.  All potentially unsafe characters
74              are hex-escaped (\x<code>).
75
76       -S, --split list
77              Specify which columns (attributes) use to split memory blocks to
78              ranges.  The supported columns are STATE,  REMOVABLE,  NODE  and
79              ZONES,  or "none". The another columns are silently ignored. For
80              more details see DESCRIPTION above.
81
82       -s, --sysroot directory
83              Gather memory data for a Linux instance other than the  instance
84              from which the lsmem command is issued.  The specified directory
85              is the system root of the Linux instance to be inspected.
86
87       -V, --version
88              Display version information and exit.
89
90       --summary[=when]
91              This option controls summary lines output.  The  optional  argu‐
92              ment when can be never, always or only.  If the when argument is
93              omitted, it defaults to "only". The summary output is suppressed
94              for --raw, --pairs and --json.
95

AUTHOR

97       lsmem was originally written by Gerald Schaefer for s390-tools in Perl.
98       The C version for util-linux was written by  Clemens  von  Mann,  Heiko
99       Carstens and Karel Zak.
100

SEE ALSO

102       chmem(8)
103

AVAILABILITY

105       The  lsmem  command  is part of the util-linux package and is available
106       from Linux Kernel Archive ⟨https://www.kernel.org/pub/linux/utils/util-
107       linux/⟩.
108
109
110
111util-linux                       October 2016                         LSMEM(1)
Impressum