The location of sysctl may change depending on the distribution. Try to
add all possible paths to the environment.
self._start_ts = None
self._end_ts = None
+ # Hard code all possible places a packager might install sysctl.
+ self._env = os.environ
+ self._env['PATH'] = ':'.join(['/usr/sbin/', '/sbin/', self._env['PATH']])
+
def start(self):
self._start_ts = datetime.now()
'collect kernel configuration'
log("collecting sysctl")
- r = run_cmd(['/usr/sbin/sysctl', '-a'])
+ r = run_cmd(['sysctl', '-a'], env=self._env)
return r[1]