Documentation
IPS_GetSnapshotBufferStats
array IPS_GetSnapshotBufferStats ()
Returns
An array with the following key => value pairs:
| Index | Type | Description |
|---|---|---|
| Count | integer | Number of buffered snapshots |
| TotalBytes | integer | Estimated memory usage of the snapshots 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 size of the snapshot buffer. For querying the differences between two snapshots (e.g. by the console), IP-Symcon buffers every returned snapshot, so that only the differences have to be transferred on the next request. A snapshot is discarded after its use or after 24 hours, at most 10 snapshots are kept.
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 "SnapshotBuffer" of IPS_GetStatsHistory. The series is only sampled once per hour.
Example
// Output the size of the snapshot buffer
print_r(IPS_GetSnapshotBufferStats());
/* e.g. returns:
Array
(
[Count] => 2
[TotalBytes] => 14680064
)
*/