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
Xiaowu Zhang
slapos.toolbox
Commits
903724ba
Commit
903724ba
authored
Aug 30, 2016
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monitor collect: fix variable name
parent
186591de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
slapos/monitor/collect.py
slapos/monitor/collect.py
+3
-3
No files found.
slapos/monitor/collect.py
View file @
903724ba
...
@@ -262,7 +262,7 @@ def appendToJsonFile(file_path, content, stepback=2):
...
@@ -262,7 +262,7 @@ def appendToJsonFile(file_path, content, stepback=2):
jfile
.
seek
(
position
)
jfile
.
seek
(
position
)
jfile
.
write
(
'%s}'
%
',"{}"]'
.
format
(
content
))
jfile
.
write
(
'%s}'
%
',"{}"]'
.
format
(
content
))
def
initProcessDataFile
(
file_path
):
def
initProcessDataFile
(
process_file
):
with
open
(
process_file
,
'w'
)
as
fprocess
:
with
open
(
process_file
,
'w'
)
as
fprocess
:
data_dict
=
{
data_dict
=
{
"date"
:
time
.
time
(),
"date"
:
time
.
time
(),
...
@@ -270,7 +270,7 @@ def initProcessDataFile(file_path):
...
@@ -270,7 +270,7 @@ def initProcessDataFile(file_path):
}
}
fprocess
.
write
(
json
.
dumps
(
data_dict
))
fprocess
.
write
(
json
.
dumps
(
data_dict
))
def
initMemoryDataFile
(
file_path
):
def
initMemoryDataFile
(
mem_file
):
with
open
(
mem_file
,
'w'
)
as
fmem
:
with
open
(
mem_file
,
'w'
)
as
fmem
:
data_dict
=
{
data_dict
=
{
"date"
:
time
.
time
(),
"date"
:
time
.
time
(),
...
@@ -278,7 +278,7 @@ def initMemoryDataFile(file_path):
...
@@ -278,7 +278,7 @@ def initMemoryDataFile(file_path):
}
}
fmem
.
write
(
json
.
dumps
(
data_dict
))
fmem
.
write
(
json
.
dumps
(
data_dict
))
def
initIODataFile
(
file_path
):
def
initIODataFile
(
io_file
):
with
open
(
io_file
,
'w'
)
as
fio
:
with
open
(
io_file
,
'w'
)
as
fio
:
data_dict
=
{
data_dict
=
{
"date"
:
time
.
time
(),
"date"
:
time
.
time
(),
...
...
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