Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Executing Job Management Scripts and Java Applications

You execute job management scripts and Java applications to view information about jobs triggered from Junos Space nodes. The JobInfoCollector.jar Java application and the job management scripts are stored at the following location: /var/log/space-debug/debug-utilities/jobManagement. When you execute the JobInfoCollector.jar Java application and job management scripts, the output is stored as .txt files at the same location. You can also specify a custom path to store the output. The following sections list the steps to execute the scripts to collect information about jobs.

Executing the Java Application to Collect Job Information

You execute the JobInfoCollector.jar application to collect job information. Ensure that you have updated the MySQL query in the JobInfoCollector.properties file before executing the Java application. The file also contains an example configuration.

To execute the Java application to collect job information:

  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/jobManagement at the shell prompt and press Enter.
  6. (Optional) To view the list of job management scripts and Java applications, enter ls and press Enter.
  7. Type /usr/bin/java -jar JobInfoCollector.jar and press Enter.

    The following options will be displayed:

  8. Type 1, 2, or 3 to select an option.
  9. Enter the database username.
  10. Enter the database password.
  11. The inputs displayed depend on the option you selected.

    If you selected option 1, you need to enter the parent job ID.

    1. Enter a job ID.

      The output from this command is saved to the JobHierarchy-<job-ID>.txt file in the same directory. The following is a sample output if you selected 1:

    If you selected option 2, you need to enter a MySQL query.

    1. Enter a MySQL query—for example, mostate=’Failure’.

      This query filters the jobs that failed. The following is a sample output if you selected 2:

    If you selected option 3, the list of unscheduled jobs is saved to the UnscheduledJobs.txt file in the same directory.

    1. The following is a sample output if you selected 3:

You can view the hierarchy of a subjob (input as the parent job ID), list of jobs that are currently unscheduled, or the output based on the query you entered in the JobInfoCollector.properties file.

Executing the Script to View the Stack Trace of a Job

You execute the getJobThreadDump.sh script to view the stack trace of a job.

To execute the script to view the stack trace of a job:

  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/jobManagement at the shell prompt and press Enter.
  6. (Optional) To view the list of job management scripts and Java applications, type ls and press Enter.
  7. Type ./getJobThreadDump.sh <job-ID> and press Enter.

    The output from this command is saved to the JobThreadDump-<job-ID>.txt file in the same directory.

  8. (Optional) To save the stack trace of the job at a custom output location, type ./getJobThreadDump.sh <job-ID> <output-file-path> and press Enter.

Executing the Script to View Job Information on Nodes

You execute the SystemLoadViewer.sh script to view job information on a node.

To execute the script to view job information on a node:

  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/jobManagement at the shell prompt and press Enter.
  6. (Optional) To view the list of job management scripts and Java applications, type ls and press Enter.
  7. Type ./SystemLoadViewer.sh and press Enter.

    The output from this command is saved to the ./SystemLoadInfo.txt file in the same directory. The following is a sample output from the command:

  8. (Optional) To save job information about a node at a custom output location, enter ./SystemLoadViewer.sh <output-file-path>.

You can view information such as the memory on the nodes, number of root jobs and subjobs on each of the nodes, and so on.