Skip to content

HOWTO: Save Monitoring Data on the Command Line

maugustosilva edited this page Oct 8, 2019 · 19 revisions

The CloudBench CLI provides a convenient way to extract the data to csv files:

To extract the application performance samples, use monextract all, which will instruct CB to get all the performance data from the Metric Store and dump it on four comma-separated value files (.csv), under a newly created directory named after the experiment (i.e., ~/cbtool/data/<experiment_identifier>). These files are briefly describe as follows:

  1. VM_management_<experiment_identifier>.csv: contains information regarding the provisioning time, capture time, among others, all extracted directly from the cloud management system.

  2. VM_runtime_app_<experiment_identifier>.csv: contains information regarding the application performance, such as latency, throughput and bandwidth, all generated directly from the VM.

  3. VM_runtime_os_<experiment_identifier>.csv: contains OS metrics (CPU, memory, disk I/O, network I/O) all generated by the VM.

  4. HOST_runtime_os_<experiment_identifier>.csv: contains OS metrics (CPU, memory, disk I/O, network I/O) all generated by the HOSTS. It can only be used on Clouds where there is direct access to the hosts (this means that this data cannot be collected on EC2, for instance), and where the Ganglia monitoring tool was manually configured on the hosts.

In addition to the four comma-separated value files (.csv) described above, CBTOOL will also create a helper script, ~/cbtool/data/<experiment_identifier>/plot.sh. This script invokes the CBTOOL - experimental GNU R code - ~/cbtool/util/plot/cbplotgen.R which will produce multiple graphs in PDF format, as exemplified below.

The R code ~/cbtool/util/plot/cbplotgen.R is quite experimental at this point. The dependencies for it are not part of the main CBTOOL installation at this point. They are basically:

  • pdftk (in Ubuntu, apt-get install pdftk is enough)
  • the following R libraries (it is recommended that you install these as root, by executing ~/cbtool/util/plot/cbplotgen.R --help once).

To use the tool (again, unlike the rest of CBTOOL, this tool is not part of any regular regression testing :-), just execute it with the appropriate parameters: ~/cbtool/util/plot/cbplotgen.R -d ~/cbtool/data -e <experiment_name> -c -p -r -l. The -p tells the tool to generate plots using provisioning performance data, the -r, to generate plots using application performance data, and the -l, to overlay provisioning events on the same time axis as the application performance data (useful to show the effect of provisioning on application performance). Check the full range of options by running the tool with the --help command line option.

Here are some example graphs generated with this tool:

This first plot was generated as part of the Experiment 4, from VM_management_<experiment_identifier>.csv

Example mgt

This second and third plots were generated as part of the Experiment 2 also from VM_management_<experiment id>.csv

Example mgt2

Example mgt3

These plots were generated as part of the Experiment 4 from VM_runtime_app_<experiment id>.csv

Example app lat vs time

Example app tput vs time

These plots were generated as part of the Experiment 3, also from VM_runtime_app_<experiment id>.csv

Example app lat vs load

Example app tput vs load

Finally this plot was generated from VM_runtime_os_<experiment_identifier>.csv

Example vm cpu os

These commands (monextract) and the script (cbplotgen.R) are provided just for convenience. The same performance data can be (accessed directly)[https://github.com/ibmcb/cbtool/wiki/HOWTO:-Extract-performance-data-directly-from-the-Metric-Store] from the Metric Store (MongoDB), through a native client/driver.

Clone this wiki locally