Viewing Active Jobs on the IBM i

The system value QACTJOB sets the initial number of active jobs for which memory is allocated during IPL. To view this value, enter DSPSYSVAL SYSVAL(QACTJOB).

To view the CPU usage of individual jobs, we bring up the Work with Active Jobs screen by entering the command WRKACTJOB. The Work with Active Jobs screen shows what jobs are currently active. The Work with Active Jobs screen lists the jobs are running on the system, and enables us to change, hold or end the jobs or associated subsystems.

There are several types of active jobs, including autostart jobs, ASJ, batch jobs, BCH, batch immediate jobs, BCI, interactive jobs, INT, prestart jobs, PJ, subsystem monitor jobs, SBS, and system jobs, SYS. In the Work with Active Jobs screen we can see these codes listed in the Type column.

In the Status column, we can see a number of different status codes, the most common of which are CNDW, DEQW, EVTW, RUN, SELW, SIGW, and TIMW. The CNDW status means that the job is waiting for the handle-based conditions. The DEQW status means that the job is waiting for the completion of a dequeue operation. The EVTW status means that the job is waiting for an event. The SELW status means that the job is in a select wait. The SIGW status means that the job is waiting for a signal. The TIMW status means that the job is waiting for a time interval to end.

The WRKACTJOB command’s SBS parameter enables us to view the jobs from a particular subsystem. For instance, to view all the jobs currently running in the QSERVER subsystem, we run the command WRKACTJOB SBS(QSERVER). The QSERVER subsystem is for file-serving work. File server jobs and the database host server daemon job, QZDASRVSD, run in this subsystem.

The Work with User Jobs command, WRKUSRJOB, displays jobs by user profile name, and the Work with Subsystem Jobs command, WRKSBSJOB, displays jobs by subsystem name.

We can use the Work with User Jobs command, WRKUSRJOB, to segregate jobs that a particular user is running, no matter what status they have. Entering WRKUSRJOB without a parameter lists all of our jobs that are currently running or that have ended.  The Status column displays the status of our various jobs. If the Status is OUTQ, then the job is on an output queue. A job on the output queue typically has been completed. Type ‘5’ next to the desired entry and press Enter to see the Work with Job screen for that particular job. Entering the command WRKUSRJOB USER(*ALL) displays all of the jobs for all of the users, and entering the command WRKUSRJOB USER(*ALL) STATUS(*ACTIVE) displays all of the active jobs for all of the users on the system.

We can use the Work with Subsystem Jobs command, WRKSBSJOB, to segregate the jobs that are executing on a particular subsystem. For example, to view all jobs running in subsystem QBASE, we would issue the command WRKSBSJOB SBS(QBASE). This displays a list of active jobs in the subsystem QBASE; we can enter ‘5’ next to any of the listed jobs to work with it in greater detail.

You can view the runtime attributes of a job by running the Work with Job command, WRKJOB. Entering the command WRKJOB JOB(QTCPIP) will display a list of all jobs named QTCPIP. Entering 5 next to the job will take us to the Work with Job screen for that job. QTCIP normally runs in the QSYSWRK subsystem, and is the TCP/IP base program that must be running for any TCP/IP services to be used.

Entering the command WRKJOB JOB(QPWFSERVSD) will display a list of jobs named QPWFSERVSD. The QPWFSERVSD job is a Client Access server job, specifically the job running the file server daemon. Entering ‘1’ next to the job will bring up the Work with Job screen; at the top of this screen are the three elements that make up a job name on the IBM i: the name, the user, and the system-assigned job number. There is a menu of further options below. Entering ‘1’ here will show us the job status attributes.

The Display Job command, DSPJOB, shows information about a job that is in the system, irrespective of whether it is active or inactive. The default for the DSPJOB command is to display the current job, which is our interactive session. Entering ‘1’ at the Display Job screen will show the job status attributes for the selected job.

Network based backup for IBM i and iSeries systems: http://laservault.com/lv-backup/as400-backup-and-recovery-software-about-lvb/

Advertisements
Viewing Active Jobs on the IBM i

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s