You're currently on IBMSystemsMags Archive. Click Here to view our new website

AIX > Administrator > Performance

PerfPMR Part 4: Adding Custom Scripts

AIX scripts

This is the final installment in a four-part series on using PerfPMR. Read part one here,  part two here and part three here

In my concluding article on PerfPMR, I’ll introduce you to one of the simplest, yet most useful customizations you can make to the utility.

If you list the scripts that PerfPMR placed in your installation directory, you’ll see one called Viewing this file, you’ll see it looks like a script that specifies a couple trace commands, one a form of the tprof command and the other for filemon. Both commands are commented out. The rest of the script declares things like timings and data locations.

Ignore everything you see in the file. These stanzas are examples of customizations. They show you one way to add your own commands to PerfPMR; I’ll show you another. What we’re after is a way to execute our own scripts during a PerfPMR run, and do it simply.

The only thing you need to know when adding your own commands to PerfPMR is how to concatenate them. The nice thing about is that you can get as fancy – or keep it as simple – as you’d like to get the job done, so the best way to show you how to do this is by example.


As you know by now, PerfPMR does a whole lot of stuff. It runs many of the stats commands, along with different forms of traces and configuration listings. But there are some important things that PerfPMR doesn't do. To my mind, two critical performance diagnostic routines that aren't invoked during a PerfPMR run are a CURT (the CPU Usage Reporting Tool) and a SPLAT (the Simple Performance Lock Analysis Tool). I imagine at some point the PerfPMR developers had to draw a line regarding their feature set to prevent application bloat. If this is the reason these two reports were left out of PerfPMR, I can see the logic behind it. However, I don't know anyone who does a performance deep dive without CURTs and SPLATs, so let’s see how we can get these two back into the mix.

First, we'll only work with the most basic Korn shell syntax. My best advice is to keep your PerfPMR customizations – whether they’re in the file or elsewhere – as simple as possible. That way, if something goes wrong, you’ll be much more likely to track down the cause. Next, any shell script customizations you do add to will go to the bottom of that file. Don’t add them in the existing text, and don’t delete the existing text – you’ll mess up your PerfPMR run if you do. Lastly, and this is important, always declare the full path to any command you add in the file in shell syntax. So as I said, we'll tell PerfPMR to generate a CURT and a SPLAT for this example. Editing your file, add this line to the bottom of the file (you don’t need a newline character; remember, keep it simple):


/usr/bin/gensyms > gensyms.out ; 
/usr/bin/curt -i trace.raw -n gensyms.out -o curt.all -Ptse ; 
/usr/bin/splat -i trace.raw.lock -n gensyms.out -da -sa -o splat.all

Mark J. Ray has been working with AIX for 23 years, 18 of which have been spent in performance. His mission is to make the diagnosis and remediation of the most difficult and complex performance issues easy to understand and implement. Mark can be reached at

Like what you just read? To receive technical tips and articles directly in your inbox twice per month, sign up for the EXTRA e-newsletter here.



2019 Solutions Edition

A Comprehensive Online Buyer's Guide to Solutions, Services and Education.

Achieving a Resilient Data Center

Implement these techniques to improve data-center resiliency.


AIO: The Fast Path to Great Performance

AIX Enhancements -- Workload Partitioning

The most exciting POWER6 enhancement, live partition mobility, allows one to migrate a running LPAR to another physical box and is designed to move running partitions from one POWER6 processor-based server to another without any application downtime whatsoever.

IBM Systems Magazine Subscribe Box Read Now Link Subscribe Now Link iPad App Google Play Store
IBMi News Sign Up Today! Past News Letters