Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos
Commits
80111f94
Commit
80111f94
authored
Dec 17, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into zope4py2
parents
af95aea7
0baefb41
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+1
-1
software/ors-amarisoft/promise/check_cpu_temperature.py
software/ors-amarisoft/promise/check_cpu_temperature.py
+2
-2
stack/erp5/buildout.cfg
stack/erp5/buildout.cfg
+3
-0
No files found.
software/ors-amarisoft/buildout.hash.cfg
View file @
80111f94
...
...
@@ -108,7 +108,7 @@ md5sum = 5bf57a9074ea5b054d999789cbbe2c87
[cpu-temperature-promise]
_update_hash_filename_ = promise/check_cpu_temperature.py
md5sum =
979a5a3a1eb9d0b081fa014baeef706
f
md5sum =
6812310b65c2d95815afc2b034a5f90
f
[interface-up-promise]
_update_hash_filename_ = promise/check_interface_up.py
...
...
software/ors-amarisoft/promise/check_cpu_temperature.py
View file @
80111f94
...
...
@@ -79,12 +79,12 @@ class RunPromise(GenericPromise):
data
=
psutil
.
sensors_temperatures
()
cpu_temp
=
data
[
'coretemp'
][
0
][
1
]
l
=
get_data_interval
(
self
.
__log_file
,
max_avg_temp_duration
)
l
=
get_data_interval
(
self
.
__log_file
,
max_avg_temp_duration
)
or
[{
'cpu_temperature'
:
cpu_temp
}]
avg_temp
=
sum
(
map
(
lambda
x
:
x
[
'cpu_temperature'
],
l
))
/
len
(
l
)
data
=
json
.
dumps
({
'cpu_temperature'
:
cpu_temp
,
'avg_cpu_temperature'
:
avg_temp
})
self
.
json_logger
.
info
(
"Temperature data"
,
extra
=
{
'data'
:
data
})
promise_success
=
True
if
cpu_temp
>
max_temp
:
self
.
logger
.
error
(
"Temperature reached critical threshold: %s degrees celsius (threshold is %s degrees celsius)"
%
(
cpu_temp
,
max_temp
))
...
...
stack/erp5/buildout.cfg
View file @
80111f94
...
...
@@ -902,6 +902,9 @@ webcolors = 1.10
rfc3987 = 1.3.8
jsonpointer = 2.2
pandas = 0.19.2
numpy = 1.13.1
scipy = 0.19.0
# WIP Zope 4 ⚠
Products.CMFCore = 2.6.0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment