Retrieves global CPU usage statistics.
Perfstat Library (libperfstat.a)
#include <libperfstat.h>
The perfstat_cpu_total subroutine returns global CPU usage statistics in a perfstat_cpu_total_t structure.
The number of structures filled is returned upon successful completion. In AIX 5.1, this will always be 1. Otherwise, a value of -1 is returned and the errno variable is set.
The perfstat_cpu_total subroutine is unsuccessful if one of the
following is true:
EINVAL | One of the parameters is not valid. |
EFAULT | Not enough memory. |
ENOMEM | The string default length is too short. |
The perfstat_cpu_total subroutine is part of the Base Operating System (BOS) runtime.
/usr/include/libperfstat.h Defines standard macros, data types and subroutines.
The perfstat_cpu subroutine, perfstat_memory_total subroutine, perfstat_disk subroutine, perfstat_disk_total subroutine, perfstat_netinterface subroutine, and perfstat_netinterface_total subroutine.