Page MenuHomec4science

temp.py
No OneTemporary

File Metadata

Created
Thu, Oct 3, 01:20
#!/usr/bin/env python2
import collectd
import psutil
node = "{{ node_id }}"
def read(data=None):
vl = collectd.Values(type='temperature')
vl.plugin = 'cpu_temp'
vl.dispatch(values=[psutil.sensors_temperatures()['cpu-thermal'][0].current])
collectd.register_read(read)

Event Timeline