diff options
author | Your Name <you@example.com> | 2013-04-08 04:01:36 -0400 |
---|---|---|
committer | Your Name <you@example.com> | 2013-04-08 04:01:36 -0400 |
commit | 7477ce7e871a48a597b2e7d21561bb1d6fb4466b (patch) | |
tree | a7c37fee7b1e141d36d030993c40ddeab9d069d1 /retiolum/scripts/adv_graphgen/parse_tinc_anon.py | |
parent | 2b74acb096d971a680914cf284c2f9b0c99d7ff3 (diff) | |
parent | f6dfecb5faf564b11a3c9bdfcaecab3f60b26a14 (diff) |
Merge branch 'master' of https://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 += "\"" |