diff options
author | makefu <github@syntax-fehler.de> | 2013-04-24 20:44:30 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2013-04-24 20:44:30 +0200 |
commit | 7fdb1fca9089f400a7938573cb4398db78c6628d (patch) | |
tree | 248d2626a379d931a7b52c30a81384fc11b7dfc7 /retiolum/scripts/adv_graphgen/parse_tinc_anon.py | |
parent | 9f38a2b96abb3fdc4cce5ef23c791728268b7b6f (diff) | |
parent | 57fb05c0512f9c12ff56924cdc0d835f1999754a (diff) |
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'retiolum/scripts/adv_graphgen/parse_tinc_anon.py')
-rwxr-xr-x | retiolum/scripts/adv_graphgen/parse_tinc_anon.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/retiolum/scripts/adv_graphgen/parse_tinc_anon.py b/retiolum/scripts/adv_graphgen/parse_tinc_anon.py index 21c36e0f..82ee2f2e 100755 --- a/retiolum/scripts/adv_graphgen/parse_tinc_anon.py +++ b/retiolum/scripts/adv_graphgen/parse_tinc_anon.py @@ -52,11 +52,13 @@ def write_stat_node(nodes): ''' Write a `stats` node in the corner This node contains infos about the current number of active nodes and connections inside the network ''' + from time import localtime,strftime num_conns = 0 num_nodes = len(nodes) for k,v in nodes.iteritems(): num_conns+= len(v['to']) node_text = " stats_node [shape=box,label=\"Statistics\\l" + node_text += "Build Date : %s\\l" % strftime("%Y-%m-%d %H:%M:%S",localtime()) node_text += "Active Nodes: %s\\l" % num_nodes node_text += "Connections : %s\\l" % num_conns node_text += "\"" |