request system debug-info
Syntax
request system debug-info <node node-name>
Syntax (Junos EVO devices)
request system debug-info <mode custom | lite | normal> <since duration> <node node-name> <noninteractive>
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 |
mode |
|
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. |
noninteractive |
Skips any user interaction. |
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:
-
Go to the /var/tmp/ directory.
root@host:~# cd /var/tmp root@host:/var/tmp# ls debug_collector_2017-11-20_13_16_45.tar.gz
-
Uncompress the /var/tmp/ file.
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
-
Go to the /var/tmp/debug_collector_timestamp directory.
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
-
Look at the log file.
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
root@host> request system debug-info
Log collection time is dependent upon mode, total size of logs and the device's uptime.
Executing the command in lite mode with last 1d log collection is typically the fastest
(less than 30 minutes). Continue? [yes,no] (no) yes
Initializing Session
Debug collector executing under mode: 'normal' as user: 'root'
You can monitor detailed progress via /var/tmp/debug_collector_17477.log
Request to collect logs since the beginning
Creating session pid file
Outdir: /var/tmp/debug_collector_17477_20250513143047/
Start time: 2025-05-13 14:30:47.864371
Detected SystemType: Chassis
Collecting data from nodes:
Master RE: [Self]
Remote REs: ['re1']
Remote FPCs: ['fpc7', 'fpc1']
[re0] Adding node to the job queue
[re0] Preparing FPC to PFE mapping
[re0] Generating dynamic vty/cli-pfe commands for fpc7
[re0] Generating dynamic vty/cli-pfe commands for fpc1
[re0] Cleaning up any existing vty FPC scripts
[re0] Generating cli-pfe fru debug commands
[re0] Adding cli-pfe script for fpc7 command collection
[re0] Adding cli-pfe script for fpc1 command collection
[re0] Generating Linux shell long output commands
[re0] Generating Linux shell commands for PTX-10008
[re0] Initializing Data Collection for Local Node
[re1] Generating Linux shell long output commands
[re1] Generating Linux shell commands for PTX-10008
[re1] Initializing Data Collection for Remote Node
[re1] Adding node to the job queue
[fpc7] Generating cli-pfe commands for PTX-10008
[fpc7] Generating cli-pfe longwait commands
[fpc7] Adding system log and core files for collection
[fpc7] Initializing Data Collection for Remote Node
[fpc7] Adding node to the job queue
[fpc1] Generating cli-pfe commands for PTX-10008
[fpc1] Generating cli-pfe longwait commands
[fpc1] Adding system log and core files for collection
[fpc1] Initializing Data Collection for Remote Node
[fpc1] Adding node to the job queue
Total space required = 4290 MB, Available = 10240 MB
Reducing nice value (from 0 to 3) for Debug Collector
Started collection for node re0
[re0] Starting execution of 84 local shell commands
Started collection for node re1
[re1] Starting execution of 82 remote shell commands
Started collection for node fpc1
[fpc1] Starting execution of 1 file upload commands
Started collection for node fpc7
[fpc7] Starting execution of 1 file upload commands
[fpc1] Finished execution of 1 file upload commands. ExecutionTime: 1.93s
[fpc1] Starting execution of 31 remote shell commands
[fpc7] Finished execution of 1 file upload commands. ExecutionTime: 2.28s
[fpc7] Starting execution of 31 remote shell commands
[fpc1] Finished execution of 31 remote shell commands. ExecutionTime: 15.78s
[fpc1] Starting execution of 4 remote file archiving commands
[fpc7] Finished execution of 31 remote shell commands. ExecutionTime: 16.22s
[fpc7] Starting execution of 4 remote file archiving commands
[fpc1] Finished execution of 4 remote file archiving commands. ExecutionTime: 6.91s
[fpc1] Starting execution of 1 file download commands
[fpc7] Finished execution of 4 remote file archiving commands. ExecutionTime: 6.34s
[fpc7] Starting execution of 1 file download commands
[fpc1] Finished execution of 1 file download commands. ExecutionTime: 4.02s
Finished collection for node fpc1 ExecutionTime: 28.64s
[fpc7] Finished execution of 1 file download commands. ExecutionTime: 4.31s
Finished collection for node fpc7 ExecutionTime: 29.15s
[re1] Finished execution of 82 remote shell commands. ExecutionTime: 35.98s
[re1] Starting execution of 29 remote file archiving commands
[re1] Finished execution of 29 remote file archiving commands. ExecutionTime: 28.94s
[re1] Starting execution of 1 file download commands
[re1] Finished execution of 1 file download commands. ExecutionTime: 0.85s
Finished collection for node re1 ExecutionTime: 65.78s
[re0] Finished execution of 84 local shell commands. ExecutionTime: 97.54s
[re0] Starting execution of 181 local cli commands
[re0] Finished execution of 181 local cli commands. ExecutionTime: 17.71s
[Self] Starting execution of 47 local cli-pfe commands
[Self] Finished execution of 47 local cli-pfe commands. ExecutionTime: 2.77s
[re0] Starting execution of 29 file archiving commands
[re0] Finished execution of 29 file archiving commands. ExecutionTime: 6.91s
[re0] Starting execution of 1 file download commands
[re0] Finished execution of 1 file download commands. ExecutionTime: 0.96s
Finished collection for node re0 ExecutionTime: 125.90s
Started tarring /var/tmp/debug_collector_17477_20250513143047/
Finished tarring /var/tmp/debug_collector_17477_20250513143047/. ExecutionTime: 0.71s
End time: 2025-05-13 14:33:04.738057
File saved at: /var/tmp/debug_collector_17477_20250513143047.tgz
Debug Collector v1.8 run time: 0h 2m 16s
Over n out!Release Information
Command introduced in Junos OS Evolved Release 18.3R1.
Option noninteractive introduced in
Junos OS Release 23.4R2.