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:
- Log in to the CLI of the Junos Space node.
- 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.
- 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
- Type the administrator password and press Enter.
The shell prompt appears.
- Type cd /var/log/space-debug/debug-utilities/deviceImport at the shell prompt and press Enter.
- (Optional) To view the list of device import scripts and Java applications, type ls and press Enter.
- Type ./cleanupDeviceImportTables.sh <database-username> <database-password> <database-name> <device-name> and press Enter. For example:
./cleanupDeviceImportTables.sh jboss $(grep mysql.jboss /etc/sysconfig/JunosSpace/pwd | awk -F= '{print $2}') build_db <device name>
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:
- Log in to the CLI of the Junos Space node.
- 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.
- 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.
- Type the administrator password and press Enter.
The shell prompt appears.
- Type cd /var/log/space-debug/debug-utilities/deviceImport at the shell prompt and press Enter.
- (Optional) To view the list of device import scripts and Java applications, type ls and press Enter.
- Type /usr/bin/java -jar DB-blob-reader.jar and press Enter.
- Enter the database username.
- 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.