The simple core
The simple
core is the core plugin used by default by the vJoule service. It
read the consumptions retreived using the sensors, and dump the results into
files. It can monitor four different kind of sensor plugins cpu
, gpu
, ram
and pdu
.
Result files
A result directory is created, in which five files cpu
, ram
, gpu
,
pdu_energy
and pdu_power
can be found in the result directory (by default
/etc/vjoule/results/
):
cpu
: the consumption of energy of the CPU(s) in joules since the start of the serviceram
: the consumption of energy of the RAM in joules since the start of the servicegpu
: the consumption of energy of the GPU(s) in joules since the start of the servicepdu_energy
: the consumption of energy of the machine, according to the PDU in joules since the start of the servicepdu_power
: the current power consumption measured by the PDU in watts.
Usage
A default configuration and explanation of the simple
core plugin can be
acquired by running the command vjoule_service --ph simple
.
For API usage
The configuration of the simple
core plugin takes the parameter freq
. This
parameter defines the number of iterations per second of reading from the
sensors and writing the results. However, when using an API, reading at a given
frequency can be a bit laborious and may lead to inaccurate results. For that
reason, the APIs are able to trigger the vjoule service, and no longer rely on
the service frequency. If the service is only to be used within an API (no
vjoule top
), the frequency can be set to 0.
Default configuration
[sensor]
freq = 1 # frequency of update in hertz (the higher the faster)
log-lvl = "info" # debug < success < info < warn < error < none
log-path = "/etc/vjoule/log" # log file (empty means stdout)
core = "simple" # the name of the core plugin to use for the sensor
# the directory in which result will be written
output-dir = "/etc/vjoule/results"
# if true mount the result directory in tmpfs (less i/o generated by vjoule)
mount-tmpfs = true
# following configuration is optional
[cpu] # configuration to enable CPU energy reading
name = "rapl" # rapl plugin for compatible intel or amd cpus
[ram] # configuration to enable RAM energy reading
name = "rapl" # rapl plugin for compatible intel or amd cpus
[gpu:0] # configuration to enable GPU energy reading
name = "nvidia" # nvidia plugin for nvidia GPUs
# A machine can have different GPU from different constructors
# For example a integrated GPU, and an nvidia GPU card
[gpu:1] # configuration to enable GPU energy
name = "rapl" # rapl plugin form compatible intel or amd cpus
[pdu] # configuration to enable smart PDU reading
name = "yocto" # the yocto plugin to read YoctoWatt PDU consumption
On the other hand the flag mount-tmpfs
will make the divider
plugin mount
the result directory in tmpfs, to avoid making I/O access when writting the
result.