Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F85921210
temp.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Oct 3, 01:20
Size
283 B
Mime Type
text/x-python
Expires
Sat, Oct 5, 01:20 (2 d)
Engine
blob
Format
Raw Data
Handle
21297176
Attached To
rSCMINICLUSTER SCITAS Mini Cluster
temp.py
View Options
#!/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
Log In to Comment