request flight-recorder set high-cpu
Syntax
request flight-recorder set high-cpu <disable> <backoff-duration seconds> <collect-core> <cpu-threshold percentage> <logical-system> <num-snapshots number> <polling-frequency frequency>
Description
Enable flight recorder tool to collect snapshots of historical data on when the CPU utilization for the routing protocol process on a device was high and what processes caused the high utilization. The detection of high CPU usage enables faster resolution of issues.
The recorded snapshots and core files are saved as log files
in a folder under the /var/log/flight_recorder/ directory. The log files are listed in the order of time stamp saved.
The folder format is Flr_MONTH_DD_YYYY_HH:MM:SS
; for example, Flr_May_09_2018_02:20:50
. Each log file in the directory includes
the following information:
Output from the
show task accounting detail
command (after enabling and waiting for 10 seconds).Output from the
show task jobs
command.Running core data stored in a separate core log file, if enabled.
Options
none | Enable flight recorder tool to collect snapshots of data used for detecting high CPU utilization. The recorded snapshots and core files are saved as log files in a folder under the /var/log/flight_recorder/. |
disable | Disable flight
recorder tool that has been enabled using the
|
backoff-duration seconds | (Optional) Specify the time interval in seconds between two snapshots of data.
|
collect-core | (Optional) Perform snapshot collection of the running core with every snapshot of data taken. When the
|
cpu-threshold percentage | (Optional) Specify the maximum value of CPU utilization in percentage, beyond which the collection of data is triggered.
|
logical-system | (Optional) Enable data collection on logical systems.
|
num-snapshots number | (Optional) Specify the number of snapshots of data to be collected before quitting the collection process.
|
polling-frequency seconds | (Optional) Specify the time in seconds for polling for high CPU utilization.
|
Required Privilege Level
root
Output Fields
When you enter this command, you are provided feedback on the status of your request.
Sample Output
- request flight-recorder set high-cpu (Enable flight-recorder)
- request flight-recorder set high-cpu disable (When flight-recorder is enabled)
- request flight-recorder set high-cpu disable (When flight-recorder is disabled)
request flight-recorder set high-cpu (Enable flight-recorder)
user@host> request flight-recorder set high-cpu cpu-threshold 10 polling-frequency 5 backoff-duration 10 collect-core num-snapshots 1 Please wait....Starting flight-recorder process.
request flight-recorder set high-cpu disable (When flight-recorder is enabled)
user@host> request flight-recorder set high-cpu disable Disabling Done
request flight-recorder set high-cpu disable (When flight-recorder is disabled)
user@host> request flight-recorder set high-cpu disable Flight Recorder is not running!
Release Information
Command introduced in Junos OS Release 18.2R1.