O'Reilly logo

AIX 5L Practical Performance Tools and Tuning Guide by IBM Redbooks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

spmi_dude.c

Example A-4 shows the source code for the spmi_dude.c program.

Example A-4. spmi_dude.c source code
#include <stdio.h> #include <stdlib.h> #include <signal.h> #include <sys/Spmidef.h> #if defined(DEBUG) #define PDEBUG(x,y) printf(x,y) #else #define PDEBUG(x,y) #endif extern errno; extern charSpmiErrmsg[]; extern intSpmiErrno; /* * Since we need this structure pointer in our cleanup() function * we declare it as a global variable. */ struct SpmiStatSet*SPMIset = NULL; /* * These are the statistics we are interested in monitoring. * To the left of the last slash (/) is the context, to the * right of this slash (/) is the actual statistic within * the context. Note that statistics can have the same * name but belong to different contexts. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required