Monitor the application server jobs with iSeries commands

This topic describes the jobs used by an application server and how you can monitor jobs by using iSeries command language (CL) commands.

OS/400 command language (CL) commands for monitoring

Use iSeries CL commands to monitor jobs that run in your application server environment. You can view the job logs, display message details, and view spooled files associated with the jobs. The job logs and associated spooled files for the jobs can contain valuable information for determining the root of a problem.

This table lists some iSeries commands that you can use to monitor application server jobs:

Task iSeries command and description
Work with active application server jobs

For application server jobs that run in the QASE51 subsystem:

WRKACTJOB SBS(QASE51)
Work with all jobs with a specific name

This command lists all jobs, active or not, named job_name. The jobs are listed by date, most recent first:

WRKJOB JOB(job_name)

This command is very useful when an application server ends abnormally or fails to start successfully. For example, if an application server started then ended immediately, you could do the following with the job log:

  • Run the command
    WRKJOB JOB(SERVER1)
    .
  • Specify option 1 on the option line next to the first job listed that has a status of OUTQ.
  • Specify option 4 (Work with spooled files) on the command line of the Work with Job screen.
  • Specify option 5 next to the QPJOBLOG spooled file to view the contents.
Work with a specific job

This command displays the Work with Job screen for the specified job:

WRKJOB JOB(job_number/job_user/job_name)

This command is useful when you know the fully qualified job information for the job.

View the job log for an active application server job
  1. Run the following command:
    • WRKJOB SBS(QASE51)
  2. Specify option 5 (Work with) in the option line next to the active job whose job log you want to view.
  3. In the Work with Job display, specify option 10 (Display job log, if active or on job queue).
  4. Press the F10 key to display all messages.
  5. In the job log, position the cursor on a message for which you want to display extended message information.
  6. Press the F1 (Help) key.
Work with application server jobs that run under the QEJBSVR user profile
WRKUSRJOB USER(QEJBSVR)
Delete spooled files for QEJBSVR user profile
DLTSPLF FILE(*SELECT) SELECT(QEJBSVR)
View the spooled files for a job
  1. Run the following command:
    • WRKJOB SBS(QASE51)
  2. Specify option 8 (Work with Spooled Files) in the option line next to the active job whose job log you want to view.
  3. Specify option 5 (Display) in the option line next to the spooled file you want to view.

You can view ended jobs by using the Work with User Jobs (WRKUSRJOB) or Work with Job (WRKJOB) commands.