Save metric values to a file

The onperf utility saves collected metrics in a history file.

The onperf utility allows designated metrics to be continually buffered. The data collector writes these metrics to a circular buffer called the data-collector buffer. When the buffer becomes full, the oldest values are overwritten as the data collector continues to add data. The current contents of the data-collector buffer are saved to a history file, as Figure 1 illustrates.
Figure 1. How onperf saves performance data
This figure is described in the previous paragraph.

The onperf utility uses either a binary format or an ASCII representation for data in the history file. The binary format is host-dependent and allows data to be written quickly. The ASCII format is portable across platforms.

You have control over the set of metrics stored in the data-collector buffer and the number of samples. You could buffer all metrics; however, this action might consume more memory than is feasible. A single metric measurement requires 8 bytes of memory. For example, if the sampling frequency is one sample per second, then to buffer 200 metrics for 3,600 samples requires approximately 5.5 megabytes of memory. If this process represents too much memory, you must reduce the depth of the data-collector buffer, the sampling frequency, or the number of buffered metrics.

To configure the buffer depth or the sampling frequency, you can use the Configuration dialog box. For more information about the Configuration dialog box, see The graph-tool Configure menu and the Configuration dialog box.

Copyright© 2018 HCL Technologies Limited