examples: add more details to the testenv_example notebook

Modify the testenv_example notebook to present more details
on the functionality provided by the test environment API.

Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com>
diff --git a/ipynb/examples/utils/testenv_example.ipynb b/ipynb/examples/utils/testenv_example.ipynb
index f3b950e..f32a5f0 100644
--- a/ipynb/examples/utils/testenv_example.ipynb
+++ b/ipynb/examples/utils/testenv_example.ipynb
@@ -1,6 +1,23 @@
 {
  "cells": [
   {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Test environment API - TestEnv\n",
+    "\n",
+    "The test environment is primarily defined by the target configuration (see **conf** below).\n",
+    "\n",
+    "One can also pass the test configuration - definining which software setups are needed on the hardware target, and a location for the results of the experiments.\n",
+    "\n",
+    "Parameters:\n",
+    " - target configuration\n",
+    " - test configuration - more information on this can be found in **examples/utils/executor_example.ipynb**\n",
+    " - wipe - if to clean up all previous content from the results folder\n",
+    " - force new - if to create a new TestEnv object even if there is one available"
+   ]
+  },
+  {
    "cell_type": "code",
    "execution_count": 1,
    "metadata": {
@@ -8,12 +25,11 @@
    },
    "outputs": [],
    "source": [
-    "import logging\n",
-    "from conf import LisaLogging\n",
-    "LisaLogging.setup()\n",
-    "\n",
-    "# Comment the follwing line to disable devlib debugging statements\n",
-    "logging.getLogger('ssh').setLevel(logging.DEBUG)"
+    "# One initial cell for imports\n",
+    "import json\n",
+    "import time\n",
+    "import os\n",
+    "import logging"
    ]
   },
   {
@@ -22,18 +38,90 @@
    "metadata": {
     "collapsed": false
    },
-   "outputs": [],
+   "outputs": [
+    {
+     "name": "stderr",
+     "output_type": "stream",
+     "text": [
+      "2016-12-12 11:51:14,376 INFO    : root         : Using LISA logging configuration:\n",
+      "2016-12-12 11:51:14,376 INFO    : root         :   /home/vagrant/lisa/logging.conf\n"
+     ]
+    }
+   ],
    "source": [
-    "import json\n",
-    "import time\n",
-    "import os"
+    "from conf import LisaLogging\n",
+    "LisaLogging.setup()\n",
+    "# For debug information use:\n",
+    "# LisaLogging.setup(level=logging.DEBUG)"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "# Test environment setup"
+    "## Test environment setup"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "**Target configuration**:\n",
+    "\n",
+    "   - **platform** - the currently supported boards are:\n",
+    "        - linux - accessed via SSH connection\n",
+    "        - android - accessed via ADB connection\n",
+    "        - host - ran on local host\n",
+    "        \n",
+    "   - **board** - the currently supported boards are:\n",
+    "        - juno - target is a JUNO board\n",
+    "        - tc2 - target is a TC2 board\n",
+    "        - oak - target is MT8173 platform model\n",
+    "        - pixel - target is a Pixel device\n",
+    "        - hikey - target is a Hikey development platform\n",
+    "        - nexus5x - target is a Nexus 5X device\n",
+    "        \n",
+    "   - **host** - target IP or MAC address\n",
+    "    \n",
+    "   - **device** - target Android device ID\n",
+    "    \n",
+    "   - **port** - port for Android connection - default port is 5555\n",
+    "   \n",
+    "   - **ANDROID_HOME** - path to android-sdk-linux\n",
+    "    \n",
+    "   - **username**\n",
+    "    \n",
+    "   - **password**\n",
+    "    \n",
+    "   - **keyfile** - you can either specify a password or a keyfile\n",
+    "    \n",
+    "   - **rtapp-calib** - these values are not supposed to be specified at the first run on a target.\n",
+    "      After the first run, it's best to fill this array with values reported in the log messges for\n",
+    "      your specific target, for these not to be obtained again.\n",
+    "      \n",
+    "   - **tftp** - tftp server from where the target gets kernel/dtb images at each boot\n",
+    "    \n",
+    "   - **modules** - devlib modules to be enabled\n",
+    "    \n",
+    "   - **exclude_modules** - devlib modules to be disabled\n",
+    "    \n",
+    "   - **tools** - binary tools (available under ./tools/$ARCH/) to install by default\n",
+    "    \n",
+    "   - **ping_time** - wait time before trying to access the target after reboot\n",
+    "    \n",
+    "   - **reboot_time** - maximum time to wait after rebooting the target\n",
+    "    \n",
+    "   - **__features__** - list of test environment features to enable\n",
+    "        - no-kernel - do not deploy kernel/dtb images\n",
+    "        - no-reboot - do not force reboot the target at each configuration change\n",
+    "        - debug - enable debugging messages\n",
+    "     \n",
+    "   - **ftrace** - ftrace configuration\n",
+    "       - events\n",
+    "       - functions\n",
+    "       - buffsize\n",
+    "    \n",
+    "   - **results_dir** - location of results of the experiments\n"
    ]
   },
   {
@@ -47,25 +135,30 @@
     "# Setup a target configuration\n",
     "conf = {\n",
     "\n",
-    "    # Platform and board to target\n",
+    "    # Platform\n",
     "    \"platform\"    : \"linux\",\n",
+    "    # Board\n",
     "    \"board\"       : \"juno\",\n",
     "\n",
     "    # Login credentials\n",
     "    \"host\"        : \"192.168.0.1\",\n",
     "    \"username\"    : \"root\",\n",
-    "    \"password\"    : \"\",\n",
-    "\n",
-    "    # Local installation path\n",
-    "    \"tftp\"  : {\n",
-    "        \"folder\"    : \"/var/lib/tftpboot\",\n",
-    "        \"kernel\"    : \"kern.bin\",\n",
-    "        \"dtb\"       : \"dtb.bin\",\n",
-    "    },\n",
+    "    # You can specify either a password or keyfile\n",
+    "    \"password\"    : \"juno\",\n",
+    "    # \"keyfile\"   : \"/complete/path/of/your/keyfile\",\n",
     "\n",
     "    # Tools to deploy\n",
     "    \"tools\" : [ \"rt-app\", \"taskset\" ],\n",
     "\n",
+    "    \"tftp\"  : {\n",
+    "        \"folder\"    : \"/var/lib/tftpboot/\",\n",
+    "        \"kernel\"    : \"Image\",\n",
+    "        \"dtb\"       : \"juno.dtb\"\n",
+    "    },\n",
+    "\n",
+    "    #\"ping_time\" : \"15\",\n",
+    "    #\"reboot_time\" : \"180\",\n",
+    "\n",
     "    # RTApp calibration values (comment to let LISA do a calibration run)\n",
     "    \"rtapp-calib\" :  {\n",
     "        \"0\": 358, \"1\": 138, \"2\": 138, \"3\": 357, \"4\": 359, \"5\": 355\n",
@@ -82,157 +175,26 @@
     "    \n",
     "    # Where results are collected\n",
     "    \"results_dir\" : \"TestEnvExample\",\n",
-    "    \n",
-    "    # Tune which devlib module are required\n",
-    "    #\"exclude_modules\" : [ \"hwmon\" ],\n",
     "\n",
+    "    #\"__features__\" : \"no-kernel no-reboot\"\n",
     "}"
    ]
   },
   {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "## Test environment initialisation"
+   ]
+  },
+  {
    "cell_type": "code",
-   "execution_count": 4,
+   "execution_count": 5,
    "metadata": {
     "collapsed": false,
     "scrolled": false
    },
-   "outputs": [
-    {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "05:59:27  INFO    :         Target - Using base path: /home/derkling/Code/lisa\n",
-      "05:59:27  INFO    :         Target - Loading custom (inline) target configuration\n",
-      "05:59:27  INFO    :         Target - Devlib modules to load: ['bl', 'hwmon', 'cpufreq']\n",
-      "05:59:27  INFO    :         Target - Connecting linux target with: {'username': 'root', 'host': '192.168.0.1', 'password': ''}\n",
-      "05:59:27  DEBUG   : Logging in root@192.168.0.1\n",
-      "06:00:19  DEBUG   : id\n",
-      "06:00:19  DEBUG   : echo $PATH\n",
-      "06:00:20  DEBUG   : ls -1 /usr/local/bin\n",
-      "06:00:20  DEBUG   : cat /proc/cpuinfo\n",
-      "06:00:20  DEBUG   : sudo -- sh -c 'dmidecode -s system-version'\n",
-      "06:00:21  DEBUG   : if [ -e '/sys/class/hwmon' ]; then echo 1; else echo 0; fi\n",
-      "06:00:21  DEBUG   : ls -1 /sys/class/hwmon\n",
-      "06:00:22  DEBUG   : if [ -e '/sys/class/hwmon/hwmon0/name' ]; then echo 1; else echo 0; fi\n",
-      "06:00:22  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/name'\\'''\n",
-      "06:00:23  DEBUG   : ls -1 /sys/class/hwmon/hwmon0/\n",
-      "06:00:23  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/curr1_label'\\'''\n",
-      "06:00:23  DEBUG   : if [ -e '/sys/class/hwmon/hwmon1/name' ]; then echo 1; else echo 0; fi\n",
-      "06:00:24  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon1/name'\\'''\n",
-      "06:00:24  DEBUG   : ls -1 /sys/class/hwmon/hwmon1/\n",
-      "06:00:25  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon1/curr1_label'\\'''\n",
-      "06:00:25  DEBUG   : if [ -e '/sys/class/hwmon/hwmon10/name' ]; then echo 1; else echo 0; fi\n",
-      "06:00:25  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon10/name'\\'''\n",
-      "06:00:26  DEBUG   : ls -1 /sys/class/hwmon/hwmon10/\n",
-      "06:00:26  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon10/power1_label'\\'''\n",
-      "06:00:27  DEBUG   : if [ -e '/sys/class/hwmon/hwmon11/name' ]; then echo 1; else echo 0; fi\n",
-      "06:00:27  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon11/name'\\'''\n",
-      "06:00:28  DEBUG   : ls -1 /sys/class/hwmon/hwmon11/\n",
-      "06:00:28  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon11/power1_label'\\'''\n",
-      "06:00:28  DEBUG   : if [ -e '/sys/class/hwmon/hwmon12/name' ]; then echo 1; else echo 0; fi\n",
-      "06:00:29  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon12/name'\\'''\n",
-      "06:00:29  DEBUG   : ls -1 /sys/class/hwmon/hwmon12/\n",
-      "06:00:30  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon12/energy1_label'\\'''\n",
-      "06:00:30  DEBUG   : if [ -e '/sys/class/hwmon/hwmon13/name' ]; then echo 1; else echo 0; fi\n",
-      "06:00:30  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon13/name'\\'''\n",
-      "06:00:31  DEBUG   : ls -1 /sys/class/hwmon/hwmon13/\n",
-      "06:00:31  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon13/energy1_label'\\'''\n",
-      "06:00:32  DEBUG   : if [ -e '/sys/class/hwmon/hwmon14/name' ]; then echo 1; else echo 0; fi\n",
-      "06:00:32  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon14/name'\\'''\n",
-      "06:00:33  DEBUG   : ls -1 /sys/class/hwmon/hwmon14/\n",
-      "06:00:33  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon14/energy1_label'\\'''\n",
-      "06:00:33  DEBUG   : if [ -e '/sys/class/hwmon/hwmon15/name' ]; then echo 1; else echo 0; fi\n",
-      "06:00:34  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon15/name'\\'''\n",
-      "06:00:34  DEBUG   : ls -1 /sys/class/hwmon/hwmon15/\n",
-      "06:00:35  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon15/energy1_label'\\'''\n",
-      "06:00:35  DEBUG   : if [ -e '/sys/class/hwmon/hwmon16/name' ]; then echo 1; else echo 0; fi\n",
-      "06:00:35  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/name'\\'''\n",
-      "06:00:36  DEBUG   : ls -1 /sys/class/hwmon/hwmon16/\n",
-      "06:00:36  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/in0_label'\\'''\n",
-      "06:00:37  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/in1_label'\\'''\n",
-      "06:00:37  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/in2_label'\\'''\n",
-      "06:00:38  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/in3_label'\\'''\n",
-      "06:00:38  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/in4_label'\\'''\n",
-      "06:00:38  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/in5_label'\\'''\n",
-      "06:00:39  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/in6_label'\\'''\n",
-      "06:00:39  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/temp1_label'\\'''\n",
-      "06:00:40  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/temp2_label'\\'''\n",
-      "06:00:40  DEBUG   : if [ -e '/sys/class/hwmon/hwmon2/name' ]; then echo 1; else echo 0; fi\n",
-      "06:00:40  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon2/name'\\'''\n",
-      "06:00:41  DEBUG   : ls -1 /sys/class/hwmon/hwmon2/\n",
-      "06:00:41  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon2/curr1_label'\\'''\n",
-      "06:00:42  DEBUG   : if [ -e '/sys/class/hwmon/hwmon3/name' ]; then echo 1; else echo 0; fi\n",
-      "06:00:42  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon3/name'\\'''\n",
-      "06:00:43  DEBUG   : ls -1 /sys/class/hwmon/hwmon3/\n",
-      "06:00:43  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon3/curr1_label'\\'''\n",
-      "06:00:43  DEBUG   : if [ -e '/sys/class/hwmon/hwmon4/name' ]; then echo 1; else echo 0; fi\n",
-      "06:00:44  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon4/name'\\'''\n",
-      "06:00:44  DEBUG   : ls -1 /sys/class/hwmon/hwmon4/\n",
-      "06:00:45  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon4/in1_label'\\'''\n",
-      "06:00:45  DEBUG   : if [ -e '/sys/class/hwmon/hwmon5/name' ]; then echo 1; else echo 0; fi\n",
-      "06:00:45  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon5/name'\\'''\n",
-      "06:00:46  DEBUG   : ls -1 /sys/class/hwmon/hwmon5/\n",
-      "06:00:46  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon5/in1_label'\\'''\n",
-      "06:00:47  DEBUG   : if [ -e '/sys/class/hwmon/hwmon6/name' ]; then echo 1; else echo 0; fi\n",
-      "06:00:47  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon6/name'\\'''\n",
-      "06:00:48  DEBUG   : ls -1 /sys/class/hwmon/hwmon6/\n",
-      "06:00:48  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon6/in1_label'\\'''\n",
-      "06:00:48  DEBUG   : if [ -e '/sys/class/hwmon/hwmon7/name' ]; then echo 1; else echo 0; fi\n",
-      "06:00:49  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon7/name'\\'''\n",
-      "06:00:49  DEBUG   : ls -1 /sys/class/hwmon/hwmon7/\n",
-      "06:00:50  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon7/in1_label'\\'''\n",
-      "06:00:50  DEBUG   : if [ -e '/sys/class/hwmon/hwmon8/name' ]; then echo 1; else echo 0; fi\n",
-      "06:00:50  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon8/name'\\'''\n",
-      "06:00:51  DEBUG   : ls -1 /sys/class/hwmon/hwmon8/\n",
-      "06:00:51  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon8/power1_label'\\'''\n",
-      "06:00:52  DEBUG   : if [ -e '/sys/class/hwmon/hwmon9/name' ]; then echo 1; else echo 0; fi\n",
-      "06:00:52  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon9/name'\\'''\n",
-      "06:00:52  DEBUG   : ls -1 /sys/class/hwmon/hwmon9/\n",
-      "06:00:53  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon9/power1_label'\\'''\n",
-      "06:00:53  DEBUG   : uname -m\n",
-      "06:00:54  DEBUG   : if [ -e '/sys/devices/system/cpu/cpufreq' ]; then echo 1; else echo 0; fi\n",
-      "06:00:54  DEBUG   : sudo -- sh -c 'mount -o remount,rw /'\n",
-      "06:00:54  INFO    :         Target - Initializing target workdir [/root/devlib-target]\n",
-      "06:00:55  DEBUG   : mkdir -p /root/devlib-target\n",
-      "06:00:55  DEBUG   : mkdir -p /root/devlib-target/bin\n",
-      "06:00:55  DEBUG   : /usr/bin/scp -r   /home/derkling/Code/lisa/libs/devlib/devlib/bin/arm64/busybox root@192.168.0.1:/root/devlib-target/bin/busybox\n",
-      "06:00:56  DEBUG   : chmod a+x /root/devlib-target/bin/busybox\n",
-      "06:00:56  DEBUG   : /usr/bin/scp -r   /home/derkling/Code/lisa/libs/devlib/devlib/bin/scripts/shutils root@192.168.0.1:/root/devlib-target/bin/shutils\n",
-      "06:00:56  DEBUG   : chmod a+x /root/devlib-target/bin/shutils\n",
-      "06:00:56  DEBUG   : /usr/bin/scp -r   /home/derkling/Code/lisa/tools/scripts/cgroup_run_into.sh root@192.168.0.1:/root/devlib-target/bin/cgroup_run_into.sh\n",
-      "06:00:57  DEBUG   : chmod a+x /root/devlib-target/bin/cgroup_run_into.sh\n",
-      "06:00:57  DEBUG   : /usr/bin/scp -r   /home/derkling/Code/lisa/tools/arm64/perf root@192.168.0.1:/root/devlib-target/bin/perf\n",
-      "06:01:00  DEBUG   : chmod a+x /root/devlib-target/bin/perf\n",
-      "06:01:00  DEBUG   : /usr/bin/scp -r   /home/derkling/Code/lisa/tools/arm64/taskset root@192.168.0.1:/root/devlib-target/bin/taskset\n",
-      "06:01:00  DEBUG   : chmod a+x /root/devlib-target/bin/taskset\n",
-      "06:01:01  DEBUG   : /usr/bin/scp -r   /home/derkling/Code/lisa/tools/arm64/rt-app root@192.168.0.1:/root/devlib-target/bin/rt-app\n",
-      "06:01:02  DEBUG   : chmod a+x /root/devlib-target/bin/rt-app\n",
-      "06:01:03  DEBUG   : /usr/bin/scp -r   /home/derkling/Code/lisa/tools/arm64/trace-cmd root@192.168.0.1:/root/devlib-target/bin/trace-cmd\n",
-      "06:01:03  DEBUG   : chmod a+x /root/devlib-target/bin/trace-cmd\n",
-      "06:01:03  INFO    : Target topology: [[0, 3, 4, 5], [1, 2]]\n",
-      "06:01:03  DEBUG   : sudo -- sh -c 'cat '\\''/sys/devices/system/cpu/online'\\'''\n",
-      "06:01:04  DEBUG   : cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies\n",
-      "06:01:04  DEBUG   : sudo -- sh -c 'cat '\\''/sys/devices/system/cpu/online'\\'''\n",
-      "06:01:05  DEBUG   : cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_available_frequencies\n",
-      "06:01:05  INFO    :       Platform - Loading default EM [/home/derkling/Code/lisa/libs/utils/platforms/juno.json]...\n",
-      "06:01:05  DEBUG   : /usr/bin/scp -r   /home/derkling/Code/lisa/libs/devlib/devlib/bin/arm64/trace-cmd root@192.168.0.1:/root/devlib-target/bin/trace-cmd\n",
-      "06:01:05  DEBUG   : chmod a+x /root/devlib-target/bin/trace-cmd\n",
-      "06:01:06  DEBUG   : cat /sys/kernel/debug/tracing/available_events\n",
-      "06:01:06  INFO    :         FTrace - Enabled events:\n",
-      "06:01:06  INFO    :         FTrace -   ['cpu_idle', 'sched_switch']\n",
-      "06:01:06  INFO    :         FTrace -   None\n",
-      "06:01:06  INFO    :    EnergyMeter - Scanning for HWMON channels, may take some time...\n",
-      "06:01:06  INFO    :    EnergyMeter - Channels selected for energy sampling:\n",
-      "[CHAN(v2m_juno_energy/energy1, a57_energy), CHAN(v2m_juno_energy/energy1, a53_energy)]\n",
-      "06:01:06  INFO    : Loading RTApp calibration from configuration file...\n",
-      "06:01:06  INFO    : Using RT-App calibration values: {\"0\": 358, \"1\": 138, \"2\": 138, \"3\": 357, \"4\": 359, \"5\": 355}\n",
-      "06:01:06  INFO    :        TestEnv - Set results folder to:\n",
-      "06:01:06  INFO    :        TestEnv -    /home/derkling/Code/lisa/results/TestEnvExample\n",
-      "06:01:06  INFO    :        TestEnv - Experiment results available also in:\n",
-      "06:01:06  INFO    :        TestEnv -    /home/derkling/Code/lisa/results_latest\n"
-     ]
-    }
-   ],
+   "outputs": [],
    "source": [
     "from env import TestEnv\n",
     "\n",
@@ -244,22 +206,16 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "## Attributes"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "The initialization of the test environment pre-initialize some useful<br>\n",
-    "environment variables which are available to write test cases.\n",
+    "## Attributes\n",
     "\n",
-    "These are some of the information available via the TestEnv object."
+    "The initialisation of the test environment pre-initialises some useful environment variables.\n",
+    "\n",
+    "This is some of the information available via the TestEnv object:"
    ]
   },
   {
    "cell_type": "code",
-   "execution_count": 5,
+   "execution_count": 6,
    "metadata": {
     "collapsed": false
    },
@@ -286,7 +242,7 @@
       "        \"4\": 359\n",
       "    }, \n",
       "    \"host\": \"192.168.0.1\", \n",
-      "    \"password\": \"\", \n",
+      "    \"password\": \"juno\", \n",
       "    \"tools\": [\n",
       "        \"rt-app\", \n",
       "        \"taskset\", \n",
@@ -301,9 +257,9 @@
       "    \"board\": \"juno\", \n",
       "    \"__features__\": [], \n",
       "    \"tftp\": {\n",
-      "        \"kernel\": \"kern.bin\", \n",
-      "        \"folder\": \"/var/lib/tftpboot\", \n",
-      "        \"dtb\": \"dtb.bin\"\n",
+      "        \"kernel\": \"Image\", \n",
+      "        \"folder\": \"/var/lib/tftpboot/\", \n",
+      "        \"dtb\": \"juno.dtb\"\n",
       "    }\n",
       "}\n"
      ]
@@ -316,7 +272,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 6,
+   "execution_count": 7,
    "metadata": {
     "collapsed": false
    },
@@ -338,7 +294,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 7,
+   "execution_count": 8,
    "metadata": {
     "collapsed": false
    },
@@ -360,7 +316,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 8,
+   "execution_count": 9,
    "metadata": {
     "collapsed": false
    },
@@ -442,32 +398,6 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 9,
-   "metadata": {
-    "collapsed": false
-   },
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "'/home/derkling/Code/lisa/results/TestEnvExample'"
-      ]
-     },
-     "execution_count": 9,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "# A pre-created folder to host the tests results generated using this\n",
-    "# test environment, notice that the suite could add additional information\n",
-    "# in this folder, like for example a copy of the target configuration\n",
-    "# and other target specific collected information\n",
-    "te.res_dir"
-   ]
-  },
-  {
-   "cell_type": "code",
    "execution_count": 10,
    "metadata": {
     "collapsed": false
@@ -476,7 +406,7 @@
     {
      "data": {
       "text/plain": [
-       "'/data/local/schedtest'"
+       "'/home/vagrant/lisa/results/TestEnvExample'"
       ]
      },
      "execution_count": 10,
@@ -485,8 +415,11 @@
     }
    ],
    "source": [
-    "# The working directory on the target\n",
-    "te.workdir"
+    "# This is a pre-created folder to host the tests results generated using this\n",
+    "# test environment. Notice that the suite could add additional information\n",
+    "# in this folder, like for example a copy of the target configuration\n",
+    "# and other target specific collected information.\n",
+    "te.res_dir"
    ]
   },
   {
@@ -499,11 +432,34 @@
     {
      "data": {
       "text/plain": [
+       "'/data/local/schedtest'"
+      ]
+     },
+     "execution_count": 11,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "# The working directory on the target\n",
+    "te.workdir"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 12,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
        "cluster [[0, 3, 4, 5], [1, 2]]\n",
        "cpu [[0], [1], [2], [3], [4], [5]]"
       ]
      },
-     "execution_count": 11,
+     "execution_count": 12,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -517,22 +473,16 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "## Functions"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "Some methods are also exposed to test developers which could be used to easy\n",
-    "the creation of tests.\n",
+    "## Functions\n",
+    "\n",
+    "Some methods are also exposed to test developers which could be used to ease the creation of tests.\n",
     "\n",
     "These are some of the methods available:"
    ]
   },
   {
    "cell_type": "code",
-   "execution_count": 12,
+   "execution_count": 13,
    "metadata": {
     "collapsed": false,
     "scrolled": true
@@ -544,7 +494,7 @@
        "{0: 358, 1: 138, 2: 138, 3: 357, 4: 359, 5: 355}"
       ]
      },
-     "execution_count": 12,
+     "execution_count": 13,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -556,7 +506,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 13,
+   "execution_count": 14,
    "metadata": {
     "collapsed": false
    },
@@ -576,7 +526,7 @@
        " '/tmp/platform.json')"
       ]
      },
-     "execution_count": 13,
+     "execution_count": 14,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -588,7 +538,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 14,
+   "execution_count": 15,
    "metadata": {
     "collapsed": false,
     "scrolled": false
@@ -598,141 +548,40 @@
      "name": "stderr",
      "output_type": "stream",
      "text": [
-      "06:01:08  INFO    :   HostResolver - Target (00:02:f7:00:5a:5b) at IP address: 192.168.0.1\n",
-      "06:01:08  DEBUG   : sudo -- sh -c 'sleep 2 && reboot -f &'\n",
-      "06:01:08  INFO    :         Reboot - Waiting up to 60[s] for target [192.168.0.1] to reboot...\n",
-      "06:02:13  INFO    :         Target - Devlib modules to load: ['bl', 'hwmon', 'cpufreq']\n",
-      "06:02:13  INFO    :         Target - Connecting linux target with: {'username': 'root', 'host': '192.168.0.1', 'password': ''}\n",
-      "06:02:13  DEBUG   : Logging in root@192.168.0.1\n",
-      "06:02:14  DEBUG   : id\n",
-      "06:02:15  DEBUG   : echo $PATH\n",
-      "06:02:15  DEBUG   : ls -1 /usr/local/bin\n",
-      "06:02:16  DEBUG   : cat /proc/cpuinfo\n",
-      "06:02:16  DEBUG   : sudo -- sh -c 'dmidecode -s system-version'\n",
-      "06:02:16  DEBUG   : if [ -e '/sys/class/hwmon' ]; then echo 1; else echo 0; fi\n",
-      "06:02:17  DEBUG   : ls -1 /sys/class/hwmon\n",
-      "06:02:17  DEBUG   : if [ -e '/sys/class/hwmon/hwmon0/name' ]; then echo 1; else echo 0; fi\n",
-      "06:02:18  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/name'\\'''\n",
-      "06:02:18  DEBUG   : ls -1 /sys/class/hwmon/hwmon0/\n",
-      "06:02:19  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/curr1_label'\\'''\n",
-      "06:02:19  DEBUG   : if [ -e '/sys/class/hwmon/hwmon1/name' ]; then echo 1; else echo 0; fi\n",
-      "06:02:19  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon1/name'\\'''\n",
-      "06:02:20  DEBUG   : ls -1 /sys/class/hwmon/hwmon1/\n",
-      "06:02:20  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon1/curr1_label'\\'''\n",
-      "06:02:21  DEBUG   : if [ -e '/sys/class/hwmon/hwmon10/name' ]; then echo 1; else echo 0; fi\n",
-      "06:02:21  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon10/name'\\'''\n",
-      "06:02:21  DEBUG   : ls -1 /sys/class/hwmon/hwmon10/\n",
-      "06:02:22  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon10/power1_label'\\'''\n",
-      "06:02:22  DEBUG   : if [ -e '/sys/class/hwmon/hwmon11/name' ]; then echo 1; else echo 0; fi\n",
-      "06:02:23  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon11/name'\\'''\n",
-      "06:02:23  DEBUG   : ls -1 /sys/class/hwmon/hwmon11/\n",
-      "06:02:23  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon11/power1_label'\\'''\n",
-      "06:02:24  DEBUG   : if [ -e '/sys/class/hwmon/hwmon12/name' ]; then echo 1; else echo 0; fi\n",
-      "06:02:24  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon12/name'\\'''\n",
-      "06:02:25  DEBUG   : ls -1 /sys/class/hwmon/hwmon12/\n",
-      "06:02:25  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon12/energy1_label'\\'''\n",
-      "06:02:26  DEBUG   : if [ -e '/sys/class/hwmon/hwmon13/name' ]; then echo 1; else echo 0; fi\n",
-      "06:02:26  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon13/name'\\'''\n",
-      "06:02:26  DEBUG   : ls -1 /sys/class/hwmon/hwmon13/\n",
-      "06:02:27  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon13/energy1_label'\\'''\n",
-      "06:02:27  DEBUG   : if [ -e '/sys/class/hwmon/hwmon14/name' ]; then echo 1; else echo 0; fi\n",
-      "06:02:28  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon14/name'\\'''\n",
-      "06:02:28  DEBUG   : ls -1 /sys/class/hwmon/hwmon14/\n",
-      "06:02:28  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon14/energy1_label'\\'''\n",
-      "06:02:29  DEBUG   : if [ -e '/sys/class/hwmon/hwmon15/name' ]; then echo 1; else echo 0; fi\n",
-      "06:02:29  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon15/name'\\'''\n",
-      "06:02:30  DEBUG   : ls -1 /sys/class/hwmon/hwmon15/\n",
-      "06:02:30  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon15/energy1_label'\\'''\n",
-      "06:02:31  DEBUG   : if [ -e '/sys/class/hwmon/hwmon16/name' ]; then echo 1; else echo 0; fi\n",
-      "06:02:31  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/name'\\'''\n",
-      "06:02:31  DEBUG   : ls -1 /sys/class/hwmon/hwmon16/\n",
-      "06:02:32  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/in0_label'\\'''\n",
-      "06:02:32  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/in1_label'\\'''\n",
-      "06:02:33  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/in2_label'\\'''\n",
-      "06:02:33  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/in3_label'\\'''\n",
-      "06:02:33  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/in4_label'\\'''\n",
-      "06:02:34  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/in5_label'\\'''\n",
-      "06:02:34  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/in6_label'\\'''\n",
-      "06:02:35  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/temp1_label'\\'''\n",
-      "06:02:35  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon16/temp2_label'\\'''\n",
-      "06:02:36  DEBUG   : if [ -e '/sys/class/hwmon/hwmon2/name' ]; then echo 1; else echo 0; fi\n",
-      "06:02:36  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon2/name'\\'''\n",
-      "06:02:36  DEBUG   : ls -1 /sys/class/hwmon/hwmon2/\n",
-      "06:02:37  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon2/curr1_label'\\'''\n",
-      "06:02:37  DEBUG   : if [ -e '/sys/class/hwmon/hwmon3/name' ]; then echo 1; else echo 0; fi\n",
-      "06:02:38  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon3/name'\\'''\n",
-      "06:02:38  DEBUG   : ls -1 /sys/class/hwmon/hwmon3/\n",
-      "06:02:38  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon3/curr1_label'\\'''\n",
-      "06:02:39  DEBUG   : if [ -e '/sys/class/hwmon/hwmon4/name' ]; then echo 1; else echo 0; fi\n",
-      "06:02:39  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon4/name'\\'''\n",
-      "06:02:40  DEBUG   : ls -1 /sys/class/hwmon/hwmon4/\n",
-      "06:02:40  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon4/in1_label'\\'''\n",
-      "06:02:41  DEBUG   : if [ -e '/sys/class/hwmon/hwmon5/name' ]; then echo 1; else echo 0; fi\n",
-      "06:02:41  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon5/name'\\'''\n",
-      "06:02:41  DEBUG   : ls -1 /sys/class/hwmon/hwmon5/\n",
-      "06:02:42  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon5/in1_label'\\'''\n",
-      "06:02:42  DEBUG   : if [ -e '/sys/class/hwmon/hwmon6/name' ]; then echo 1; else echo 0; fi\n",
-      "06:02:43  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon6/name'\\'''\n",
-      "06:02:43  DEBUG   : ls -1 /sys/class/hwmon/hwmon6/\n",
-      "06:02:43  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon6/in1_label'\\'''\n",
-      "06:02:44  DEBUG   : if [ -e '/sys/class/hwmon/hwmon7/name' ]; then echo 1; else echo 0; fi\n",
-      "06:02:44  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon7/name'\\'''\n",
-      "06:02:45  DEBUG   : ls -1 /sys/class/hwmon/hwmon7/\n",
-      "06:02:45  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon7/in1_label'\\'''\n",
-      "06:02:46  DEBUG   : if [ -e '/sys/class/hwmon/hwmon8/name' ]; then echo 1; else echo 0; fi\n",
-      "06:02:46  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon8/name'\\'''\n",
-      "06:02:46  DEBUG   : ls -1 /sys/class/hwmon/hwmon8/\n",
-      "06:02:47  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon8/power1_label'\\'''\n",
-      "06:02:47  DEBUG   : if [ -e '/sys/class/hwmon/hwmon9/name' ]; then echo 1; else echo 0; fi\n",
-      "06:02:48  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon9/name'\\'''\n",
-      "06:02:48  DEBUG   : ls -1 /sys/class/hwmon/hwmon9/\n",
-      "06:02:48  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon9/power1_label'\\'''\n",
-      "06:02:49  DEBUG   : uname -m\n",
-      "06:02:49  DEBUG   : if [ -e '/sys/devices/system/cpu/cpufreq' ]; then echo 1; else echo 0; fi\n",
-      "06:02:50  DEBUG   : sudo -- sh -c 'mount -o remount,rw /'\n",
-      "06:02:50  INFO    :         Target - Initializing target workdir [/root/devlib-target]\n",
-      "06:02:50  DEBUG   : mkdir -p /root/devlib-target\n",
-      "06:02:50  DEBUG   : mkdir -p /root/devlib-target/bin\n",
-      "06:02:51  DEBUG   : /usr/bin/scp -r   /home/derkling/Code/lisa/libs/devlib/devlib/bin/arm64/busybox root@192.168.0.1:/root/devlib-target/bin/busybox\n",
-      "06:02:51  DEBUG   : chmod a+x /root/devlib-target/bin/busybox\n",
-      "06:02:51  DEBUG   : /usr/bin/scp -r   /home/derkling/Code/lisa/libs/devlib/devlib/bin/scripts/shutils root@192.168.0.1:/root/devlib-target/bin/shutils\n",
-      "06:02:52  DEBUG   : chmod a+x /root/devlib-target/bin/shutils\n",
-      "06:02:52  DEBUG   : /usr/bin/scp -r   /home/derkling/Code/lisa/tools/scripts/cgroup_run_into.sh root@192.168.0.1:/root/devlib-target/bin/cgroup_run_into.sh\n",
-      "06:02:52  DEBUG   : chmod a+x /root/devlib-target/bin/cgroup_run_into.sh\n",
-      "06:02:52  DEBUG   : /usr/bin/scp -r   /home/derkling/Code/lisa/tools/arm64/perf root@192.168.0.1:/root/devlib-target/bin/perf\n",
-      "06:02:55  DEBUG   : chmod a+x /root/devlib-target/bin/perf\n",
-      "06:02:56  DEBUG   : /usr/bin/scp -r   /home/derkling/Code/lisa/tools/arm64/taskset root@192.168.0.1:/root/devlib-target/bin/taskset\n",
-      "06:02:56  DEBUG   : chmod a+x /root/devlib-target/bin/taskset\n",
-      "06:02:56  DEBUG   : /usr/bin/scp -r   /home/derkling/Code/lisa/tools/arm64/rt-app root@192.168.0.1:/root/devlib-target/bin/rt-app\n",
-      "06:02:56  DEBUG   : chmod a+x /root/devlib-target/bin/rt-app\n",
-      "06:02:57  DEBUG   : /usr/bin/scp -r   /home/derkling/Code/lisa/tools/arm64/trace-cmd root@192.168.0.1:/root/devlib-target/bin/trace-cmd\n",
-      "06:02:57  DEBUG   : chmod a+x /root/devlib-target/bin/trace-cmd\n",
-      "06:02:57  INFO    : Target topology: [[0, 3, 4, 5], [1, 2]]\n",
-      "06:02:57  DEBUG   : sudo -- sh -c 'cat '\\''/sys/devices/system/cpu/online'\\'''\n",
-      "06:02:58  DEBUG   : cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies\n",
-      "06:02:58  DEBUG   : sudo -- sh -c 'cat '\\''/sys/devices/system/cpu/online'\\'''\n",
-      "06:02:59  DEBUG   : cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_available_frequencies\n",
-      "06:02:59  INFO    :       Platform - Loading default EM [/home/derkling/Code/lisa/libs/utils/platforms/juno.json]...\n",
-      "06:02:59  DEBUG   : /usr/bin/scp -r   /home/derkling/Code/lisa/libs/devlib/devlib/bin/arm64/trace-cmd root@192.168.0.1:/root/devlib-target/bin/trace-cmd\n",
-      "06:02:59  DEBUG   : chmod a+x /root/devlib-target/bin/trace-cmd\n",
-      "06:03:00  DEBUG   : cat /sys/kernel/debug/tracing/available_events\n",
-      "06:03:00  INFO    :         FTrace - Enabled events:\n",
-      "06:03:00  INFO    :         FTrace -   ['cpu_idle', 'sched_switch']\n",
-      "06:03:00  INFO    :         FTrace -   None\n",
-      "06:03:00  INFO    :    EnergyMeter - Scanning for HWMON channels, may take some time...\n",
-      "06:03:00  INFO    :    EnergyMeter - Channels selected for energy sampling:\n",
-      "[CHAN(v2m_juno_energy/energy1, a57_energy), CHAN(v2m_juno_energy/energy1, a53_energy)]\n"
+      "2016-12-12 11:56:15,281 INFO    : TestEnv      : Target (00:02:f7:00:5d:d7) at IP address: 192.168.0.1\n",
+      "2016-12-12 11:56:16,087 INFO    : TestEnv      : Waiting up to 360[s] for target [192.168.0.1] to reboot...\n",
+      "2016-12-12 11:57:21,143 INFO    : TestEnv      : Devlib modules to load: ['bl', 'hwmon', 'cpufreq']\n",
+      "2016-12-12 11:57:21,144 INFO    : TestEnv      : Connecting linux target:\n",
+      "2016-12-12 11:57:21,145 INFO    : TestEnv      :   username : root\n",
+      "2016-12-12 11:57:21,146 INFO    : TestEnv      :       host : 192.168.0.1\n",
+      "2016-12-12 11:57:21,146 INFO    : TestEnv      :   password : juno\n",
+      "2016-12-12 11:57:21,147 INFO    : TestEnv      : Connection settings:\n",
+      "2016-12-12 11:57:21,147 INFO    : TestEnv      :    {'username': 'root', 'host': '192.168.0.1', 'password': 'juno'}\n",
+      "2016-12-12 11:57:37,176 INFO    : TestEnv      : Initializing target workdir:\n",
+      "2016-12-12 11:57:37,177 INFO    : TestEnv      :    /root/devlib-target\n",
+      "2016-12-12 11:57:43,908 INFO    : TestEnv      : Topology:\n",
+      "2016-12-12 11:57:43,908 INFO    : TestEnv      :    [[0, 3, 4, 5], [1, 2]]\n",
+      "2016-12-12 11:57:45,155 INFO    : TestEnv      : Loading default EM:\n",
+      "2016-12-12 11:57:45,156 INFO    : TestEnv      :    /home/vagrant/lisa/libs/utils/platforms/juno.json\n",
+      "2016-12-12 11:57:48,681 INFO    : TestEnv      : Enabled tracepoints:\n",
+      "2016-12-12 11:57:48,684 INFO    : TestEnv      :    cpu_idle\n",
+      "2016-12-12 11:57:48,685 INFO    : TestEnv      :    sched_switch\n",
+      "2016-12-12 11:57:48,688 INFO    : EnergyMeter  : Scanning for HWMON channels, may take some time...\n",
+      "2016-12-12 11:57:48,691 INFO    : EnergyMeter  : Channels selected for energy sampling:\n",
+      "2016-12-12 11:57:48,691 INFO    : EnergyMeter  :    BOARDBIG_energy\n",
+      "2016-12-12 11:57:48,692 INFO    : EnergyMeter  :    BOARDLITTLE_energy\n"
      ]
     }
    ],
    "source": [
     "# Force a reboot of the target (and wait specified [s] before reconnect)\n",
-    "te.reboot(reboot_time=60, ping_time=15)"
+    "# Keep in mind that a reboot can be disabled from __features__ in the target configuration\n",
+    "te.reboot(reboot_time=360, ping_time=15)"
    ]
   },
   {
    "cell_type": "code",
-   "execution_count": 15,
+   "execution_count": 18,
    "metadata": {
     "collapsed": false
    },
@@ -784,40 +633,27 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "A special TestEnv attribute is <b>target</b>, which represent a <b>devlib instance</b>.<br>\n",
-    "Using the target attribute we can access to the full set of devlib provided<br>\n",
-    "functionalities. Which are summarized in the following sections."
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
     "\n",
-    "# Access to the devlib API"
+    "## Attributes: target\n",
+    "### Access to the devlib API\n",
+    "\n",
+    "A special attribute of TestEnv is **target**, which represents a devlib instance. Using the target attribute we have access to the full set of devlib provided functionalities. A small set of these are exemplified below. For a more extensive set check the **examples/devlib** notebooks."
    ]
   },
   {
    "cell_type": "code",
-   "execution_count": 17,
+   "execution_count": 16,
    "metadata": {
     "collapsed": false
    },
    "outputs": [
     {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "06:03:01  DEBUG   : echo -n 'Hello Test Environment'\n"
-     ]
-    },
-    {
      "data": {
       "text/plain": [
        "'Hello Test Environment'"
       ]
      },
-     "execution_count": 17,
+     "execution_count": 16,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -829,25 +665,18 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 18,
+   "execution_count": 17,
    "metadata": {
     "collapsed": false
    },
    "outputs": [
     {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "06:03:02  DEBUG   : sudo -- sh -c 'sh -c \"sleep 10\" 1>/dev/null 2>/dev/null &'\n"
-     ]
-    },
-    {
      "data": {
       "text/plain": [
        "''"
       ]
      },
-     "execution_count": 18,
+     "execution_count": 17,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -859,7 +688,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 19,
+   "execution_count": 18,
    "metadata": {
     "collapsed": false
    },
@@ -887,42 +716,19 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 20,
+   "execution_count": 19,
    "metadata": {
     "collapsed": false
    },
    "outputs": [
     {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "06:03:02  DEBUG   : sudo -- sh -c 'cat '\\''/sys/devices/system/cpu/online'\\'''\n",
-      "06:03:03  DEBUG   : sudo -- sh -c 'cat '\\''/sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq'\\'''\n"
-     ]
-    },
-    {
      "name": "stdout",
      "output_type": "stream",
      "text": [
       "big CPUs IDs        :  [1, 2]\n",
       "LITTLE CPUs IDs     :  [0, 3, 4, 5]\n",
-      "big CPUs freqs      : 1100000"
-     ]
-    },
-    {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "06:03:03  DEBUG   : sudo -- sh -c 'cat '\\''/sys/devices/system/cpu/online'\\'''\n",
-      "06:03:04  DEBUG   : sudo -- sh -c 'cat '\\''/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor'\\'''\n"
-     ]
-    },
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "\n",
-      "big CPUs governor   : performance\n"
+      "big CPUs freqs      : 450000\n",
+      "big CPUs governor   : interactive\n"
      ]
     }
    ],
@@ -938,59 +744,45 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "# Sample energy from the target"
+    "## Attributes: emeter (energy meter)\n",
+    "\n",
+    "In order to sample energy from the target:"
    ]
   },
   {
    "cell_type": "code",
-   "execution_count": 21,
+   "execution_count": 20,
    "metadata": {
     "collapsed": false,
     "scrolled": false
    },
    "outputs": [
     {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "06:03:04  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon13/energy1_input'\\'''\n",
-      "06:03:05  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon14/energy1_input'\\'''\n",
-      "06:03:05  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon13/energy1_input'\\'''\n",
-      "06:03:05  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon14/energy1_input'\\'''\n",
-      "06:03:06  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon13/energy1_input'\\'''\n",
-      "06:03:06  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon14/energy1_input'\\'''\n",
-      "06:03:09  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon13/energy1_input'\\'''\n",
-      "06:03:09  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon14/energy1_input'\\'''\n",
-      "06:03:10  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon13/energy1_input'\\'''\n",
-      "06:03:10  DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon14/energy1_input'\\'''\n"
-     ]
-    },
-    {
      "name": "stdout",
      "output_type": "stream",
      "text": [
       "First read:  {\n",
-      "    \"a53\": {\n",
-      "        \"total\": 0.37534899999999993, \n",
-      "        \"last\": 51.372362, \n",
-      "        \"delta\": 0.18520200000000386\n",
+      "    \"BOARDBIG\": {\n",
+      "        \"total\": 0.03712299999999935, \n",
+      "        \"last\": 5.61159, \n",
+      "        \"delta\": 0.019406000000000034\n",
       "    }, \n",
-      "    \"a57\": {\n",
-      "        \"total\": 1.0124409999999955, \n",
-      "        \"last\": 59.688784, \n",
-      "        \"delta\": 0.5027259999999956\n",
+      "    \"BOARDLITTLE\": {\n",
+      "        \"total\": 0.017602000000000118, \n",
+      "        \"last\": 4.954883, \n",
+      "        \"delta\": 0.008766999999999747\n",
       "    }\n",
       "}\n",
       "Second read:  {\n",
-      "    \"a53\": {\n",
-      "        \"total\": 1.7191619999999972, \n",
-      "        \"last\": 52.716175, \n",
-      "        \"delta\": 0.17561400000000305\n",
+      "    \"BOARDBIG\": {\n",
+      "        \"total\": 0.11209199999999964, \n",
+      "        \"last\": 5.686559, \n",
+      "        \"delta\": 0.018203999999999887\n",
       "    }, \n",
-      "    \"a57\": {\n",
-      "        \"total\": 2.4685759999999988, \n",
-      "        \"last\": 61.144919, \n",
-      "        \"delta\": 0.4992990000000006\n",
+      "    \"BOARDLITTLE\": {\n",
+      "        \"total\": 0.06513600000000075, \n",
+      "        \"last\": 5.002417, \n",
+      "        \"delta\": 0.009789000000000492\n",
       "    }\n",
       "}\n"
      ]
@@ -1012,12 +804,14 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "# Configure FTrace for a sepcific experiment"
+    "## Attribute: ftrace\n",
+    "\n",
+    "You can configure FTrace for a specific experiment using the following:"
    ]
   },
   {
    "cell_type": "code",
-   "execution_count": 22,
+   "execution_count": 21,
    "metadata": {
     "collapsed": false
    },
@@ -1026,12 +820,11 @@
      "name": "stderr",
      "output_type": "stream",
      "text": [
-      "06:03:10  DEBUG   : /usr/bin/scp -r   /home/derkling/Code/lisa/libs/devlib/devlib/bin/arm64/trace-cmd root@192.168.0.1:/root/devlib-target/bin/trace-cmd\n",
-      "06:03:11  DEBUG   : chmod a+x /root/devlib-target/bin/trace-cmd\n",
-      "06:03:11  DEBUG   : cat /sys/kernel/debug/tracing/available_events\n",
-      "06:03:11  INFO    :         FTrace - Enabled events:\n",
-      "06:03:11  INFO    :         FTrace -   ['cpu_idle', 'cpu_capacity', 'cpu_frequency', 'sched_switch']\n",
-      "06:03:11  INFO    :         FTrace -   None\n"
+      "2016-12-12 11:58:44,190 INFO    : TestEnv      : Enabled tracepoints:\n",
+      "2016-12-12 11:58:44,192 INFO    : TestEnv      :    cpu_idle\n",
+      "2016-12-12 11:58:44,193 INFO    : TestEnv      :    cpu_capacity\n",
+      "2016-12-12 11:58:44,194 INFO    : TestEnv      :    cpu_frequency\n",
+      "2016-12-12 11:58:44,194 INFO    : TestEnv      :    sched_switch\n"
      ]
     }
    ],
@@ -1052,28 +845,11 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 23,
+   "execution_count": 22,
    "metadata": {
     "collapsed": false
    },
-   "outputs": [
-    {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "06:03:11  DEBUG   : sudo -- sh -c 'echo 10240 > '\\''/sys/kernel/debug/tracing/buffer_size_kb'\\'''\n",
-      "06:03:12  DEBUG   : sudo -- sh -c 'cat '\\''/sys/kernel/debug/tracing/buffer_size_kb'\\'''\n",
-      "06:03:12  DEBUG   : sudo -- sh -c '/root/devlib-target/bin/trace-cmd reset'\n",
-      "06:03:13  DEBUG   : sudo -- sh -c '/root/devlib-target/bin/trace-cmd start -e cpu_idle -e cpu_capacity -e cpu_frequency -e sched_switch'\n",
-      "06:03:14  DEBUG   : sudo -- sh -c 'echo TRACE_MARKER_START > '\\''/sys/kernel/debug/tracing/trace_marker'\\'''\n",
-      "06:03:15  DEBUG   : sudo -- sh -c '/root/devlib-target/bin/shutils cpufreq_trace_all_frequencies'\n",
-      "06:03:15  DEBUG   : uname -a\n",
-      "06:03:15  DEBUG   : sudo -- sh -c '/root/devlib-target/bin/shutils cpufreq_trace_all_frequencies'\n",
-      "06:03:16  DEBUG   : sudo -- sh -c 'echo TRACE_MARKER_STOP > '\\''/sys/kernel/debug/tracing/trace_marker'\\'''\n",
-      "06:03:16  DEBUG   : sudo -- sh -c '/root/devlib-target/bin/trace-cmd stop'\n"
-     ]
-    }
-   ],
+   "outputs": [],
    "source": [
     "# Start/Stop a FTrace session\n",
     "te.ftrace.start()\n",
@@ -1083,25 +859,19 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 24,
+   "execution_count": 23,
    "metadata": {
     "collapsed": false
    },
-   "outputs": [
-    {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "06:03:17  DEBUG   : sudo -- sh -c '/root/devlib-target/bin/trace-cmd extract -o /root/devlib-target/trace.dat'\n",
-      "06:03:18  DEBUG   : /usr/bin/scp -r   root@192.168.0.1:/root/devlib-target/trace.dat /home/derkling/Code/lisa/results/TestEnvExample/trace.dat\n"
-     ]
-    }
-   ],
+   "outputs": [],
    "source": [
     "# Collect and visualize the trace\n",
     "trace_file = os.path.join(te.res_dir, 'trace.dat')\n",
     "te.ftrace.get_trace(trace_file)\n",
-    "output = os.popen(\"DISPLAY=:0.0 kernelshark {}\".format(trace_file))"
+    "\n",
+    "# There might be a different display value on your machine\n",
+    "# Check by issuing \"echo $DISPLAY\" in the LISA VM\n",
+    "output = os.popen(\"DISPLAY=:10.0 kernelshark {}\".format(trace_file))"
    ]
   }
  ],
@@ -1121,7 +891,7 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython2",
-   "version": "2.7.9"
+   "version": "2.7.6"
   }
  },
  "nbformat": 4,