Documentation
IPS_GetInstanceStats
array IPS_GetInstanceStats ()
Returns
An array with the following key => value pairs:
| Index | Type | Description |
|---|---|---|
| Count | integer | Number of loaded instances |
| TotalBytes | integer | Estimated memory usage of the instances in bytes |
Description
This function is intended for internal use only and may change or be removed at any time without notice.
The function returns the memory usage of the instances. The instances whose module is loaded are counted. For each instance the configuration, not yet applied changes of the configuration and the attributes are taken into account, for PHP modules additionally the buffers (SetBuffer).
The bytes are an estimate of the occupied memory based on the stored data structures and not an exact measurement. The value is also recorded in the series "Instances" of IPS_GetStatsHistory.
Example
// Output the memory usage of the instances
print_r(IPS_GetInstanceStats());
/* e.g. returns:
Array
(
[Count] => 187
[TotalBytes] => 1572864
)
*/