Home > AS/400 Tips > iSeries administrator tips > Tapping WRKSYSACT to collect performance data
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

Tapping WRKSYSACT to collect performance data


Dan Reusche
Rating: -4.59- (out of 5)

Anyone who has used the Work with System Activity (WRKSYSACT) command can tell you how useful it is to identify jobs in real time that are using too many system resources, usually CPU. What you may not know is that you can also run WRKSYSACT in batch to collect data about how well your system is performing.

When you run WRKSYSACT in batch, data is collected to a default file, or one that you specify, and later you can run another command called Print Activity Report (PRTACTRPT) against the collected data. There are a variety of options in the PRTACTRPT command that allow you to view the data a number of ways so that you can find jobs that may not be performing optimally.

More Information


[IMAGE]

RELATED CONTENT
Systems Management Tools
Strategies for securing IBM i production files
Legacy AS/400 and new IBM i products both featured at COMMON
Translating Linux for IBM i admins: User profile commands
AS/400 lessons from the past, present, and future: A holiday tale
How to: Monitoring job activity on the AS/400
Checking if a local port is used by another job on AS/400
How to: Reduce the percentage of ASP used on the AS/400
Changing BRMS configurations for new naming conventions for i5
AS/400 system values quiz
DAYSPAST CLLE program for AS/400: Compares object creation date with today's date

iSeries administrator tips
V6R1 upgrade planning checklist
Connecting multiple iSeries systems through DDM
Analyze the health of your IBM i server with iScore
Researching high availability for your System i shop
Translating Linux for IBM i admins: Using GUI to make it easy
Translating Linux for IBM i admins: Working with jobs and networking
OpenOffice: What to know before making the transition from Microsoft Office
OpenOffice: An enterprise open source solution
Database performance comparisons on IBM i
Translating Linux for IBM i admins: User profile commands

Performance
Will overloaded discs impact iSeries performance?
Extend storage capacity on an IBM i without negatively effecting system performance
Database drivers on the i: MySQL vs. IBM Toolbox
Performance tuning for IBM i: The basics and beyond
IBM releases new Power products for the midrange
Top System i admin tips for 2006
Catholic Charities keeps track of homeless with iSeries
i5 error messages: What you need to know
IBM races for clock speed
System shutting down after cleanup

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


of right sidebar code snippet -->

You can run PRTACTRPT repeatedly over the same data collection to view the data in different ways. For example, maybe the job that is causing you trouble is not CPU bound, but rather I/O bound. You would be unlikely to see the job if you sorted the results by CPU, but when sorted by total number of I/O's it may stand out like a sore thumb.

Running WRKSYSACT in batch is often a very good place to start when you suspect you have one or more jobs that are misbehaving. It can be especially useful if you have a performance slowdown at a specific time of the day that occurs regularly. You can schedule a run of WRKSYSACT from the job scheduler on the system to capture data during the slowdown even if it is off shift. Later, you can run the PRTACTRPT command to view the data and find those troublemaker jobs. One warning here, you will need to run PRTACTRPT between successive job scheduler runs of WRKSYSACT because WRKSYSACT erases any data in the specified output file when it starts.

To run WRKSYSACT in batch, type in WRKSYSACT at a command line and press F4 to prompt and then F9 to show all parameters. You will see a screen like the one shown in Figure 1.

Figure 1: The WRKSYSACT command

To have WRKSYSACT submitted to batch, specify the output as *FILE. The interval length is the length of time in seconds that WRKSYSACT will run to capture data, i.e. the length of the collection interval. The number of intervals says how many 'collections' you want to make. The two combined tell you how long the WRKSYSACT command will run.

In the example in Figure 1, I have set the interval length to 1 minute and the number of intervals to 10, thus the command will run for 10 minutes and collect 10 different one-minute sets of data. You can leave the 'Sequence' parameter set to *CPU (you can sort the data later with PRTACTRPT) and the 'Type of information parameter' set to *ALL.

Note that you can use WRKSYSACT to only display licensed internal code tasks by setting the Type of Information parameter to *TASKS, in either batch or interactive mode, which can be handy if you suspect your problem is being caused by IBM code and not your application or, more likely, that your application code is driving some LIC tasks very hard. Tasks in the interactive WRKSYSACT display do not have a user profile.

Only one instance of WRKSYSACT can be run at any given time due to the fact that the command runs at a very high system priority. This rule is observed whether you run WRKSYSACT interactively or in batch, so if you specify a very long batch run, you need to remember that you and other users will be locked out of the command for the duration of that run. If WRKSYSACT is already in use, it will send a message with the userid of the person or job currently running it.

Once you have collected data for one or more intervals, you can run the PRTACTRPT. If you type PRTACTRPT at a command line and hit F4 and then F9, you will see a screen similar to that in Figure 2.

Figure 2: The PRTACTRPT command

The Report Type and Sequence parameters are the most important. In Report Type, *DETAIL will give you the type of output that is shown in Figure 3, which shows the detail for one 60-second interval, sorted by *CPU. In the Sequence parameter, specify the way in which you want the data to be sorted. Use the help for the Sequence parameter to see what each value means. Most times you will want to sort by either *CPU or *TOTALIO, but there are several more choices.

The part of the report that is of most interest is the first section, which in Figure 3 shows the top 10 CPU-consuming jobs on the system for the first collection interval (other collection intervals have been removed from the report to simplify the example, but they would be similar in structure to the interval shown). Note that BAD_JOB used 22% of the available CPU during this interval and did very little I/O. This would probably be a job worth investigating, especially if it showed up as the worst offender in multiple intervals.

Figure 3: A sample report from PRTACTRPT

Try WRKSYSACT in batch; you may just discover some troublesome jobs that you didn't know about.

-----------------------------------
About the author: Dan Reusche is a senior systems administrator at Think Federal Credit Union in Rochester, Minn. He has worked with the IBM AS/400 and iSeries platform since 1988, when he worked at the IBM Rochester Development Lab and support of AS/400 systems used within IBM. You may contact him at dreusche@chartermi.net.


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2010, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts