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

Example A-5 shows the source code for the spmi_data.c program.

Example A-5. spmi_data.c source code
/* The following statistics are added by the SpmiPathAddSetStat * subroutine to form a set of statistics: * CPU/cpu0/kern * CPU/cpu0/idle * Mem/Real/%free * PagSp/%free * Proc/runque * Proc/swpque * These statistics are then retrieved every 2 seconds and their * value is displayed to the user. */ #include <sys/types.h> #include <sys/errno.h> #include <signal.h> #include <stdio.h> #include <sys/Spmidef.h> #define TIME_DELAY 2 /* time between samplings */ extern char SpmiErrmsg[]; /* Spmi Error message array */ extern int SpmiErrno; /* Spmi Error indicator */ struct SpmiStatSet *statset; /* statistics set */ /*====================== ...

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