Obtaining Process information on AIX

I have written a program to collect some performance metrics on and AIX box, but I'm having difficultly getting the process information.

I'm lead to believe that I'm not getting the correct information because I'm trying to run the program on AIX 5.1 (5100-03), but I'm not convinced as the documentation indicates that I should be able to get hold of this information.

If anyone can compile and run the attached source file on any 5L version I would be very grateful. You'll need an ANSI C compiler (I use GCC) and when compiling you need to include the library libperfstat.a. In gcc, the compile syntax would be something like:

usr/local/bin/gcc /usr/AIXTestv4.c -L /lib libperfstat.a -o /usr/AIXTestv4

To run the program I'd use something like

./AIXTestv4

This will create a file called diagdata in the directory it is executed from. I'd like to see this file and please let me know which version of AIX you're running.

Many thanks

Stuart