Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Klaus Wölfel
slapos.toolbox
Commits
a30e7974
Commit
a30e7974
authored
Feb 16, 2018
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check_computer_memory: rephrase messages
parent
4d2b69e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
slapos/promise/check_computer_memory/__init__.py
slapos/promise/check_computer_memory/__init__.py
+2
-2
No files found.
slapos/promise/check_computer_memory/__init__.py
View file @
a30e7974
...
@@ -64,9 +64,9 @@ def main():
...
@@ -64,9 +64,9 @@ def main():
if
memory
is
0
:
if
memory
is
0
:
return
0
return
0
if
memory
[
'free'
]
>
threshold
:
if
memory
[
'free'
]
>
threshold
:
print
"
All Good. total memory: "
+
str
(
memory
[
'total'
])
+
" and used memory: "
+
str
(
memory
[
'used'
])
print
"
OK - memory used: {:d}% ({}B of {}B)"
.
format
(
memory
[
"used"
]
*
100
/
memory
[
"total"
],
memory
[
"used"
],
memory
[
"total"
])
return
0
return
0
print
"
Ops! Memory is low, total memory: "
+
str
(
memory
[
'total'
])
+
" and used memory: "
+
str
(
memory
[
'used'
])
print
"
Low memory - usage: {:d}% ({}B of {}B)"
.
format
(
memory
[
"used"
]
*
100
/
memory
[
"total"
],
memory
[
"used"
],
memory
[
"total"
])
return
1
return
1
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
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