All Cylinders
 
05_plot
20160428

Plot the load of your Xen cluster

Step 1: data gathering

In prior section you were told to run xentop on domain-0 as follows:

sudo xentop -b -d 1 -i 500 > xt.log

Note: the 500 is the number of seconds this action takes place. You may need to increase/decrease this value according to the situation.

Once the job has run, then filter the data (note: this greps on 'nk' the names of the nodes)

cat xt.log |  cut -c-37  | grep nk > xt_data.txt

This gives the following text file:

  nk01 --b---     111312    0.0  
  nk02 --b---      30264    0.0  
  nk03 --b---      30472    0.0  
  nk04 --b---      30425    0.0  
  nk01 --b---     111312    5.7  
  nk02 --b---      30264    2.1  

Step 2: load data into R

Startup R and load the :

nw=read.table("xt_data.txt",header=F)
cluster=data.frame( nk01=nw[nw$V1=='nk01','V4']
         , nk02=nw[nw$V1=='nk02','V4']
         , nk03=nw[nw$V1=='nk03','V4']
         , nk04=nw[nw$V1=='nk04','V4']
)

Admitted: there should be better way to translate the narrow to wide format, but since we only have a few nodes...

head(cluster)

   nk01 nk02 nk03 nk04
1   0.0  0.0  0.0  0.0
2   5.7  2.1  2.2  2.4
3   5.5  2.2  2.1  2.1
4  61.6  2.1  2.1  2.0
5 165.7  2.3  2.3  2.1
6 167.2  2.1  2.2  2.2

Plot:

par(mar=c(2, 4, 1, 1) ) # bottom, left, top, right
par(mfrow=c(4,1) )
lim=c(0,400)
for ( node in c('nk01','nk02','nk03','nk04') ) {
    plot( nw[nw$V1==node,'V4'], col="blue",type="l", ylim=lim, xlab='', ylab=node)
}

Result

Admire the plot in next section ..

 
Notes by Data Munging Ninja. Generated on nini:sync/20151223_datamungingninja/allcylinders at 2016-10-18 07:19