Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaohe Cao
slapos
Commits
6a564dde
Commit
6a564dde
authored
Mar 04, 2015
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monitor: rename resources.cgi to resource-consumption.cgi
parent
df84e918
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
17 deletions
+17
-17
stack/monitor/buildout.cfg
stack/monitor/buildout.cfg
+2
-2
stack/monitor/monitor.cfg.in
stack/monitor/monitor.cfg.in
+3
-3
stack/monitor/webfile-directory/resource-consumption.cgi.in
stack/monitor/webfile-directory/resource-consumption.cgi.in
+12
-12
No files found.
stack/monitor/buildout.cfg
View file @
6a564dde
...
...
@@ -100,12 +100,12 @@ md5sum = d2b85ac31cbbf49c78dc51e90ddf305f
filename = logfile.cgi.in
mode = 0644
[resource
s
-cgi]
[resource
-consumption
-cgi]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/webfile-directory/${:filename}
download-only = true
#md5sum =
filename = resource
s
.cgi.in
filename = resource
-consumption
.cgi.in
mode = 0644
[status-cgi]
...
...
stack/monitor/monitor.cfg.in
View file @
6a564dde
...
...
@@ -196,11 +196,11 @@ context =
[log-folder-cgi]
log-folder = $${monitor-directory:log}
[deploy-resource-monitoring-cgi]
[deploy-resource-
consumption-
monitoring-cgi]
recipe = slapos.recipe.template:jinja2
template = ${resource
s-cgi:location}/${resources
-cgi:filename}
template = ${resource
-consumption-cgi:location}/${resource-consumption
-cgi:filename}
rendered = $${monitor-directory:monitoring-cgi}/$${:filename}
filename = resource
s
.cgi
filename = resource
-consumption
.cgi
mode = $${deploy-settings-cgi:mode}
context =
key monitor_bin monitor-parameters:executable
...
...
stack/monitor/webfile-directory/resource
s
.cgi.in
→
stack/monitor/webfile-directory/resource
-consumption
.cgi.in
View file @
6a564dde
...
...
@@ -44,7 +44,7 @@ if action:
partition_user, date_scope)
result_dict['memory'] = db.getPartitionUsedMemoryAverage(
partition_user, date_scope)
print json.dumps(result_dict)
else:
print """
<html><head>
...
...
@@ -82,17 +82,17 @@ else:
<script
language=
"javascript"
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
var
send
=
false
;
autoRefresh
();
function
autoRefresh
()
{
refresh
();
setTimeout
(
function
(){
autoRefresh
();
},
60000
);
}
function
refresh
()
{
if
(
send
)
{
return
}
var
dataPost
=
{
'
posting-script
'
:
"
monitoring/resource
s
.cgi
"
,
var
dataPost
=
{
'
posting-script
'
:
"
monitoring/resource
-consumption
.cgi
"
,
action
:
"
refresh
"
};
send
=
true
;
$
(
"
#msg
"
).
fadeIn
();
...
...
@@ -109,15 +109,15 @@ $(document).ready(function () {
table2
+=
'
<th class="tg-s6z2">CPU %</th><th class="tg-s6z2">CPU Time</th>
'
;
table2
+=
'
<th class="tg-s6z2">Threads</th><th class="tg-s6z2">Memory Usage</th>
'
;
table2
+=
'
<th class="tg-s6z2">Memory %</th></tr>
'
;
table1
=
'
<tr><th class="tg-s6z2">Process PID</th>
'
;
table1
+=
'
<th class="tg-s6z2">CPU %</th><th class="tg-s6z2">CPU Time</th>
'
;
table1
+=
'
<th class="tg-s6z2">Threads</th><th class="tg-s6z2">Memory Usage</th>
'
;
table1
+=
'
<th class="tg-s6z2">Memory %</th></tr>
'
;
table3
=
'
<tr><th class="tg-s6z2">CPU Load Average %</th>
'
;
table3
+=
'
<th class="tg-s6z2">Memory Consumption Average</th></tr>
'
;
line2
=
"
<tr class='tg-4eph tg-s6z2'>
"
line2
+=
"
<td>
"
+
result
[
'
status
'
][
'
total_process
'
]
+
"
</td>
"
;
line2
+=
"
<td>
"
+
result
[
'
status
'
][
'
cpu_percent
'
]
+
"
</td>
"
;
...
...
@@ -138,11 +138,11 @@ $(document).ready(function () {
line
+=
"
<td>
"
+
consump
[
i
][
4
]
+
"
</td>
"
;
line
+=
"
</tr>
"
;
}
table3
+=
"
<tr class='tg-4eph tg-s6z2'>
"
table3
+=
"
<td>
"
+
result
[
'
cpu-load
'
]
+
"
</td>
"
;
table3
+=
"
<td>
"
+
result
[
'
memory
'
]
+
"
Mb</td></tr></table>
"
;
$
(
"
#box3
"
).
html
(
table3
);
$
(
"
#box2
"
).
html
(
table2
+
line2
+
'
</table>
'
);
$
(
"
#box1
"
).
html
(
table1
+
line
+
'
</table>
'
);
...
...
@@ -155,11 +155,11 @@ $(document).ready(function () {
$
(
"
#msg
"
).
fadeOut
();
});
}
$
(
"
#refresh
"
).
click
(
function
()
{
refresh
();
});
});
</script>
</head><body>
...
...
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