Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
monitor-client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0a10962e
authored
Feb 05, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
random fixes
parent
14997630
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/client.py
+5
-5
No files found.
src/client.py
View file @
0a10962e
...
@@ -198,9 +198,9 @@ class Client:
...
@@ -198,9 +198,9 @@ class Client:
))
))
interfaces_list
=
psutil
.
network_io_counters
(
interfaces_list
=
psutil
.
network_io_counters
(
pernic
=
True
)
pernic
=
True
)
interfaces_list_enum
=
enumerate
(
interfaces_list
)
if
((
self
.
beat
%
self
.
kvmNet
)
is
0
)
and
vm_proc
.
is_running
():
if
((
self
.
beat
%
self
.
kvmNet
)
is
0
)
and
vm_proc
.
is_running
():
for
vm
in
running_vms
:
for
vm
in
running_vms
:
interfaces_list_enum
=
enumerate
(
interfaces_list
)
for
iname_index
,
iname
in
interfaces_list_enum
:
for
iname_index
,
iname
in
interfaces_list_enum
:
if
vm
[
0
]
in
iname
:
if
vm
[
0
]
in
iname
:
metrics
.
append
((
"vm."
+
metrics
.
append
((
"vm."
+
...
@@ -225,10 +225,10 @@ class Client:
...
@@ -225,10 +225,10 @@ class Client:
+
"
%
d"
%
(
time
.
time
())
+
"
%
d"
%
(
time
.
time
())
))
))
metrics
.
append
((
"vm."
+
metrics
.
append
((
"vm."
+
vm
[
0
]
+
vm
[
0
]
+
"."
+
"network"
+
"network
.bytes_recv"
+
"
.bytes_recv"
+
"
%
d"
%
"
%
d"
%
interfaces_list
[
(
interfaces_list
[
iname
]
.
bytes_recv
)
iname
]
.
bytes_recv
+
"
%
d"
%
(
time
.
time
())
+
"
%
d"
%
(
time
.
time
())
))
))
return
metrics
return
metrics
...
...
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