From 7e365dba371a06d27b9c7f9c9fc7c9ba0335b228 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Wed, 20 Apr 2016 16:23:51 +0000 Subject: [PATCH 1/2] lisa_shell: Fix IPADDR derivation It is better to use an absolute path for ifconfig. Is is normally found in /sbin (on at least Debian, Ubuntu and Fedora) and /sbin is not in the default path for normal debian users. Signed-off-by: Daniel Thompson --- src/shell/lisa_shell | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell/lisa_shell b/src/shell/lisa_shell index 5cce7360c..3b8098d54 100644 --- a/src/shell/lisa_shell +++ b/src/shell/lisa_shell @@ -122,7 +122,7 @@ function _lisa-ipython-usage { function _lisa-ipython-start { # Get IP address for the specified interface -IPADDR=$(ifconfig $NETIF 2>/dev/null | \ +IPADDR=$(/sbin/ifconfig $NETIF 2>/dev/null | \ awk '/inet / {print $2}' | \ sed 's/addr://') if [ "x$IPADDR" == "x" ]; then -- GitLab From e6af2928bd4ae12e4e2c5afc9dfe37070529ba28 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Wed, 20 Apr 2016 16:09:54 +0000 Subject: [PATCH 2/2] ipynb: tutorial: Correct pathes for TrappyUsage tutorial Fix the path for the trace files, remove a spurious (and broken) cell and correct a couple of other minor errors. Signed-off-by: Daniel Thompson --- ipynb/tutorial/05_TrappyUsage.ipynb | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/ipynb/tutorial/05_TrappyUsage.ipynb b/ipynb/tutorial/05_TrappyUsage.ipynb index 8b9ce44f0..02bc2d683 100644 --- a/ipynb/tutorial/05_TrappyUsage.ipynb +++ b/ipynb/tutorial/05_TrappyUsage.ipynb @@ -348,7 +348,7 @@ ], "source": [ "# Let's have a look at the generated file\n", - "!ls -la" + "!ls -la example_results" ] }, { @@ -384,7 +384,7 @@ ], "source": [ "logging.info(\"Example of (formatted) 'sched_switch' event:\")\n", - "with open('./trace.txt', 'r') as fh:\n", + "with open('./example_results/trace.txt', 'r') as fh:\n", " for line in fh:\n", " if line.find('sched_switch') == -1:\n", " continue\n", @@ -417,7 +417,7 @@ ], "source": [ "logging.info(\"Example of (raw) 'sched_switch' event:\")\n", - "with open('./trace.raw.txt', 'r') as fh:\n", + "with open('./example_results/trace.raw.txt', 'r') as fh:\n", " for line in fh:\n", " if line.find('sched_switch') == -1:\n", " continue\n", @@ -4400,17 +4400,6 @@ " https://github.com/ARM-software/trappy/blob/master/doc/Plotter.ipynb" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "trappy.ILinePlot()" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -4728,6 +4717,8 @@ } ], "source": [ + "import pandas as pd\n", + "\n", "# Now we can get group by frequency and sum the partional residency times\n", "freq_residencies = df.groupby('frequency')['delta'].sum()\n", "logging.info(\"Residency time per OPP:\")\n", @@ -4763,7 +4754,7 @@ "tot = sum(freq_residencies)\n", "#df = df.apply(lambda delta : 100*delta/tot)\n", "for f in freq_residencies.index:\n", - " logging.info(\"Freq %10dHz : %5.1f%%\", f, 100*freqs[f]/tot)" + " logging.info(\"Freq %10dHz : %5.1f%%\", f, 100*freq_residencies[f]/tot)" ] }, { -- GitLab