Previous | Contents | Index |
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
RMI$_MODES returns the amount of time, in 10-ms units, spent by all currently active CPUs in all processor modes since the system was booted. Each increment in the returned time for a mode represents an additional 10 ms spent by the CPU in that mode. An active CPU is one that is actively participating in the processor scheduling that the OpenVMS instance performs.
The buffer length field in the item descriptor is dependent on the number of CPUs attached to the system. The size of the buffer passed should be as follows:
n * sizeof ( CPU_struct ) + 4 |
where n is the available CPU count. Use $GETSYI item code SYI$_POTENTIALCPU_CNT to get n, the count of potentially available CPUs. (For details, see the description of the $GETSYI service.)
Data for an individual CPU is returned by means of a CPU_struct structure. Declare the CPU_struct with no member alignment, as in the following example:
#pragma member_alignment save #pragma _nomember_alignment typedef struct _CPU_struct { unsigned char cpu_id; // physical cpu id unsigned int interrupt; // is actually the sum of interrupt and idle1 unsigned int mpsynch; // multi-processor synchronization unsigned int kernel; // kernel mode unsigned int exec; // executive mode unsigned int super; // supervisor mode unsigned int user; // user mode unsigned int reserved; // reserved, will be zero unsigned int idle; // CPU idle }CPU_struct; #pragma member_alignment restore |
For a multiple-CPU system, the data for all active CPUs is returned as an array of type CPU_struct, with the number of elements in the array equal to the number of potentially available CPUs. If a CPU is inactive, the CPU_struct array element corresponding to that CPU contains 0 in all CPU_struct members.
Be sure to allocate a buffer large enough to hold the counters for all available CPUs.
The following code example shows one method for collecting CPU modes:
#include <starlet.h> #include <syidef.h> #include <rmidef.h> #include <efndef.h> #include <iledef.h> #include <iosbdef.h> CPU_struct *cpu_counters = NULL; IOSB myiosb = { 0 }; char *buffer; unsigned long buffer_size; int status; // Set up the $GETSYI item list: potential CPUs and active CPU bitmask // unsigned long CPU_Count = 0; unsigned long long ActiveCPUs = 0; ILE3 SYIitmlst[] = { {sizeof CPU_Count, SYI$_POTENTIALCPU_CNT, &CPU_Count, 0}, {sizeof ActiveCPUs, SYI$_ACTIVE_CPU_MASK, &ActiveCPUs, 0}, {0,0}}; // Get the available CPU count and a bitmask of active CPUs status = SYS$GETSYIW( EFN$C_ENF, NULL, NULL, SYIitmlst, &myiosb, NULL, 0 ); buffer_size = CPU_Count * sizeof( CPU_struct ) + 4; buffer = malloc( buffer_size ); // Set up the $GETRMI item list: CPU modes ILE3 RMIitmlst[] = {{buffer_size, RMI$_MODES, buffer, 0}, {0,0}}; // Call the service status = SYS$GETRMI( EFN$C_ENF, 0, 0, RMIitmlst, &myiosb, NULL, 0 ); . . . status = SYS$SYNCH . . . // THE DATA COUNTERS BEGIN 4 BYTES OFF THE START OF THE BUFFER; // The first 4 bytes of the buffer are reserved for internal use. cpu_counters = (CPU_struct *) ( buffer + 4 ); // Use the counters for all active CPUs for ( int i = 0; i < CPU_Count; i++) { if ( 1 == ( 1 & (ActiveCPUs >> i) ) ) { cpu_counters[i].interrupt --- --- --- } } free( buffer ); |
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes) on Alpha systems and 8 (bytes) on I64 systems.
MSCP_BUFAVL | Current number of free MSCP buffers |
MSCP_BUFSMALL | Smallest MSCP buffer size allowed |
MSCP_BUFWAITCUR | Number of requests currently queued waiting for MSCP buffer memory |
MSCP_BUFWAITPEAK | Maximum number of requests simultaneously queued waiting for MSCP buffer |
MSCP_DSKSRV | Number of MSCP served disks |
MSCP_HSTSRV | Number of MSCP served hosts |
MSCP_LB_FAILCNT | MSCP server's count of failed load-balancing requests |
MSCP_LB_INITCNT | MSCP server's count of load-balancing requests sent |
MSCP_LB_LMLOAD1 | MSCP server's previous interval's load 1 value |
MSCP_LB_LMLOAD2 | MSCP server's previous interval's load 2 value |
MSCP_LB_LMLOAD3 | MSCP server's previous interval's load 3 value |
MSCP_LB_LMLOAD4 | MSCP server's previous interval's load 4 value |
MSCP_LB_LOAD | MSCP server's target load for load-balancing requests |
MSCP_LB_LOAD_AVAIL | MSCP server's current load available value |
MSCP_LB_LOAD_CAP | MSCP server's load capacity value |
MSCP_LB_MONINT | MSCP server's load-monitoring interval size |
MSCP_LB_MONTIME | The time that the last load-balancing monitor pass was made |
MSCP_LB_REQCNT | MSCP server's count of load-balancing requests received from other servers |
MSCP_LB_REQTIME | The time that the last load-balancing request was sent |
MSCP_LB_RESPCNT | MSCP server's count of load-balancing requests to which it responded |
MSCP_LB_RESP | MSCP server's load available from another server |
MSCP_OPCOUNT | Count of I/O transfer requests by remote processors |
MSCP_VCFAIL | Count of virtual cache failures on MSCP-served requests |
MSCP_READ | Count of Read I/O transfer requests by remote processors |
MSCP_WRITE | Count of Write I/O transfer requests by remote processors |
MSCP_FRAGMENT | Count of extra fragments issued by the MSCP server |
MSCP_SPLITXFER | Count of fragmented requests issued by the MSCP server |
MSCP_BUFWAIT | Count of requests that had to wait for MSCP buffer memory |
MSCP_SIZE1 | Count of MSCP-served I/O requests with a length of 1 block |
MSCP_SIZE2 | Count of MSCP-served I/O requests with a length of 2-3 blocks |
MSCP_SIZE3 | Count of MSCP-served I/O requests with a length of 4-7 blocks |
MSCP_SIZE4 | Count of MSCP-served I/O requests with a length of 8-15 blocks |
MSCP_SIZE5 | Count of MSCP-served I/O requests with a length of 16-31 blocks |
MSCP_SIZE6 | Count of MSCP-served I/O requests with a length of 32-63 blocks |
MSCP_SIZE7 | Count of MSCP-served I/O requests with a length of 64 or more blocks |
Because this an array of 35 longwords, the buffer length field in the item descriptor should specify 4 times 35 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
TMSCP_BUFWAIT | Count of requests that had to wait for TMSCP buffer memory |
TMSCP_HSTSRV | Number of TMSCP served hosts |
TMSCP_TAPSRV | Number of TMSCP served tapes |
TMSCP_OPCOUNT | Total operations count |
TMSCP_ABORTCNT | Total abort operations count |
TMSCP_BUFAVAIL | Free TMSCP pool bytes |
TMSCP_ONLINCNT | Count of online tapes |
TMSCP_ACCESSCNT | Total access count |
TMSCP_FLUSHCNT | Total flush count |
TMSCP_RDCOUNT | Count of read I/O requests by remote processors |
TMSCP_WRCOUNT | Count of write I/O requests by remote processors |
TMSCP_VCFAIL | Number of virtual cache failures on TMSCP served requests in location 23 |
TMSCP_FRAGMENT | Extra fragments |
TMSCP_SIZE1 | Count of TMSCP served I/O requests with a length of 1 block |
TMSCP_SIZE2 | Count of TMSCP served I/O requests with a length of 2-3 blocks |
TMSCP_SIZE3 | Count of TMSCP served I/O requests with a length of 4-7 blocks |
TMSCP_SIZE4 | Count of TMSCP served I/O requests with a length of 8-15 blocks |
TMSCP_SIZE5 | Count of TMSCP served I/O requests with a length of 16-31 blocks |
TMSCP_SIZE6 | Count of TMSCP served I/O requests with a length of 32-63 blocks |
TMSCP_SIZE7 | Count of TMSCP served I/O requests with a length of 64 or more blocks |
Because this is an array of 20 longwords, the buffer length field in the item descriptor should specify 4 times 20 (bytes).
Because this number is a quadword, the buffer length field in the item descriptor should specify 8 (bytes).
Because this number is a quadword, the buffer length field in the item descriptor should specify 8 (bytes).
Because this number is a quadword, the buffer length field in the item descriptor should specify 8 (bytes).
Because this number is a quadword, the buffer length field in the item descriptor should specify 8 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes).
Because this number is a longword, the buffer length field in the item descriptor should specify 4 (bytes) on Alpha systems and 8 (bytes) on I64 systems.
1 For compatibility with existing applications, the returned value for interrupt time is the sum of interrupt and idle times. Calculate the actual interrupt time by subtracting the returned value of idle time from the returned value of interrupt time. |
Previous | Next | Contents | Index |