aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/collectors/sysmetrics/pidstat.py3
-rw-r--r--tools/report/report.jinja2
-rw-r--r--tools/systeminfo.py3
-rw-r--r--tools/tasks.py10
4 files changed, 10 insertions, 8 deletions
diff --git a/tools/collectors/sysmetrics/pidstat.py b/tools/collectors/sysmetrics/pidstat.py
index 608a0d6c..5106697e 100644
--- a/tools/collectors/sysmetrics/pidstat.py
+++ b/tools/collectors/sysmetrics/pidstat.py
@@ -74,7 +74,8 @@ class Pidstat(collector.ICollector):
pids = systeminfo.get_pids(monitor)
if pids:
with open(self._log, 'w') as logfile:
- cmd = ['sudo', 'pidstat', settings.getValue('PIDSTAT_OPTIONS'),
+ cmd = ['sudo', 'LC_ALL=' + settings.getValue('DEFAULT_CMD_LOCALE'),
+ 'pidstat', settings.getValue('PIDSTAT_OPTIONS'),
'-p', ','.join(pids),
str(settings.getValue('PIDSTAT_SAMPLE_INTERVAL'))]
self._logger.debug('%s', ' '.join(cmd))
diff --git a/tools/report/report.jinja b/tools/report/report.jinja
index 491dbe99..6542a202 100644
--- a/tools/report/report.jinja
+++ b/tools/report/report.jinja
@@ -20,7 +20,7 @@
<a name="Introduction"></a>
## 1. Introduction
-The objective of the OPNFV project titled **“Characterise vSwitch Performance for Telco NFV Use Cases”**, is to evaluate a virtual switch to identify its suitability for a Telco Network Function Virtualization (NFV) environment. As well as this, the project aims to identify any gaps or bottlenecks in order to drive architectural changes to improve virtual switch performance and determinism. The purpose of this document is to summarize the results of the tests carried out on the virtual switch in the Network Function Virtualization Infrastructure (NFVI) and, from these results, provide evaluations and recommendations for the virtual switch. Test results will be outlined in [Details of the Level Test Report](#DetailsoftheLevelTestReport), preceded by the [Document Identifier](#DocId), [Scope](#Scope) and [References](#References).
+The objective of the OPNFV project titled **"Characterise vSwitch Performance for Telco NFV Use Cases"**, is to evaluate a virtual switch to identify its suitability for a Telco Network Function Virtualization (NFV) environment. As well as this, the project aims to identify any gaps or bottlenecks in order to drive architectural changes to improve virtual switch performance and determinism. The purpose of this document is to summarize the results of the tests carried out on the virtual switch in the Network Function Virtualization Infrastructure (NFVI) and, from these results, provide evaluations and recommendations for the virtual switch. Test results will be outlined in [Details of the Level Test Report](#DetailsoftheLevelTestReport), preceded by the [Document Identifier](#DocId), [Scope](#Scope) and [References](#References).
This document is currently in draft form.
diff --git a/tools/systeminfo.py b/tools/systeminfo.py
index d3e24e5d..cb9ca6ee 100644
--- a/tools/systeminfo.py
+++ b/tools/systeminfo.py
@@ -145,7 +145,8 @@ def get_pids(proc_names_list):
"""
try:
- pids = subprocess.check_output(['pidof'] + proc_names_list)
+ pids = subprocess.check_output(['sudo', 'LC_ALL=' + settings.getValue('DEFAULT_CMD_LOCALE'), 'pidof']
+ + proc_names_list)
except subprocess.CalledProcessError:
# such process isn't running
return None
diff --git a/tools/tasks.py b/tools/tasks.py
index 09dd88dd..90b7e553 100644
--- a/tools/tasks.py
+++ b/tools/tasks.py
@@ -29,7 +29,6 @@ from conf import settings
CMD_PREFIX = 'cmd : '
-_MY_ENCODING = locale.getdefaultlocale()[1]
def _get_stdout():
"""Get stdout value for ``subprocess`` calls.
@@ -68,6 +67,7 @@ def run_task(cmd, logger, msg=None, check_error=False):
stdout = []
stderr = []
+ my_encoding = locale.getdefaultlocale()[1]
if msg:
logger.info(msg)
@@ -87,11 +87,11 @@ def run_task(cmd, logger, msg=None, check_error=False):
if file_d == proc.stdout.fileno():
line = proc.stdout.readline()
if settings.getValue('VERBOSITY') == 'debug':
- sys.stdout.write(line.decode(_MY_ENCODING))
+ sys.stdout.write(line.decode(my_encoding))
stdout.append(line)
if file_d == proc.stderr.fileno():
line = proc.stderr.readline()
- sys.stderr.write(line.decode(_MY_ENCODING))
+ sys.stderr.write(line.decode(my_encoding))
stderr.append(line)
if proc.poll() is not None:
@@ -103,8 +103,8 @@ def run_task(cmd, logger, msg=None, check_error=False):
ex = subprocess.CalledProcessError(proc.returncode, cmd, stderr)
handle_error(ex)
- return ('\n'.join(sout.decode(_MY_ENCODING).strip() for sout in stdout),
- ('\n'.join(sout.decode(_MY_ENCODING).strip() for sout in stderr)))
+ return ('\n'.join(sout.decode(my_encoding).strip() for sout in stdout),
+ ('\n'.join(sout.decode(my_encoding).strip() for sout in stderr)))
def run_background_task(cmd, logger, msg):
"""Run task in background and log when started.