We need to keep an eye out on global system values. The ones that are particularly of interest are the following:
kernel.all.pswitch
kernel.all.nprocs
kernel.all.load
I'll show you a way to display both text-based and graphical output. Here are the steps:
guest.example.com
host by executing the following command:~]# pmdumptext -H -t 1 -i -l kernel.all.pswitch kernel.all.nprocs kernel.all.load -h guest.example.com
pmchart
to display live data called system.conf
with the following contents:#kmchart version 1 chart style plot antialiasing off plot color #ffff00 metric kernel.all.pswitch chart style plot antialiasing off plot color #ffff00 metric kernel.all.nprocs chart style plot antialiasing off plot color #ffff00 metric kernel.all.load instance "1 minute" plot color #ff924a metric kernel.all.load instance "5 minute" plot color #ff0000 metric kernel.all.load instance "15 minute"
pmchart
to plot a live chart for guest.example.com
via the following command:~]# pmchart -h guest.example.com -c system.conf
The preceding examples are based on "live" data; however, you're not limited to live data. You could increase the interval of pmlogger
in order to get more data about a troublesome system and then take a look at the generated data afterwards. With other tools, you'd have to use additional tools through cronjob and so on, while PCP allows you to do both.
guest.example.com
for November 1, 2015 between 15:30
and 16:30
with a 5-minute interval via the following command:~]# pmdumptext -H -t 5m -i -l -S @15:30 -T @16:30 kernel.all.pswitch kernel.all.nprocs kernel.all.load -a /var/log/pcp/pmlogger/guest.example.com/20151101
pmchart
, as follows:~]# pmchart -a /var/log/pcp/pmlogger/guest.example.com/20151101 -c system.conf -S @15:30 -T @16:30 -W -o output.png