Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[MX] How to verify the memory limitation for each process



Article ID: KB31522 KB Last Updated: 06 Jun 2018Version: 1.0

This article provides an example of how to verify the memory limitation for each process.


An explanation of how to check for the Routing CPU Memory Usage is documented here:

To identify the memory limitation, view the RLIMIT (resource limit). This is used to specify the hard and soft limits.

Please note that when a soft limit is exceeded, a process may receive a signal (for example, if the CPU time or file size is exceeded), but it will be allowed to continue execution until it reaches the hard limit (or modifies its resource limit parameter).

The show system process extensive command is used to check the current memory utilization for each process. It reports on two things:

  • SIZE: Total size of the process (text, data, and stack), in kilobytes.
  • RES:  Current amount of program resident memory, in kilobytes.

This is also known as RSS or Resident Set Size. The RES value includes shared library pages used by the process. Any amount of memory freed by the process might still be considered part of the RES value. Generally, the kernel delays the migrating of memory out of the Inact queue into the Cache or Free list unless there is a memory shortage.

This can lead to large discrepancies between the values reported by the routing protocol process and the kernel, even after the routing protocol process has freed a large amount of memory.

For example, in the output below, the chassisd PID is 1630.

user@router> show system processes extensive
last pid:  6753;  load averages:  0.02,  0.04,  0.00  up 0+18:40:43    06:56:39
154 processes: 3 running, 137 sleeping, 14 waiting
Mem: 582M Active, 128M Inact, 78M Wired, 253M Cache, 69M Buf, 2196M Free
Swap: 8192M Total, 8192M Free
1630 root   2   8  -88   123M 19664K nanslp  37:56  2.88% chassisd >> chassisd PID is 1630

Then perform the following to check it's rlimit:

user@router> file show /proc/1630/rlimit
cpu -1 -1
fsize -1 -1
data 34359738368 34359738368 >> 34359738368 is soft limit and  34359738368 is hard limit
stack 16777216 16777216
core -1 -1
rss 67108864 33268023296
memlock 67108864 33268023296
nproc 512 512
nofile 1024 1024
sbsize -1 -1
vmem -1 -1
npts -1 -1
swap -1 -1


Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search