diff options
author | makefu <github@syntax-fehler.de> | 2013-04-29 13:39:54 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2013-04-29 13:39:54 +0200 |
commit | b0273180da89e11cd6a7346ed1a72e9f17fbf230 (patch) | |
tree | b4dbfa157032ce5168099a552d0280764cbb505f /retiolum/scripts/adv_graphgen/parse_tinc_anon.py | |
parent | 5266540d4c21494adbac3f25f982f2bf32390734 (diff) | |
parent | 5d904ef7620cda3355b601793441fc804ff506a9 (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 += "\"" |