Lotus what? Nah mate, the world has moved on.

Thursday, 4 November 2010

IBM i and Enterprise upgrades - Pex Trace

Running a PEX Trace

If you are working on an IBM i (iSeries, AS/400) you can run a PEX trace. This will require a temporary license if you do not have it.

Performance Explorer (PEX) also known as iDoctor will collect all requests to CPU on a system.

This information can be reviewed to determine which processes consume the most CPU on the System.

To collect the data, a 5250 session to the system under review must be available.

1. First a collection must be defined.

Here are some examples:


The top command creates a new Performance collection called BESTEST, This command will run the trace against all jobs on the system. You can optionally choose to trace a single job by modifying the JOB parameter.

ADDPEXDFN DFN(BESTEST) TYPE(*TRACE) JOB((*ALL)) TASK(*ALL) MAXSTG(500000) INTERVAL(1) TRCTYPE(*SLTEVT) SLTEVT(*YES) BASEVT((*PMCO *NONE *FORMAT2))

ADDPEXDFN DFN(TPROF_CPU) TYPE(*TRACE) JOB(*ALL) TASK(*ALL) MAXSTG(100000) INTERVAL(1) TRCTYPE(*SLTEVT) SLTEVT(*YES) BASEVT(*PMCO) TEXT('TPROF PEX Trace')

ADDPEXDFN DFN(TPROFRC5I) TYPE(*TRACE) TASK(*ALL) MAXSTG(100000) INTERVAL(1) TRCTYPE(*SLTEVT) SLTEVT(*YES) BASEVT((*PMCO))

ADDPEXDFN DFN(MYCORPTASKSWT) TYPE(*TRACE) JOB((*ALL)) TASK(*ALL) MAXSTG(500000) TRCTYPE(*TASKSWT) TEXT('TASKSWT Pex Trace')

ADDPEXDFN DFN(MYCORPTASKSWT) TYPE(*TRACE) JOB((*ALL)) TASK(*ALL) MAXSTG(500000) TRCTYPE(*TASKSWT) TEXT('Task switch trace for pnovec contention')

ADDPEXDFN DFN(TPROF_CPU) TYPE(*TRACE) JOB((*ALL)) TASK(*ALL) MAXSTG(500000) INTERVAL(1) TRCTYPE(*SLTEVT)
SLTEVT(*YES) BASEVT((*PMCO)) TEXT('Tprof pex')

These definitions only need to be created once. Unless development changes the PEX criteria these do not need to be updated or recreated.

2. Create the libraries to store the data

CRTLIB nameoflib

3. Start the data collection.

When a slowdown occurs or when ready you need to start the PEX trace

STRPEX SSNID(trac1210) DFN(BESTEST)
STRPEX SSNID(nameoflib) DFN(TPROF_CPU)
STRPEX SSNID(nameoflib2) DFN(MYCORPTASKSWT)
STRPEX SSNID(SLOWDOWN) DFN(MYCORPTASKSWT)

This command starts the collection.

4. When the slowdown passes wait 5 to 10 minutes end the trace.

ENDPEX SSNID(trac1210)
ENDPEX SSNID(nameoflib) DTALIB(nameoflib)
ENDPEX SSNID(nameoflib2) DTALIB(nameoflib2)
ENDPEX SSNID(SLOWDOWN) DTALIB(SLOWDOWN) TEXT('SLOWDOWN ON LPAR ')

This command ends the trace, note this may take a long time to end. To avoid performance impact the trace is designed to have minimal impact during collection, as a result ending the trace is costly.

5. Once the PEX Trace has been ended the data needs to be sent to IBM

After ending the trace, you now have a collection in the library QPEXDATA to review. This library must be saved and sent to IBM for review. Here is an example. Your settings may differ.

Substitute the SLOWDOWN with the name of your Library.

wrklib
CRTSAVF FILE(QGPL/SLOWDOWN) TEXT('Save file for PEX trace')
SAVLIB LIB(SLOWDOWN) DEV(*SAVF) SAVF(QGPL/SLOWDOWN)
ftp testcase.software.ibm.com
anonymous
youremail@ibm.co.uk
bin
cd as400
cd toibm
lcd qgpl
put qgpl/slowdown slowdown.savf

Sending to support? Here is what IBM will do:

The data is sent to IBM rochester where it is loaded on any of four systems.

Install iDoctor for IBM i. You can find it here with its requirements:

https://www-912.ibm.com/i_dir/idoctor.nsf/downloadoptions.html

Start the iDoctor client and connect to the system you restored the data on with the correct authority.

Now analyze the PEX trace using the tools and interpret the data. Sounds easy?

In summary

CRTLIB TPROFSLOW
STRPEX SSNID(TPROFCPU) DFN(TPROF_CPU)
ENDPEX SSNID(TPROFCPU) DTALIB(TPROFSLOW) TEXT('TPROF DATA ON LPAR2p2 ')


How to take a Performance Explorer (PEX) trace on a single Domino job on IBM

1. Identify the Domino job utilizing a lot of CPU. Write down the job name, job user, and job number. For example:

job name = HTTP job user = QNOTES job number = 123456

2. Create a library to store the PEX data using the following command:

CRTLIB LIB(PEXHOLD)

3. Create a PEX definition specific to the job identified in step 1:

ADDPEXDFN DFN(JOBCPU) TYPE(*TRACE) JOB((123456/QNOTES/HTTP)) MAXSTG(500000) INTERVAL(1) TRCTYPE(*SLTEVT) SLTEVT(*YES) BASEVT((*PMCO *NONE *FORMAT2))

4. Start the PEX trace. Let the trace run for 3 to 5 minutes while the CPU is high.

STRPEX SSNID(CPU1) DFN(JOBCPU)

5. End the PEX trace. Because the ENDPEX can run a long time, it is recommended to run this command in batch:

SBMJOB CMD(ENDPEX SSNID(CPU1) DTALIB(PEXHOLD)) JOB(ENDPEX)

6. Wait for the ENDPEX batch job to end. Use the WRKSBMJOB to monitor the progress of the job

7. Create a save file to store the data, where xxxxx is your open Lotus PMR number:

CRTSAVF FILE(QGPL/PMRxxxxx)

8. Save the PEX library to the save file created in the previous step:

SAVLIB LIB(PEXHOLD) DEV(*SAVF) SAVF(QGPL/PMRxxxxx)

9. Send this save file to Lotus Support for review.

Capture the following as well:
  • wrksysval qmodel
  • wrksyval qprcfeat
  • print screen of wrksyssts
  • print screen of wrkdsksts

0 comments :

Post a Comment

Thank you for taking the time to comment. Your opinion is important and of value and we appreciate the positive feedback! If you are "Negative Nancy" then please do us, and humanity, a favor, and piss off.

Total Pageviews

Google+ Followers

Pages

Blog Archive

Popular Posts

Recent Comments

Rays Twitter feed

Ads

Web sites come and go and information is lost and therefore some pages are archived. @rayd123 . Powered by Blogger.