Support Support Downloads Knowledge Base Juniper Support Portal 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] A CLI coredump is created when displaying output in JSON format



Article ID: KB37559 KB Last Updated: 07 Oct 2021Version: 1.0

This article explains why a CLI coredump file might be created when displaying long output in JSON format. The recommendation is to not use the JSON format when displaying a non-structured output of log files or any file with huge content for low-end routers and virtual routers.


When displaying long output in JSON format for example:

"show log MESSAGES | match ifOperStatus.*ge-1/0/5 | count | display json"
"file show xxx| display json"

A CLI coredump may be created as shown below:

labroot@host> show system core-dumps
/var/crash/*core*: No such file or directory
-rw-rw----  1 root  wheel    9853186 Aug 24 06:09 /var/tmp/cli.core.0.gz
-rw-rw----  1 root  wheel    9327906 Aug 24 06:26 /var/tmp/cli.core.1.gz
-rw-rw----  1 root  wheel    9331510 Aug 24 06:28 /var/tmp/cli.core.2.gz
/var/tmp/pics/*core*: No such file or directory
/var/crash/kernel.*: No such file or directory
/var/jails/rest-api/tmp/*core*: No such file or directory
/tftpboot/corefiles/*core*: No such file or directory
total files: 3

The CLI coredump was created due to a memory limitation resulting from the CLI process. The daemons (or any show command action) always produce XML to MGD/CLI. For JSON implementation, the CLI converts the incoming XML to JSON.

In the first example, the CLI tries to convert the entire log MESSAGES file from XML to JSON first, and then applies the matching clause. This leads to memory limitation since the output is huge.

Also, the content of the log MESSAGES file is not structured (all output like one object) unlike the output of other commands (for example show chassis hardware | display json). Therefore, it is not worth getting output in JSON format.

This issue might be seen in low-end routers and virtual routers because of a memory limitation.


For low-end routers and virtual routers, it is recommended not to use the JSON format when displaying a non-structured output of log files or any file with huge content.

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