Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Executing Device Import Detail Script and Java Application

    You execute the device import script to delete data from device import tables. You execute the DB-blob-reader.jar Java application to view device information in XML format. Device import script and Java application are stored at the following location: /var/log/space-debug/debug-utilities/deviceImport. When you execute the Java application, the output is stored as a .txt file at the same location. The following sections list the steps to execute the script to delete device import details and Java application to view device information.

    Executing the Script to Delete Data from Device Import Tables

    You execute the cleanupDeviceImportTables.sh script to delete data from device import tables.

    To execute the script to delete data from device import tables:

    1. Log in to the CLI of the Junos Space node.
    2. Enter the administrator username and password at the Junos Space login prompt and press Enter.

      The default username is admin and the default password is abc123.

      The Junos Space Settings Menu is displayed.

    3. Enter 6 (if you are using a hardware appliance) or 7 (if you are using a virtual appliance) at the Junos Space Settings Menu prompt to run shell commands.

      You are prompted to enter your password.

      The following is a sample output from a virtual appliance:

      admin@10.206.41.183's password:
      Last login: Mon Aug 17 06:17:58 2015 from 10.206.41.42
      
      Welcome to the Junos Space network settings utility.
      
      Initializing, please wait
      
      
      Junos Space Settings Menu
      
      1> Change Password
      2> Change Network Settings
      3> Change Time Options
      4> Retrieve Logs
      5> Security
      6> Expand VM Drive Size
      7> (Debug) run shell
      
      A> Apply changes
      Q> Quit
      R> Redraw Menu
      
      Choice [1-7,AQR]: 7
    4. Type the administrator password and press Enter.

      The shell prompt appears.

    5. Type cd /var/log/space-debug/debug-utilities/deviceImport at the shell prompt and press Enter.
    6. (Optional) To view the list of device import scripts and Java applications, type ls and press Enter.
    7. Type ./cleanupDeviceImportTables.sh <database-username> <database-password> <database-name> <device-name> and press Enter. For example:
      ./cleanupDeviceImportTables.sh jboss netscreen build_db ABC123 
      Warning: Using a password on the command line interface can be insecure. 
      Device id from ABC123 is :XXXXX 
      Warning: Using a password on the command line interface can be insecure. 
      Finished cleaning up the import related tables for device ABC123

    Executing the Java Application to View Device XML

    You execute the DB-blob-reader.jar application to view the device XML information.

    Ensure that you have updated the MySQL query in the DB-blob-reader.properties file before executing the Java application. The file also contains an example configuration.

    To execute the Java application and view a device XML:

    1. Log in to the CLI of the Junos Space node.
    2. Enter the administrator username and password at the Junos Space login prompt and press Enter.

      The default username is admin and the default password is abc123.

      The Junos Space Settings Menu is displayed.

    3. Enter 6 (if you are using a hardware appliance) or 7 (if you are using a virtual appliance) at the Junos Space Settings Menu prompt to run shell commands.

      You are prompted to enter your password.

    4. Type the administrator password and press Enter.

      The shell prompt appears.

    5. Type cd /var/log/space-debug/debug-utilities/deviceImport at the shell prompt and press Enter.
    6. (Optional) To view the list of device import scripts and Java applications, type ls and press Enter.
    7. Type /usr/bin/java -jar DB-blob-reader.jar and press Enter.
    8. Enter the database username.
    9. Enter the database password.

      The output from this command is saved to the DB-blob-reader-result.txt file in the same directory.

    You can view the output of the query you entered in the DB-blob-reader.properties file.

    Modified: 2019-10-22