Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

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:

  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:

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.