@cryptotaxi247 / netdata-1 / commits / de28369c6

auto-add NETDATA_HOST_PREFIX to cpufreq.chart.py

paulfantom committed Jul 19, 2016 at 02:53 UTC de28369c6b0892c67feb48171999644b179755c5
1 file changed +4 -1
python.d/cpufreq.chart.py
+4 -1
@@ -21,7 +21,10 @@ CHARTS = {
21
22 class Service(SimpleService):
23 def __init__(self, configuration=None, name=None):
24 - self.sys_dir = "/sys/devices"
24 + prefix = os.getenv('NETDATA_HOST_PREFIX', "")
25 + if prefix.endswith('/'):
26 + prefix = prefix[:-1]
27 + self.sys_dir = prefix + "/sys/devices"
28 self.filename = "scaling_cur_freq"
29 SimpleService.__init__(self, configuration=configuration, name=name)
30 self.order = ORDER