Retrieves global memory usage statistics.
Perfstat Library (libperfstat.a)
#include <libperfstat.h>
The perfstat_memory_total subroutine returns global memory usage statistics in a perfstat_memory_total_t structure.
To get statistics that are global to the whole system, the name parameter must be set to NULL, the userbuff parameter must be allocated, and the desired_number parameter must be set to 1.
Upon successful completion, the number of structures filled is returned. This will always be 1. If unsuccessful, a value of -1 is returned and the errno global variable is set.
The perfstat_memory_total subroutine is unsuccessful if the following is true:
EINVAL | One of the parameters is not valid. |
The libperfstat.h file defines standard macros, data types, and subroutines.
perfstat_netbuffer Subroutine, perfstat_cpu Subroutine, perfstat_cpu_total Subroutine, perfstat_disk Subroutine, perfstat_diskadapter Subroutine, perfstat_disk_total Subroutine, perfstat_netinterface Subroutine, perfstat_netinterface_total Subroutine, perfstat_pagingspace Subroutine, and perfstat_protocol Subroutine.
Perfstat API in Performance Tools and APIs Technical Reference.