This repository has been archived on 2024-04-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
_Elektron_ makes use of PCP to collect performance metrics using the [pcp config](../../config) file.
[pmdumptext](https://pcp.io/man/man1/pmdumptext.1.html) is used to retrieve all the data. The command used to retrieve the performance metrics is shown below (can also be found [here](https://gitlab.com/spdf/elektron/blob/master/pcp/pcp.go#L15)).
The logs are written to a file named _\<logFilePrefix\>\_\<timestamp\>.pcplog_, where
* _logFilePrefix_ is the prefix provided using the `-logPrefix` option.
* _timestamp_ corresponds to the time when _Elektron_ was run.
Use `-pminfo` to obtain information about different performance metrics that can be monitored through Performance Co-Pilot. Please see [pminfo doc](https://pcp.io/man/man1/pminfo.1.html) for usage and options.
#### Example PCP log
Assume we want to retrieve the following performance metrics collected from one host, _myhost_.<br>
* System CPU time
* User CPU time
Then the PCP config file would be as shown below.
```
myhost:kernel.all.cpu.user
myhost:kernel.all.cpu.sys
```
When we run the `pmdumptext` command mentioned above for 5 seconds, the PCP log from _Elektron_ would be as shown below.
It is also possible to measure the power consumption of CPU, DRAM etc., through the use of RAPL hardware counters.
When running the power capping strategies, [Extrema](../PowerCappingStrategies.md) and [Progressive Extrema](../PowerCappingStrategies.md), the following performance metrics MUST be included in the PCP config file.
Note that the power readings are retrieved for each processor on each worker node. For example, if you have two processors on a machine (hostname = _myhost_), then the PCP log for CPU and DRAM power readings would contain the following headers.