MonItems - between real-time counters and storage
The MonItems class is the bridge between the counters and the storage.
The MemItems class either maps the contents of an existing memory-mapped file into MonItem objects or maps registered MonItem objects into a new or existing memory-mapped file.
If you want to write a utility that accesses the counters and reads their values, see the example that exports the counters in a manner compatible with Prometheus real-time monitoring, p4mon-prometheus-exporter.cc
, which is located inside the Perforce filehost location for p4source.tgz
For more information, see p4 monitor realtime in Helix Core Command-Line (P4) Reference.
Constructor |
---|
MonItems()
|
Methods |
---|
bool Load(const char *file, Error *e)
Loads an existing memory mapped file, registering the |
void Display()
Dumps all the registered |
Returns the first registered |
MonItem *Next(MonItem *counter)
Returns the next registered |