[or-cvs] r20026: {torflow} Add @reboot line recommendation to crontab setup. Also chang (torflow/trunk/NetworkScanners/BwAuthority)

mikeperry at seul.org mikeperry at seul.org
Wed Jul 15 10:12:19 UTC 2009


Author: mikeperry
Date: 2009-07-15 06:12:19 -0400 (Wed, 15 Jul 2009)
New Revision: 20026

Modified:
   torflow/trunk/NetworkScanners/BwAuthority/README.BwAuthorities
   torflow/trunk/NetworkScanners/BwAuthority/aggregate.py
   torflow/trunk/NetworkScanners/BwAuthority/cron.sh
Log:

Add @reboot line recommendation to crontab setup. Also change
log levels a bit so we can be run at WARN and not produce any
output without it being something that really needs
attention.



Modified: torflow/trunk/NetworkScanners/BwAuthority/README.BwAuthorities
===================================================================
--- torflow/trunk/NetworkScanners/BwAuthority/README.BwAuthorities	2009-07-15 09:50:34 UTC (rev 20025)
+++ torflow/trunk/NetworkScanners/BwAuthority/README.BwAuthorities	2009-07-15 10:12:19 UTC (rev 20026)
@@ -126,8 +126,13 @@
 make your own copy before you install the cron job:
 
 # cp cron.sh cron-mine.sh
-# echo "45 0-23 * * * $HOME/code/torflow-trunk/NetworkScanners/BwAuthority/cron-mine.sh" | crontab
+# echo -e "`crontab -l`\n45 0-23 * * * $HOME/code/torflow-trunk/NetworkScanners/BwAuthority/cron-mine.sh" | crontab
 
+You probably also want to make sure that the run_scan.sh script is started
+every reboot under this same user. You can do this via:
+
+# echo -e "@reboot $HOME/code/torflow-trunk/NetworkScanners/BwAuthority/run_scan.sh\n`crontab -l`" | crontab
+
 Note that authorities vote every hour starting at 50 past the hour.
 Hence the 45 to give us time to gather the results and copy them over.
 

Modified: torflow/trunk/NetworkScanners/BwAuthority/aggregate.py
===================================================================
--- torflow/trunk/NetworkScanners/BwAuthority/aggregate.py	2009-07-15 09:50:34 UTC (rev 20025)
+++ torflow/trunk/NetworkScanners/BwAuthority/aggregate.py	2009-07-15 10:12:19 UTC (rev 20026)
@@ -122,7 +122,7 @@
 
 def main(argv):
   TorUtil.read_config(argv[1]+"/scanner.1/bwauthority.cfg")
-  TorUtil.loglevel = "INFO"
+  TorUtil.loglevel = "WARN"
  
   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
   s.connect((TorUtil.control_host,TorUtil.control_port))
@@ -193,7 +193,7 @@
           n = nodes[line.idhex]
         n.add_line(line)
       except ValueError,e:
-        print "Conversion error "+str(e)+" at "+l
+        plog("NOTICE", "Conversion error "+str(e)+" at "+l)
     fp.close()
 
   if len(nodes) == 0:
@@ -281,7 +281,7 @@
     sys.exit(0)
   except socket.error, e:
     traceback.print_exc()
-    plog("NOTICE", "Socket error. Are the scanning Tors running?")
+    plog("WARN", "Socket error. Are the scanning Tors running?")
     sys.exit(1)
   except Exception, e:
     plog("ERROR", "Exception during aggregate: "+str(e))

Modified: torflow/trunk/NetworkScanners/BwAuthority/cron.sh
===================================================================
--- torflow/trunk/NetworkScanners/BwAuthority/cron.sh	2009-07-15 09:50:34 UTC (rev 20025)
+++ torflow/trunk/NetworkScanners/BwAuthority/cron.sh	2009-07-15 10:12:19 UTC (rev 20026)
@@ -12,5 +12,5 @@
 if [ $? == 0 ]
 then
  cp $OUTPUT $TOR_DEST
- #scp $OUTPUT bwscan at torauthority.org:/var/lib/tor.scans/bwscan
+ #scp $OUTPUT bwscan at torauthority.org:/var/lib/tor.scans/bwscan > /dev/null
 fi



More information about the tor-commits mailing list