changeset 13:bf46efd061d7

Remove debugging and restore RRD update
author Daniel O'Connor <darius@dons.net.au>
date Thu, 08 Jan 2015 11:28:28 +1030
parents a6297e8a42a3
children 2debc3fb4372
files adslstats.py
diffstat 1 files changed, 2 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/adslstats.py	Thu Jan 08 11:24:09 2015 +1030
+++ b/adslstats.py	Thu Jan 08 11:28:28 2015 +1030
@@ -310,7 +310,7 @@
             if options.verbose:
                 print "Modem is offline"
 
-    if (options.update or options.munin) and stats != None:
+    if (options.update or options.munin != None) and stats != None:
         if options.update:
             try:
                 os.stat(rrdname)
@@ -318,14 +318,7 @@
                 if e.errno == 2:
                     print "rrd not found, creating.."
                     makerrd(rrdname)
-
-            print '%d:%d:%d:%f:%f:%f:%f' % (int(time.time()),
-                                            stats.upstream,
-                                            stats.downstream,
-                                            stats.nmup,
-                                            stats.nmdown,
-                                            stats.attenup,
-                                            stats.attendown)
+            updaterrd(rrdname, int(time.time()), stats)
         if options.munin != None:
             if options.munin == 'signal':
                 print '''noisemarginup.value %.1f