diff options
author | Martin Klozik <martinx.klozik@intel.com> | 2015-12-09 12:53:43 +0000 |
---|---|---|
committer | Maryam Tahhan <maryam.tahhan@intel.com> | 2015-12-14 14:46:05 +0000 |
commit | b7a3cb6b74850ef71fbbeacbee63df791caba626 (patch) | |
tree | 026268f316b89cae4828513b1b8f5ec282a02302 /tools/collectors/sysmetrics | |
parent | ad35451e9bb63a551b0b1ff517706b969653f594 (diff) |
bugfix: Fix failure caused by unset locale
In case, that VSPERF detects missing locale settings, it will
set language and encodding settings to default values specified
by configuration parameter DEFAULT_LOCALE.
Localized external commands with output parsed by VSPERF
are executed with modified locale to ensure correct VSPERF
function. Locale settings for such commands is specified
by configuration parameter DEFAULT_CMD_LOCALE.
Change-Id: If5c15115b778ce90046e390f10438b780f82695b
JIRA: VSPERF-132
Signed-off-by: Martin Klozik <martinx.klozik@intel.com>
Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
Reviewed-by: Al Morton <acmorton@att.com>
Reviewed-by: Brian Castelli <brian.castelli@spirent.com>
Reviewed-by: Gurpreet Singh <gurpreet.singh@spirent.com>
Reviewed-by: Tv Rao <tv.rao@freescale.com>
Diffstat (limited to 'tools/collectors/sysmetrics')
-rw-r--r-- | tools/collectors/sysmetrics/pidstat.py | 3 |
1 files changed, 2 insertions, 1 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)) |