zmemtopo - Display memory topography
![]()
Use zmemtopo to retrieve and display memory topology information for LPARs on IBM Z. The command organizes memory into uniform increments, where an increment is the smallest unit reported by the topology querying device. Each increment represents a configured chunk of memory along with its topological location. The granularity of the displayed data varies by nesting level, reflecting the hierarchical arrangement of memory.
Note:
- The Linux kernel must have the required support to provide the memory topology data.
- To fetch data of any other operating system instances running on the same hypervisor as zmemtopo, you need additional permissions.
zmemtopo syntax
- -l <nesting_level> or --level=<nesting_level>
- selects the nesting level of memory topology to display. Lower levels provide a more detailed output. Valid values for <nesting_level> are in the range 1 - 6, but some levels might not have data available to display.
- -t or --table
- displays the memory topology in a table format. The table lists the increments for each level, and a footer indicates the size of the memory units.
- --format=<format>
- displays the memory topology information in the specified format. Valid values are json, csv, json-seq or PAIRS. In parseable format the increment size is given in bytes.
- -f or --full
- displays the entries or nesting levels without any memory increments configured. Has no effect on the table format.
- -r or --reverse
- reverses the hierarchy of the displayed tree. When "--reverse" is specified the direction follows nesting level to partition. Has no effect on the table format.
- -s <field> or --sort=<field>
- sorts and displays the data according to a given field value. Valid field values are:
- nr
- for partition number
- lpar
- for partition name
- sum
- for total partition increments
- -i or --ascii
- uses only ASCII characters to render views.
Example
Without any options zmemtopo displays the tree view with nesting level 3:
# zmemtopo
LPAR/LEVEL SIZE
LPAR003 8G
└LEVEL4_0 8G
├LEVEL3_0 2G
├LEVEL3_1 2G
├LEVEL3_2 2G
└LEVEL3_3 2G
LPAR005 8G
└LEVEL4_1 8G
├LEVEL3_0 2G
├LEVEL3_1 2G
├LEVEL3_2 2G
└LEVEL3_3 2G
LPAR006 8G
└LEVEL4_3 8G
├LEVEL3_0 2G
├LEVEL3_1 2G
├LEVEL3_2 2G
└LEVEL3_3 2G
...
To display the information in a table format, use the -t option. By default,
nesting level 3 is displayed.
# zmemtopo -t
LEVEL 4 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3
LEVEL 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3
NR LPAR SUM
3 LPAR003 8 2 2 2 2 - - - - - - - - - - - -
5 LPAR005 8 - - - - 2 2 2 2 - - - - - - - -
6 LPAR006 8 - - - - - - - - - - - - 2 2 2 2
9 LPAR009 8 - - - - - - - - - - - - 2 2 2 2
13 LPAR013 48 - - - - - - - - 12 12 12 12 - - - -
Increment size: 1GTo display a reverse tree with nesting level 4, issue:
# zmemtopo -r -l 4
LEVEL/LPAR SIZE
LEVEL4_0 388G
│ ├LPAR003 8G
│ ├LPAR018 64G
│ └...
LEVEL4_1 708G
│ ├LPAR005 8G
│ ├LPAR029 8G
│ └... 32G
LEVEL4_2 224G
│ ├LPAR013 48G
│ ├LPAR014 20G
│ ├LPAR019
│ └... 32G
LEVEL4_3 1618G
├...
└LPAR086 2G
To display a reverse full tree use the -r and -f options.
Entries that have no memory increments are visible.
# zmemtopo -rf
LEVEL/LPAR SIZE
LEVEL4_0 388G
│ ├LEVEL3_0 97G
│ │ ├LPAR003 2G
│ │ ├LPAR018 16G
│ │ └...
│ ├LEVEL3_1 97G
│ │ ├LPAR003 2G
│ │ ├LPAR018 16G
│ │ └...
│ ├LEVEL3_2 97G
│ │ ├LPAR003 2G
│ │ └...
│ └LEVEL3_3 97G
│ ├LPAR003 2G
│ └...
LEVEL4_1 -
│ ├LEVEL3_0 -
│ ├LEVEL3_1 -
│ ├LEVEL3_2 -
│ └LEVEL3_3 -
LEVEL4_2 224G
│ ├LEVEL3_0 56G
│ │ ├LPAR013 12G
│ │ └...
│ ├LEVEL3_1 56G
│ │ ├LPAR013 12G
│ │ └...
│ ├LEVEL3_2 56G
│ │ ├LPAR013 12G
│ │ └...
│ └LEVEL3_3 56G
│ ├LPAR013 12G
│ │ └...
LEVEL4_3 1618G
├LEVEL3_0 405G
│ ├LPAR006 2G
...
To display a tree with entries that have no memory increments, issue:
$ zmemtopo -f
LPAR/LEVEL SIZE
LPAR086 2G
├LEVEL4_0 -
│ ├LEVEL3_0 -
│ ├LEVEL3_1 -
│ ├LEVEL3_2 -
│ └LEVEL3_3 -
├LEVEL4_1 -
│ ├LEVEL3_0 -
│ ├LEVEL3_1 -
│ ├LEVEL3_2 -
│ └LEVEL3_3 -
├LEVEL4_2 -
│ ├LEVEL3_0 -
│ ├LEVEL3_1 -
│ ├LEVEL3_2 -
│ └LEVEL3_3 -
└LEVEL4_3 2G
├LEVEL3_0 1G
├LEVEL3_1 1G
├LEVEL3_2 -
└LEVEL3_3 -
LPAR074 4G
├LEVEL4_0 -
│ ├LEVEL3_0 -
│ ├LEVEL3_1 -
│ ├LEVEL3_2 -
│ └LEVEL3_3 -
├LEVEL4_1 4G
│ ├LEVEL3_0 1G
│ ├LEVEL3_1 1G
│ ├LEVEL3_2 1G
│ └LEVEL3_3 1G
...
To display json format, issue:
# zmemtopo --format=json
{
"meta": {
"api_level": "1",
"version": "s390.tools.version",
"host": "host.name",
"time_epoch": "xxxxxxxxx",
"time": "YYYY-MM-DD HH:MM:SS+0T00"
},
"zmemtopo": {
"report_tod": "0x0e082f7f6d8da64000",
"report_partition_nr": 74,
"increment_size": 1073741824,
"partitions": [
{
"partition_nr": 3,
"partition_name": "LPAR003",
"topology": [
{
"level": 4,
"entry_idx": 0,
"increment_count": 8,
"topology": [
{
"level": 3,
"entry_idx": 0,
"increment_count": 2
},
{
"level": 3,
"entry_idx": 1,
"increment_count": 2
},
{
"level": 3,
"entry_idx": 2,
"increment_count": 2
},
{
"level": 3,
"entry_idx": 3,
"increment_count": 2
}
]
},
{
"level": 4,
"entry_idx": 1,
"increment_count": 0,
"topology": [
...