# HG changeset patch # User Daniel O'Connor # Date 1463722743 -34200 # Node ID 425d02592dce1be7abd0d344fb2bab328441f384 # Parent 7dbe86981f6bf68ebef64018a3f0232aa4acf665 Rename ADSL to DSL diff -r 7dbe86981f6b -r 425d02592dce adslstats.py --- a/adslstats.py Fri May 20 15:07:49 2016 +0930 +++ b/adslstats.py Fri May 20 15:09:03 2016 +0930 @@ -1,7 +1,7 @@ #!/usr/bin/env python2 ############################################################################ # -# Parse ADSL link stats for TP-Link W9970 & generate RRD archives & graphs +# Parse DSL link stats for TP-Link W9970 & generate RRD archives & graphs # ############################################################################ # @@ -86,7 +86,7 @@ 14 : 'Rate (Kbps):', } -class ADSLStats(object): +class DSLStats(object): def __str__(self): s = "Line Rate - Up: %d kbits, Down %d kbits\n" % (self.upstream, self.downstream) if hasattr(self, 'upstreammax'): @@ -97,7 +97,7 @@ return s def getstats(): - stats = ADSLStats() + stats = DSLStats() parser = ConfigParser.ConfigParser() base = 'http://%s' % (conf.get('global', 'name')) # Gunk extracted from Chrome (what the page is requesting). Note it's sensitive to line ending type... @@ -297,7 +297,7 @@ if args[0] == 'config': if options.munin == 'signal': print '''graph_category adsl -graph_title ADSL Signal Quality +graph_title DSL Signal Quality graph_args --base 1000 -l 0 graph_vlabel dB''' for n in names: @@ -308,7 +308,7 @@ %s.min 0''' % (name, n, name, name, name) elif options.munin == 'sync': print '''graph_category adsl -graph_title ADSL Sync Speed +graph_title DSL Sync Speed graph_args --base 1024 -l 0 graph_vlabel kbit/sec up.label Up