This recipe will show you how to visualize using pmchart
and command-line tools to monitor your CPU's performance. We will have a look at the following metrics:
kernel.all.cpu.wait.total
kernel.all.cpu.irq.hard
kernel.all.cpu.irq.soft
kernel.all.cpu.steal
kernel.all.cpu.sys
kernel.all.cpu.user
kernel.all.cpu.nice
kernel.all.cpu.idle
This will show you how to create the text and graphical representation of performance data. Perform the following steps:
localhost
. Execute the following command:~]# pmdumptext -H -t 1 -i -l kernel.all.cpu.wait.total kernel.all.cpu.irq.hard kernel.all.cpu.irq.soft kernel.all.cpu.steal kernel.all.cpu.sys kernel.all.cpu.user kernel.all.cpu.nice kernel.all.cpu.idle -h localhost
pmchart
to display live data called cpu_stack.conf
with the following contents:#kmchart version 1 chart style stacking antialiasing off plot color #aaaa7f metric kernel.all.cpu.wait.total plot color #008000 metric kernel.all.cpu.irq.hard plot color #ee82ee metric kernel.all.cpu.irq.soft plot color #666666 metric kernel.all.cpu.steal plot color #aa00ff metric kernel.all.cpu.user plot color #aaff00 metric kernel.all.cpu.sys plot color #aa5500 metric kernel.all.cpu.nice plot color #0000ff metric kernel.all.cpu.idle
You will notice that I don't use all the metrics in the graph as some of the metrics are combined with one another.
pmchart
to plot a live chart for guest.example.com
, as follows:~]# pmchart -h guest.example.com -c cpu_stack.conf