Mercurial > ~darius > hgwebdir.cgi > adslstats
comparison adslstats.py @ 8:e69ad89061dc
Unswap up & down stream bit rates.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Sat, 08 Feb 2014 10:07:56 +1030 |
parents | 98d351a87043 |
children | 8b5958404f81 |
comparison
equal
deleted
inserted
replaced
7:98d351a87043 | 8:e69ad89061dc |
---|---|
106 stats.nmdown = float(a[8].td.findNext('td').contents[0]) / 10.0 | 106 stats.nmdown = float(a[8].td.findNext('td').contents[0]) / 10.0 |
107 stats.nmup = float(a[8].td.findNext('td').findNext('td').contents[0]) / 10.0 | 107 stats.nmup = float(a[8].td.findNext('td').findNext('td').contents[0]) / 10.0 |
108 stats.attendown = float(a[9].td.findNext('td').contents[0]) / 10.0 | 108 stats.attendown = float(a[9].td.findNext('td').contents[0]) / 10.0 |
109 stats.attenup = float(a[9].td.findNext('td').findNext('td').contents[0]) / 10.0 | 109 stats.attenup = float(a[9].td.findNext('td').findNext('td').contents[0]) / 10.0 |
110 # kBit | 110 # kBit |
111 stats.upstream = float(a[14].td.findNext('td').contents[0]) | 111 stats.downstream = float(a[14].td.findNext('td').contents[0]) |
112 stats.downstream = float(a[14].td.findNext('td').findNext('td').contents[0]) | 112 stats.upstream = float(a[14].td.findNext('td').findNext('td').contents[0]) |
113 | 113 |
114 return stats | 114 return stats |
115 | 115 |
116 # Setup RRD | 116 # Setup RRD |
117 # We expect data to be logged every 5 minutes | 117 # We expect data to be logged every 5 minutes |