Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4836dd8c
authored
Apr 02, 2013
by
tarokkk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stat: Fixed filter for active state
parent
0765a6e5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
+1
-1
miscellaneous/stat/stat_dom.py
+1
-1
No files found.
miscellaneous/stat/stat_dom.py
View file @
4836dd8c
#!/usr/bin/python
#!/usr/bin/python
import
xmltodict
import
xml.dom.minidom
as
minidom
import
xml.dom.minidom
as
minidom
import
sys
import
sys
import
json
import
json
...
@@ -23,6 +22,7 @@ mem_max = 0
...
@@ -23,6 +22,7 @@ mem_max = 0
running_vms
=
0
running_vms
=
0
for
host
in
hosts
:
for
host
in
hosts
:
if
host
.
getElementsByTagName
(
"STATE"
)[
0
]
.
childNodes
[
0
]
.
data
==
"2"
:
share
=
host
.
getElementsByTagName
(
"HOST_SHARE"
)[
0
]
share
=
host
.
getElementsByTagName
(
"HOST_SHARE"
)[
0
]
cpu_max
+=
int
(
share
.
getElementsByTagName
(
"MAX_CPU"
)[
0
]
.
childNodes
[
0
]
.
data
)
cpu_max
+=
int
(
share
.
getElementsByTagName
(
"MAX_CPU"
)[
0
]
.
childNodes
[
0
]
.
data
)
used_cpu
+=
int
(
share
.
getElementsByTagName
(
"USED_CPU"
)[
0
]
.
childNodes
[
0
]
.
data
)
used_cpu
+=
int
(
share
.
getElementsByTagName
(
"USED_CPU"
)[
0
]
.
childNodes
[
0
]
.
data
)
...
...
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