A.7. Visual Tracing (using PCP-GUI and pmchart)

Through the use of of the PCP-GUI package, you can use the pmchart graphical utility to plot performance metric values into graphs. The pmchart utility allows multiple charts to be displayed simultaneously, with metrics being sourced from one or more live hosts with alternative options to use metric data from PCP log archives as a source of historical data.
When you open pmchart, the PCP charts GUI displays. On the bottom of the display is the pmtime VCR-like controls. The start/pause button allows you to control the interval in which the metric data is polled and in the event that you are using historical data, the date and time for the metrics.
From the File -> New Chart option in the toolbar, you can select a metric from both the local machine and remote machines by specifying their host name or address and then selecting performance metrics from the remote hosts. Advanced configuration options include the ability to manually set the axis values for the chart and to manually choose the color of the plots.
There are multiple options to take images or record the views created in pmchart. You can save an image of the current view through the File -> Export option in the toolbar. Recording is made available by the Record -> Start option in the toolbar and these recordings can be stopped at a later time using Record -> Stop. After the recording has been terminated, the recorded metrics are archived to be viewed at a later date.
You can customize the pmchart interface to display the data from performance metrics in multiple ways, including line plot, bar graphs and utilization graphs. In pmchart, the main configuration file known as the “view” allows the metadata associated with one or more charts to be saved. This metadata describes all of the chart's aspects including the metrics used and the chart columns. You can create a custom “view” configuration which can be saved using File -> Save View and then loaded again at a later time. For more information about view configuration files and their syntax, see the pmchart(1) man page.
The following example pmchart view configuration describes a stacking chart graph showing the total number of glocks for the mounted GFS2 file system loop1 using the gfs2.glocks metric. We also have a plot graph underneath which plots the average latency for the glock grant, demote and queue requests for the same file system instance “loop1”.
version 1 

chart title "Total number of Glocks /loop1" style stacking antialiasing off
    plot legend "Shared"   metric gfs2.glocks.shared    instance "loop1"
    plot legend "Unlocked" metric gfs2.glocks.unlocked  instance "loop1"
    plot legend "Deferred" metric gfs2.glocks.deferred  instance "loop1"
    plot legend "Exclusive"metric gfs2.glocks.exclusive instance "loop1"

chart title "Average Glock Latency (usecs) /loop1" style plot antialiasing off
    plot legend "Demote" metric gfs2.latency.demote.all instance "loop1"
    plot legend "Grant"  metric gfs2.latency.grant.all  instance "loop1"
    plot legend "Queue"  metric gfs2.latency.queue.all  instance "loop1"