May 2005
Intermediate to advanced
738 pages
18h 22m
English
Example A-5 shows the source code for the spmi_data.c program.
/* 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 */ /*====================== ... |
Read now
Unlock full access