Support Support Downloads Knowledge Base Case Manager My Juniper 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

[ScreenOS] How to send debug output information to USB drive

0

0

Article ID: KB12277 KB Last Updated: 06 Apr 2017Version: 6.0
Summary:

In ScreenOS 6.1 or earlier, debug output can only be sent to the debug buffer or to the console, and the debug buffer size is limited to up to 4 MB.  In ScreenOS 6.2 and later, the debug output can also be sent to a USB flash drive. This article provides  instructions on how to do this.

Solution:

In ScreenOS 6.2 and later, the debug output can be sent to a USB flash drive.
Note: Firewalls will detect USBs up to 4GB , but to send debug logs to USB, we must use USBs with a capacity less than or equal to 2 GB. The recommended file partition is FAT 16.

Procedure

  1. To configure sending debug output to a USB drive, use the following CLI commands:

    set dbuf usb filename debug.log  <--debug information will be saved into debug.log file located in USB
    set dbuf usb filesize <1 - max>   <-- Maximum size of debug file is size of FAT 16 partition. The default size is 32M.
    set dbuf usb enable


  2. To verify that the debug information has been copied to the USB drive, use the command get dbuf usb.  For example, on this 128M USB drive:

    SSG550-> get db usb  
    usb total size: 122M, usb free size: 114M
    dbuf save to usb: enable, file size(bytes): 104857600, active file index: 2, active file name: debug.log
    -----------------------------------------------------------------------
    NO.     FILENAME           CUR-SIZE(KB|MB)  MAX-SIZE(MB) ACTIVE   EXIST
    1       SSG-550_20080919_def.txt     0K     100M       inactive   exist
    2       debug.log                    32M    100M       active     exist   
          
    SSG550-> get db usb  
    usb total size: 122M, usb free size: 89M
    dbuf save to usb: enable, file size(bytes): 104857600, active file index: 2, active file name: debug.log
    -----------------------------------------------------------------------
    NO.     FILENAME           CUR-SIZE(KB|MB)  MAX-SIZE(MB) ACTIVE   EXIST
    1       SSG-550_20080919_def.txt     0K     100M       inactive   exist           
    2       debug.log                    57M    100M       active     exist 


  3. (Optional) - The default USB debug log filename has the format: platform_date.txt, such as SSG-550_20080919_def.txt.  In order to use this more descriptive filename, the default-file name, use the command "set dbuf usb default-file". 

    SSG550-> set dbuf usb default-file
    SSG550-> get dbuf usb
    usb total size: 122M, usb free size: 89M
    dbuf save to usb: enable, file size(bytes): 104857600, active file index: 1, active file name: SSG-550_20080919_def.txt
    -----------------------------------------------------------------------
    NO.     FILENAME          CUR-SIZE(KB|MB)  MAX-SIZE(MB) ACTIVE    EXIST
    1       SSG-550_20080919_def.txt     0K    100M         active    exist          
    2       debug.log                    58M   100M       inactive    exist


  4. (Optional) To send the debug.log file from the USB drive to a TFTP server, use the command:

    save file usb:/debug.log to tftp 172.19.50.129 debug_test.log


  5. To safely remove the USB drive from the firewall, use the command "exec usb-device stop". You will get the following message:
    The "USB Mass Storage Device"can now be safely removed from system.
 

Limitations:

  • - Maximum of 32 files can be created on the USB drive.
  • - File name should only be composed of letters, digits, and underline.
  • - Debug to USB stops when USB is 90% full, so file size should be set accordingly.
  • - Collected debugs will not be overwritten, when it reaches maximum file size.
  • - CPU performance may be impacted due to USB read/write process
Modification History:
2017-04-06: Author added note re: firewalls detecting USB drives, added to Limitations.
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