Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

close
keyboard_arrow_left
Network Management and Monitoring Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
ON THIS PAGE
keyboard_arrow_right

Compressing Troubleshooting Logs from /var/logs to Send to Juniper Networks Technical Support

date_range 25-Jan-24

Problem

Description

You have collected logs on your device and need to send them to Juniper Networks Technical Support. This topic shows you how to compress the logs into a single file for each Routing Engine to more conveniently send the logs.

Solution

You can compress all the log files in the /var/log directories of the primary and backup (if present) Routing Engines into a single tgz file for each Routing Engine, which enables you to send the logs to JTAC in a convenient package. You can use either the CLI or the command shell to perform these tasks; because of its ease of use, only the CLI version is shown here.

  1. Access the device through the management IP address or console, typically on the primary Routing Engine, RE0.

    content_copy zoom_out_map
    user@host> 
  2. Archive and compress all the log files on RE0 and put them in /var/tmp.

    content_copy zoom_out_map
    user@host>  file archive compress source /var/log/* destination /var/tmp/re0.tgz
    /usr/bin/tar: Removing leading `/' from member names
  3. Confirm that the compressed archive file has been created.

    content_copy zoom_out_map
    user@host>  file list /var/tmp
    baseline-config.conf
    gres-tp
    idp_license_info
    install
    jinstall-12.2-20120328.0-domestic-signed.tgz
    krt_gencfg_filter.txt
    preinstall_boot_loader.conf
    re0.tgz
    rtsdb
    sec-download
    vi.recover
    

    On devices with a single Routing Engine, skip to Step 10.

  4. Log in to the backup Routing Engine, RE1, and access the CLI.

    Note:

    1 is appended to the hostname in the prompt to signify that you are on RE1.

    content_copy zoom_out_map
    user@host> request routing-engine login backup
    % cli
    user@host11>
  5. Archive and compress all the log files on RE1 and put them in /var/tmp.

    content_copy zoom_out_map
    user@host1>  file archive compress source /var/log/* destination /var/tmp/re1.tgz
    /usr/bin/tar: Removing leading `/' from member names
  6. Confirm that the compressed archive file has been created.

    content_copy zoom_out_map
    user@host1>  file list /var/tmp
    baseline-config.conf
    gres-tp
    idp_license_info
    install
    jinstall-12.2-20120328.0-domestic-signed.tgz
    krt_gencfg_filter.txt
    preinstall_boot_loader.conf
    re1.tgz
    rtsdb
    sec-download
    vi.recover
    %
  7. Exit the remote login to the backup Routing Engine to return to the primary Routing Engine. Note that the previously appended 1 is removed from the hostname in the prompt to signify that you are back on RE0.

    content_copy zoom_out_map
    user@host1>  exit
    rlogin: connection closed
    
    user@host1>
  8. Copy the compressed archive file from RE1 to RE0.

    content_copy zoom_out_map
    user@host> file copy re1:/var/tmp/re1.tgz /var/tmp
  9. Confirm the presence of the copied file.

    content_copy zoom_out_map
    user@host>  file list /var/tmp
    baseline-config.conf
    gres-tp
    idp_license_info
    install
    jinstall-12.2-20120328.0-domestic-signed.tgz
    krt_gencfg_filter.txt
    preinstall_boot_loader.conf
    re0.tgz
    re1.tgz
    rtsdb
    sec-download
    vi.recover
    %
  10. Copy the files directly from the primary Routing Engine to any local host using FTP, SCP, JWEB, or (on some devices) a mounted USB.

external-footer-nav