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

Example A-7 shows the source code for the spmi_traverse.c program.

Example A-7. spmi_traverse.c source code
#include <sys/types.h> #include <sys/errno.h> #include <stdio.h> #include <sys/Spmidef.h> extern errno; extern charSpmiErrmsg[]; extern intSpmiErrno; SPMIerror(char *s) { /* We do not want the \n that the SpmiErrmsg have at the * end since we will use our own error reporting format. */ SpmiErrmsg[strlen(SpmiErrmsg)-1] = 0x0; fprintf(stderr,"%s: %s (%d)\n",s,SpmiErrmsg,SpmiErrno); } /* * This subroutine is called when a user interrupts it or * when the main program exits. If called by a signal handler * it will have a value in parameter s. If s is not set, then * it is called when the main program exits. To not have this ...

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