|
|||||||
|
|
![]() |
|
|
Admin Alert: Alternatives to WRKACTJOB by Joe Hertvik I've always found the Work with Active Jobs (WRKACTJOB) command is a good resource for troubleshooting iSeries or AS/400 system activity problems. But WRKACTJOB has a reputation for being a resource hog, so many administrators are hesitant to use it. Luckily, there are alternative green-screen commands that can also help you retrieve OS/400 job data. And some of these commands parse WRKACTJOB-like information in ways that WRKACTJOB doesn't. So when you're looking for an alterative to WRKACTJOB or for a better way to get system and job information in an OS/400 green-screen session, here's my list of commands to try. Use the Work with System Activity (WRKSYSACT) command to view system activity. According to IBM, WRKSYSACT allows you to view and collect performance data, in real time, for any active system job or task. As a bonus, WRKSYSACT displays its information in a more compact format than WRKACTJOB, including the current average CPU usage for all active processors, as well as the maximum and minimum CPU usage during the time period that was measured. But it's really great for finding active jobs that are OS/400 resource hogs. WRKSYSACT also displays a list of active jobs, with the job that has the highest CPU usage at the top and the one with the lowest usage at the bottom. Unlike WRKACTJOB, the WRKSYSACT command only lists jobs that are using system resources, so the list isn't cluttered with inactive jobs. But the best part is that WRKSYSACT refreshes its performance collection data every five seconds, and you can press the F19 key for an automatic refresh. This means that if your system is starting to thrash, you can bring up WRKSYSACT and have it show you which jobs have the highest CPU usage over a number of intervals. You can't do that quickly with WRKACTJOB, and this feature is the primary benefit in using the WRKSYSACT command. To view all jobs submitted by a specific user, try the Work with User Jobs (WRKUSRJOB) command. If you wanted to list all jobs submitted by user Joe, you would run WRKUSRJOB as follows: WRKUSRJOB USER(JOE) And WRKUSRJOB lists all jobs submitted by user Joe that are active, waiting on a job queue, or are finished and have spool files sitting in an output queue. WRKUSRJOB also contains parameters for listing user jobs solely by job location (active, on a job queue, or in an output queue) or for displaying just the interactive or batch jobs submitted by the user. Of course, if you're just looking for any spool files generated by jobs running under a certain user profile, try the Work with Spooled Files (WRKSPLF) command. Run without parameters, WRKSPLF displays all the spool files generated by the signed-on interactive user. But if you run WRKSPLF with a specific user profile listed in the user (SELECT) parameter, it will list all spool files for that user. So if I wanted to see the spool files generated by user Joe, I would run the command this way: WRKSPLF SELECT(JOE) Use the Display Job (DSPJOB) or Work with Job (WRKJOB) command to display a specific job. Either command displays the current interactive job you're running. However, if you run the job with a specific job name, it will show jobs that ran under that name. So if I wanted to look at all of my QZDASOINIT jobs, which are used by remote computers for OS/400 database access, I could run DSPJOB or WRKJOB in the following ways: DSPJOB JOB(QZDASOINIT) Or WRKJOB JOB(QZDASOINIT) If there's a single job with this name, the commands show the information about that job. If there are multiple jobs with the specified name, the commands show a list of the selected jobs and ask you to select the job you want to view. If you want to view CPU usage, you can also use the Work with System Status (WRKSYSSTS) command. This old stalwart is nice because it shows CPU usage and the percentage of database capability used. You also can find out the total number of jobs running on your system, how much disk space is used, and the database faults and pages for each storage pool. If you only want to display the jobs currently running in one subsystem, try using the Work with Subsystem Jobs (WRKSBSJOB) command. If you wanted to view all interactive jobs in subsystem QINTER, for example, you could run WRKSBSJOB this way: WRKSBSJOB SBS(QINTER) The downside of using WRKSBSJOB is that it doesn't show the same statistics as WRKACTJOB. You won't see CPU usage for each job or the elapsed number of interactions, the response time, or the auxiliary I/O on this screen. You don't have to reach for WRKACTJOB every time you want to retrieve job and system information. There are a number of valid commands that provide the same information (and more, in some cases) that WRKACTJOB gives you.
|
Editor
Contact the Editors |
| Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved. |