Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Blanc
scripts
Commits
1c807474
Commit
1c807474
authored
Apr 14, 2013
by
Valentin Samir
Browse files
[analyse] On affiche l'upload et le download total
parent
0d1befbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
surveillance/analyse.py
View file @
1c807474
...
...
@@ -126,6 +126,13 @@ def stats(ip_crans=[], ip_ext=[],
# on transforme tout en chaine
results
=
[
[
str
(
x
)
for
x
in
line
]
for
line
in
results
]
upload
=
0
download
=
0
for
line
in
results
:
upload
+=
int
(
line
[
4
])
download
+=
int
(
line
[
3
])
print
" upload: %sMo"
%
(
upload
/
1024
/
1024
)
print
" download: %sMo"
%
(
download
/
1024
/
1024
)
# on modifie les ip en noms de machine et les ports en noms
def
nom_de_machine
(
ip
)
:
...
...
Write
Preview
Supports
Markdown
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