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. ...

Get AIX 5L Practical Performance Tools and Tuning Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.