Documentation
IPS_GetSnapshotRingBufferStats
array IPS_GetSnapshotRingBufferStats ()
Returns
An array with the following key => value pairs:
| Index | Type | Description |
|---|---|---|
| Count | integer | Number of messages in the ring buffer |
| TotalBytes | integer | Estimated memory usage of the ring buffer including the messages 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 message ring buffer. In it, IP-Symcon keeps the most recently sent messages, so that clients like the console only need to fetch the changes that occurred since a snapshot. The size of the ring buffer is set with the special switch "MessageRingBufferSize" (default: 8192 messages). If the ring buffer is full, the oldest messages are overwritten, so Count reaches at most this value.
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 "SnapshotRingBuffer" of IPS_GetStatsHistory.
Example
// Output the size of the message ring buffer
print_r(IPS_GetSnapshotRingBufferStats());
/* e.g. returns:
Array
(
[Count] => 8192
[TotalBytes] => 3145728
)
*/