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

AUTHORS

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

SEE ALSO

105       chmem(8)
106

AVAILABILITY

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