Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Junos CLI Reference
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

show system memory

date_range 19-Mar-24

Syntax

content_copy zoom_out_map
show system memory

Syntax (EX Series Switches)

content_copy zoom_out_map
show system memory
<all-members>
<local>
<member member-id> 

Syntax (MX Series Routers)

content_copy zoom_out_map
show system memory
<all-members>
<local>
<member member-id> 

Syntax (QFX Series)

content_copy zoom_out_map
show system memory
<infrastructure name>
<interconnect-device name>
<node-group name> 

Syntax (Junos OS Evolved)

content_copy zoom_out_map
show system memory
<node name> 

Description

Display system-wide memory distribution and usage including the Junos kernel, software processes, and memory disks. Use the show system memory command for troubleshooting with Juniper Networks Customer Support.

Options

none

Display the system memory distribution and usage information.

all-members

(EX4200 switches and MX Series routers only) (Optional) Display system memory distribution and usage information for all members of the Virtual Chassis configuration.

infrastructure name

(QFabric switches only) (Optional) Display system memory distribution and usage information for the fabric control Routing Engine and fabric manager Routing Engine.

interconnect-device name

(QFabric switches only) (Optional) Display system memory distribution and usage information for the Interconnect device.

local

(EX4200 switches and MX Series routers only) (Optional) Display system memory distribution and usage information for the local Virtual Chassis member.

member member-id

(EX4200 switches and MX Series routers only) (Optional) Display system memory distribution and usage information for the specified member of the Virtual Chassis configuration. For EX4200 switches, replace member-id with a value from 0 through 9. For an MX Series Virtual Chassis, replace member-id with a value of 0 or 1.

node name (Junos OS Evolved) (Optional) Display system memory distribution and usage information for the specified node.
node-group name

(QFabric switches only) (Optional) Display system memory distribution and usage information for the Node group.

Required Privilege Level

view

Output Fields

Table 1 lists the output fields for the show system memory command. Output fields are listed in the approximate order in which they appear.

Table 1: show system memory Output Fields

Field Name

Field Description

System memory usage distribution

Amount of memory used by the system, represented in kilobytes and as a percentage of the total memory.

  • Total memory—Actual memory available to the system at the time of system initialization.

  • Reserved memory—Amount of total memory reserved for the system at the time of system initialization, but not managed by virtual memory sub-system.

  • Wired memory—Amount of total memory wired in the system that never paged out.

  • Active memory—Amount of total memory actively in use.

  • Inactive—Amount of total memory in use, but not referenced recently.

  • Used memory—Amount of total memory used.

  • Free—Amount of total memory available for allocation.

  • Buffer—Amount of memory used as buffers.

  • Swap—Amount of virtual memory that is swapped out to a block disk.

  • Available—Estimate of how much memory is available for starting new applications without swapping memory.

    This estimate takes into account that the system needs some page cache to function well. Not all reclaimable slab is reclaimable because certain items are being used.

  • Cached—Amount of total memory almost available for allocation.

Memory disk resident memory

Memory used by the memory disks, but not accounted for in the kernel map. For example, swap-based memory disk.

VM-Kbytes

Virtual memory used as per all virtual mappings in the kernel or process map and percentage thereof based on maximum addressable virtual memory as per any kernel, system, architecture, or resource limits.

Resident

Real memory used as per actual resident pages of all mappings in the kernel or process map and percentage thereof based on the total real memory available in the system.

Map-name

Name of the map.

PID

Process ID.

Process-name

Name of the process.

(MX Series routers only) When you display the memory usage for an MX Series Virtual Chassis, the show system memory command does not display information pertaining to the relayd (/usr/sbin/relayd) process.

Sample Output

show system memory

content_copy zoom_out_map
user@host> show system memory
System memory usage distribution:
       Total memory: 1035552 Kbytes (100%)
    Reserved memory:   18684 Kbytes (  1%)
       Wired memory:  526072 Kbytes ( 50%)
      Active memory:  154792 Kbytes ( 14%)
    Inactive memory:   64664 Kbytes (  6%)
       Cache memory:   69840 Kbytes (  6%)
        Free memory:  200688 Kbytes ( 19%)
Memory disk resident memory:   19016 Kbytes
VM-Kbytes(  %  ) Resident(  %  ) Map-name
   570580(54.36)    92704(08.95) kernel
Pid     VM-Kbytes(  %  ) Resident(  %  ) Process-name
   1451      4756(00.15)     1000(00.09) /sbin/pmap
   1411    727012(23.14)    18008(01.73) mgd: (mgd) (root)/dev/ttyd0
---(more)---

show system memory | display xml (QFX Series)

content_copy zoom_out_map
user@switch> show system-memory | display xml
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/12.1I0/junos">
    <system-memory-information>
        <system-memory-summary-information>
            <system-memory-total>3391488</system-memory-total>
            <system-memory-total-percent>100%</system-memory-total-percent>
            <system-memory-reserved>1619892</system-memory-reserved>
            <system-memory-reserved-percent> 47%</system-memory-reserved-percent>
            <system-memory-wired>1592936</system-memory-wired>
            <system-memory-wired-percent> 46%</system-memory-wired-percent>
            <system-memory-active> 177736</system-memory-active>
            <system-memory-active-percent>  5%</system-memory-active-percent>
            <system-memory-inactive>  60480</system-memory-inactive>
            <system-memory-inactive-percent>  1%</system-memory-inactive-percent>
            <system-memory-cache>  39240</system-memory-cache>
            <system-memory-cache-percent>  1%</system-memory-cache-percent>
            <system-memory-free>1244628</system-memory-free>
            <system-memory-free-percent> 36%</system-memory-free-percent>
        </system-memory-summary-information>
        <memory-disk-resident-information>
            <resident-memory>  16424</resident-memory>
        </memory-disk-resident-information>
        <output>
            pmap: unable to load pmap_helper module: No such file or directory
        </output>
        <output>
            pmap: unable to load pmap_helper module: No such file or directory
        </output>
    </system-memory-information>
    <cli>
        <banner></banner>
    </cli>
</rpc-reply>

show system memory (Junos OS Evolved)

content_copy zoom_out_map
user@host> show system memory
fpc1:
--------------------------------------------------------------------------
System memory usage distribution:
       Total memory: 16125892 Kbytes (100%)
      Active memory: 2447108 Kbytes (15%)
    Inactive memory: 2099532 Kbytes (13%)
        Free memory: 9329768 Kbytes (57%)
Pid     VM-Kbytes(  %  ) Resident(  %  ) Process-name
      1    159116(    0)     8408(    0) /lib/systemd/systemd
      2         0(    0)        0(    0) [kthreadd]
      3         0(    0)        0(    0) [rcu_gp]
...

re0:
--------------------------------------------------------------------------
System memory usage distribution:
       Total memory: 16125576 Kbytes (100%)
      Active memory: 4935984 Kbytes (30%)
    Inactive memory: 8935956 Kbytes (55%)
        Free memory: 178448 Kbytes (1%)
Pid     VM-Kbytes(  %  ) Resident(  %  ) Process-name
      1    162220(    0)    10780(    0) /sbin/init
      2         0(    0)        0(    0) [kthreadd]
      3         0(    0)        0(    0) [rcu_gp]
...

re1:
--------------------------------------------------------------------------
System memory usage distribution:
       Total memory: 16125560 Kbytes (100%)
      Active memory: 3834540 Kbytes (23%)
    Inactive memory: 5579724 Kbytes (34%)
        Free memory: 5500228 Kbytes (34%)
Pid     VM-Kbytes(  %  ) Resident(  %  ) Process-name
      1    160928(    0)     9860(    0) /sbin/init
      2         0(    0)        0(    0) [kthreadd]
      3         0(    0)        0(    0) [rcu_gp]
...

Starting in Junos OS Evolved Release 23.1R1, the Buffer memory, Swap memory, and Available memory fields have been added to the show system memory command.

show system memory (Junos OS Evolved)

content_copy zoom_out_map
user@host> show system memory
Total memory: 16062004 Kbytes (100%)
Active memory: 3152044 Kbytes (13%)
Inactive memory: 4751112 Kbytes (61%)
Free memory: 6602668 Kbytes (41%)
Buffer memory: 370760 Kbytes (2%)
Swap memory: 6045820 Kbytes (38%)
Available memory: 12610560 Kbytes (79%)
Cached memory: 5694904 Kbytes (36%)

show system memory | display xml (Junos OS Evolved)

content_copy zoom_out_map
user@host> show system memory | display xml
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/22.1R0/junos">
    <multi-routing-engine-results>
        <multi-routing-engine-item>
            <re-name>fpc1</re-name>
            <system-memory-information>
                <system-memory-summary-information>
                    <system-memory-total>16125892</system-memory-total>
                    <system-memory-total-percent>100%</system-memory-total-percent>
                    <system-memory-used>3885112</system-memory-used>
                    <system-memory-used-percent>24%</system-memory-used-percent>
                    <system-memory-active>2447796</system-memory-active>
                    <system-memory-active-percent>15%</system-memory-active-percent>
                    <system-memory-inactive>2101128</system-memory-inactive>
                    <system-memory-inactive-percent>13%</system-memory-inactive-percent>
                    <system-memory-free>9327316</system-memory-free>
                    <system-memory-free-percent>57%</system-memory-free-percent>
                    <system-memory-buffer>314516</system-memory-buffer>
                    <system-memory-buffer-percent>1%</system-memory-buffer-percent>
                    <system-memory-swap>2598948</system-memory-swap>
                    <system-memory-swap-percent>16%</system-memory-swap-percent>
                </system-memory-summary-information>
                <pmap-terse-information xmlns="http://xml.juniper.net/fbsd10/14.2I0/junos-pmap">
                    <pmap-terse-summary junos:style="pmap-process-terse-summary">
                        <pid>1</pid>
                        <process-name>/lib/systemd/systemd</process-name>
                        <size>159116</size>
                        <size-percent>0</size-percent>
                        <resident>8408</resident>
                        <resident-percent>0</resident-percent>
                    </pmap-terse-summary>
                    ...
                </pmap-terse-information>
            </system-memory-information>
        </multi-routing-engine-item>
        <multi-routing-engine-item>
            <re-name>re0</re-name>
            <system-memory-information>
                <system-memory-summary-information>
                    <system-memory-total>16125576</system-memory-total>
                    <system-memory-total-percent>100%</system-memory-total-percent>
                    <system-memory-used>6912492</system-memory-used>
                    <system-memory-used-percent>42%</system-memory-used-percent>
                    <system-memory-active>4936580</system-memory-active>
                    <system-memory-active-percent>30%</system-memory-active-percent>
                    <system-memory-inactive>8939976</system-memory-inactive>
                    <system-memory-inactive-percent>55%</system-memory-inactive-percent>
                    <system-memory-free>170744</system-memory-free>
                    <system-memory-free-percent>1%</system-memory-free-percent>
                    <system-memory-buffer>524676</system-memory-buffer>
                    <system-memory-buffer-percent>3%</system-memory-buffer-percent>
                    <system-memory-swap>8517664</system-memory-swap>
                    <system-memory-swap-percent>52%</system-memory-swap-percent>
                </system-memory-summary-information>
                <pmap-terse-information xmlns="http://xml.juniper.net/fbsd10/14.2I0/junos-pmap">
                    <pmap-terse-summary junos:style="pmap-process-terse-summary">
                        <pid>1</pid>
                        <process-name>/sbin/init</process-name>
                        <size>162220</size>
                        <size-percent>0</size-percent>
                        <resident>10780</resident>
                        <resident-percent>0</resident-percent>
                    </pmap-terse-summary>
                    ...
                </pmap-terse-information>
            </system-memory-information>
        </multi-routing-engine-item>
        ...
    </multi-routing-engine-results>

show system memory (Junos OS Evolved) (shows 'used memory')

content_copy zoom_out_map
user@host> show system memory
fpc0:
--------------------------------------------------------------------------
System memory usage distribution:
        Total memory: 16092800 Kbytes (100%)
       Active memory: 367208 Kbytes (2%)
     Inactive memory: 3866136 Kbytes (24%)
         Used memory: 5876340 Kbytes (36%)
         Free memory: 10216460 Kbytes (63%)
       Buffer memory: 17868 Kbytes (0%)
         Swap memory: 0 Kbytes (0%)
    Available memory: 12437340 Kbytes (77%)
       Cached memory: 2510420 Kbytes (15%)
Pid     VM-Kbytes(  %  ) Resident(  %  ) Process-name
      1     94084(    0)    10232(    0) /lib/systemd/systemd
      2         0(    0)        0(    0) [kthreadd]
      3         0(    0)        0(    0) [rcu_gp]
      4         0(    0)        0(    0) [rcu_par_gp]
      5         0(    0)        0(    0) [slub_flushwq]
      6         0(    0)        0(    0) [netns]
      8         0(    0)        0(    0) [kworker/0:0H-events_highpri]
     10         0(    0)        0(    0) [mm_percpu_wq]
     11         0(    0)        0(    0) [rcu_tasks_kthre]

...

re0:
--------------------------------------------------------------------------
System memory usage distribution:
        Total memory: 16026056 Kbytes (100%)
       Active memory: 1075256 Kbytes (6%)
     Inactive memory: 5483160 Kbytes (34%)
         Used memory: 7606360 Kbytes (47%)
         Free memory: 8419696 Kbytes (52%)
       Buffer memory: 28356 Kbytes (0%)
         Swap memory: 0 Kbytes (0%)
    Available memory: 12931772 Kbytes (80%)
       Cached memory: 4736032 Kbytes (29%)
Pid     VM-Kbytes(  %  ) Resident(  %  ) Process-name
      1     97040(    0)     6688(    0) /sbin/init
      2         0(    0)        0(    0) [kthreadd]
      3         0(    0)        0(    0) [rcu_gp]
      4         0(    0)        0(    0) [rcu_par_gp]
      5         0(    0)        0(    0) [slub_flushwq]
      6         0(    0)        0(    0) [netns]
      8         0(    0)        0(    0) [kworker/0:0H-kblockd]
     10         0(    0)        0(    0) [mm_percpu_wq]
     11         0(    0)        0(    0) [rcu_tasks_kthre]
     12         0(    0)        0(    0) [rcu_tasks_rude_]
     13         0(    0)        0(    0) [rcu_tasks_trace]

...

Release Information

Command introduced in Junos OS Release 12.1.

footer-navigation