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

request system debug-info

date_range 19-Nov-23

Syntax

content_copy zoom_out_map
request system debug-info
<node node-name>

Syntax (Junos EVO devices)

content_copy zoom_out_map
request system debug-info
<mode custom | lite | normal>
<since duration>
<node node-name>

Description

Collect debug information from Junos OS Evolved, such as logs. Logs are stored in the /var/tmp/ directory. Debug collector collects cores, application traces, configurations, commits and so on. It also collects outputs from CLI and CLI-PFE commands. You need to login to the device as root user to use this command. Enter the root password and confirm it when requested.

Options

node node-name

(Optional) Identifier of the node. If a value for node (for example, re0, re1, fpc0) is given, this command collects logs only from the given node. If the node option is not provided, log information is collected from all active nodes.

mode
  • custom—Support for custom debug collection. The values are normal, lite, l2, dot1x, vrrp, lacp, infra, mcast, vxlan, extensive, logs.

  • lite—You can use this option to run selected debug commands.

  • normal—You can use this option to run all debug commands.

since

Specifies the log duration. The supported format is yyyy-mm-dd or #d (ex: 2d) or #h (ex: 5h). By default, you can collect the logs for a duration of 90 days.

Additional Information

Debug collector takes maximum time while collecting journal logs and traces. You can use the request system debug-info command for quick debug collection from /var/tmp in the following sample format:

  • request system debug-info node re0,fpc0,fpc1,fpc2 since 1h—Normal mode with minimal journal and trace logs collection from master RE and all FPCs.

  • request system debug-info node re1 since 1h—Normal mode with minimal journal and trace logs collection from backup RE only.

  • request system debug-info mode lite node re0,fpc0,fpc1,fpc2 since 1h —Lite mode with minimal journal and trace logs collection from master RE and all FPCs.

  • request system debug-info mode lite node re1 since 1h—Lite mode with minimal journal and trace logs collection from backup RE only.

To view the debug_collector.log file:

  1. Go to the /var/tmp/ directory.

    content_copy zoom_out_map
    root@host:~# cd /var/tmp
    root@host:/var/tmp# ls
    debug_collector_2017-11-20_13_16_45.tar.gz
    
    
  2. Uncompress the /var/tmp/ file.

    content_copy zoom_out_map
    root@host:/var/tmp# tar -xf debug_collector_2017-11-20_13_16_45.tar.gz
    root@host:/var/tmp# ls
    debug_collector_2017-11-20_13_16_45
    debug_collector_2017-11-20_13_16_45.tar.gz
    
  3. Go to the /var/tmp/debug_collector_timestamp directory.

    content_copy zoom_out_map
    root@host:/var/tmp# cd debug_collector_2017-11-20_13_16_45
    root@host:/var/tmp/debug_collector_2017-11-20_13_16_45# ls
    debug_collector.log re0  re1  fpc0
  4. Look at the log file.

    content_copy zoom_out_map
    root@host:/var/tmp/debug_collector_2017-11-20_13_16_45# cat debug_collector.log
    2017-11-20 13:16:45 INFO: debug_collector.py:704 <module>(): Running debug_collector as user 'root' with super user privileges...
    2017-11-20 13:16:45 INFO: debug_collector.py:705 <module>(): You can monitor detailed progress using:
    2017-11-20 13:16:45 INFO: debug_collector.py:706 <module>():    tail -f /var/tmp/debug_collector_2017-11-20_13_16_45/debug_collector.log
    2017-11-20 13:16:45 INFO: debug_collector.py:323 fetch_root_pswd(): Debug collector needs to login into all nodes in the system as root user
    2017-11-20 13:25:31 DEBUG: debug_collector.py:332 fetch_root_pswd(): Passwords matched, proceeding with debug collection...
    2017-11-20 13:25:31 INFO: debug_collector.py:225 detect_res(): Detecting REs in the system...
    2017-11-20 13:25:31 DEBUG: debug_collector.py:239 detect_res(): Into for
    2017-11-20 13:25:31 DEBUG: debug_collector.py:242 detect_res(): Into m1 not None
    2017-11-20 13:25:31 DEBUG: debug_collector.py:245 detect_res(): Found RE 're0' in /etc/hosts
    2017-11-20 13:25:31 DEBUG: debug_collector.py:248 detect_res(): Into if 1
    2017-11-20 13:25:31 DEBUG: debug_collector.py:239 detect_res(): Into for
    2017-11-20 13:25:31 DEBUG: debug_collector.py:242 detect_res(): Into m1 not None
    2017-11-20 13:25:31 DEBUG: debug_collector.py:245 detect_res(): Found RE 're1' in /etc/hosts
    2017-11-20 13:25:31 DEBUG: debug_collector.py:261 detect_res(): Into if 4
    2017-11-20 13:25:31 INFO: debug_collector.py:265 detect_res(): This RE is 're0'
    2017-11-20 13:25:31 DEBUG: debug_collector.py:266 detect_res(): This RE is 're0' and the other RE is 're1'
    2017-11-20 13:25:32 DEBUG: debug_collector.py:269 detect_res(): Other RE 're1' is reachable
    2017-11-20 13:25:32 INFO: debug_collector.py:274 detect_res():  List of reachable REs: ['re0', 're1']
    2017-11-20 13:25:32 INFO: debug_collector.py:293 detect_fpcs(): Detecting FPCs in the system, might take upto a couple of minutes...
    2017-11-20 13:25:33 DEBUG: debug_collector.py:309 detect_fpcs(): FPC 'fpc0' is reachable
    2017-11-20 13:25:36 DEBUG: debug_collector.py:312 detect_fpcs(): FPC 'fpc1' is not reachable
    2017-11-20 13:25:39 DEBUG: debug_collector.py:312 detect_fpcs(): FPC 'fpc2' is not reachable
    2017-11-20 13:25:40 INFO: debug_collector.py:977 <module>(): User interrupt detected, stopping further debug collection...
    2017-11-20 13:25:40 INFO: debug_collector.py:372 create_final_archive(): Creating archive of all logs collected...
    

Required Privilege Level

view

Sample Output

request system debug-info

content_copy zoom_out_map
root@host> request system debug-info 
2017-11-20 13:16:45 INFO: debug_collector.py:704 <module>(): Running debug_collector as user 'root' with super user privileges...
2017-11-20 13:16:45 INFO: debug_collector.py:705 <module>(): You can monitor detailed progress using:
2017-11-20 13:16:45 INFO: debug_collector.py:706 <module>():    tail -f /var/tmp/debug_collector_2017-11-20_13_16_45/debug_collector.log
2017-11-20 13:16:45 INFO: debug_collector.py:323 fetch_root_pswd(): Debug collector needs to login into all nodes in the system as root user
Please enter root password:
Please re-enter the password: 
2017-11-20 13:25:31 INFO: debug_collector.py:225 detect_res(): Detecting REs in the system...
2017-11-20 13:25:31 INFO: debug_collector.py:265 detect_res(): This RE is 're0'
2017-11-20 13:25:32 INFO: debug_collector.py:274 detect_res():  List of reachable REs: ['re0', 're1']
2017-11-20 13:25:32 INFO: debug_collector.py:293 detect_fpcs(): Detecting FPCs in the system, might take upto a couple of minutes...
^C2017-11-20 13:25:40 INFO: debug_collector.py:977 <module>(): User interrupt detected, stopping further debug collection...
2017-11-20 13:25:40 INFO: debug_collector.py:372 create_final_archive(): Creating archive of all logs collected...
2017-11-20 13:25:40 INFO: debug_collector.py:380 create_final_archive(): Here it is: /var/tmp/debug_collector_2017-11-20_13_16_45.tar.gz
2017-11-20 13:25:40 INFO: debug_collector.py:389 create_final_archive(): Debug collector run time: 0h 8m 54s
2017-11-20 13:25:40 INFO: debug_collector.py:401 cleanup_and_exit(): Over n out!

Release Information

Command introduced in Junos OS Evolved Release 18.3R1.

footer-navigation