![]() |
LIKWID
|
likwid-perfscope
likwid-perfscope
is a command line application written in Lua that uses the timeline daemon mode of likwid-perfctr
to create on-the-fly pictures with the current measurements. It uses the feedGnuplot Perl script to send the current data to gnuplot. In order to make it more convenient for users, preconfigured plots of interesting metrics are embedded into likwid-perfscope
. Since the plot windows are normally closed directly after the execution of the monitored applications, likwid-perfscope
waits until Ctrl+c is pressed.
Option | Description |
---|---|
-h, –help | Print help message. |
-v, –version | Print version information. |
-a, –all | Print available predefined plot configurations for current processor. |
-d, –dump | Print measurements to stdout. |
-p, –plotdump | Use feedGnuplots feature to dump plot configuration and its data to stdout. |
-c <arg> | Defines the CPUs that should be measured See CPU_expressions on the likwid-pin page for information about the syntax. |
-C <arg> | Defines the CPUs that should be measured and pin the executable to the CPUs See CPU_expressions on the likwid-pin page for information about the syntax. |
-t, –time <time> | Specify the measurement time for each plot. <time> is handled over to likwid-perfctr with the -t option. Examples for <time> are 1s, 250ms, 500us. |
-g, –group <arg> | Specify a predefined plot with optional changes or an eventset with plot configuration. See plot_configuration for details. |
-r, –range <arg> | Specify the amount of data points that should be visible in the plots. Often refered to as sliding window. |
–host <arg> | Connect to <arg> via ssh and execute likwid-perfctr and the application there. The plots are created on the local machine. Often used if measured on hosts without X11 or GnuPlot. |
likwid-perfscope
extends the format of the eventset option of likwid-perfctr
to make it more conveniet for the users. It accepts either a plot configuration of interesting metrics which are embedded into likwid-perfscope
or a custom eventset suitable for likwid-perfctr
extended by the plot configuration. A plot configuration can be set with key=value pairs separated by ':' and has to contain at least a definition of a formula for plotting. If specifyed a predefined plot configuration, the configuration can be changed. Options for the plot configuration:
Option | Description |
---|---|
title=<string> TITLE=<string> | Use <string> as title for the plot. The string has to be quoted if it contains spaces. No ':' are allowed in the string |
xtitle=<string> XTITLE=<string> | Use <string> as label for the x-axis. The default label is 'Time'. The string has to be quoted if it contains spaces. No ':' are allowed in the string |
ytitle=<string> YTITLE=<string> | Use <string> as label for the left y-axis. The string has to be quoted if it contains spaces. No ':' are allowed in the string |
<string>=<string> | Use the first <string> as legend entry and the second <string> as input forumla for the plot. The result is printed over the run time. The names of the specified counters can be used as variables in the formula. Additional variables are 'time' for the measurement time and 'inverseClock' for the inverted clock frequency. No spaces are allowed in the formula. |
y2title=<string> Y2TITLE=<string> y2title=<id-string> Y2TITLE=<id-string> | Use <string> as label for the right y-axis. If <id-string> is given, the formula with id is associated with the y2-axis. If used with predefined plot configurations, be aware that the formula 1 is part of the plot configuration. If no id is given, the y2-axis is associated with the last given formula. The string has to be quoted if it contains spaces. No ':' are allowed in the string |
likwid-perfscope -g L3_BAND -C 0-2 -t 1s ./a.out
./a.out
to CPUs 0,1,2 and use the predefined plot configuration L3_BAND
The plot is updated ever second. likwid-perfscope -g L3_BAND:TITLE="My Title" -C S0:1 -t 500ms ./a.out
./a.out
to CPU 1 on Socket 0 and use the predefined plot configuration L3_BAND
but change the title for the plot to "My Title". likwid-perfscope -g INSTR_RETIRED_ANY:FIXC0,CPU_CLK_UNHALTED_CORE:FIXC1,CPI=FIXC0/FIXC1:YTITLE="CPI" -C 0 –time 2s ./a.out
./a.out
to CPUs 0 and use the custom event set INSTR_RETIRED_ANY:FIXC0,CPU_CLK_UNHALTED_CORE:FIXC1
. The last event set entry specifies custom plot options. The plotted formula is FIXC0/FIXC1
and the plot title and legend entry is set to 'CPI'. likwid-perfscope -g L3_BAND,CPI=FIXC0/FIXC1:Y2TITLE="2-Cycles per Instruction" -C 0 –time 2s ./a.out
./a.out
to CPU 0 and use the predefined plot configuration L3_BAND
to measure every 2 seconds. Additionally, a formula FIXC0/FIXC1
with the name CPI
is given. The right y-axis is associated to the given function and labeled with Cycles per Instruction
. The formula ID 2 is not needed in this case as the default behavior is to associate the right y-axis to the last formula given. */