[or-cvs] r23959: {arm} Applying a patch from Hans to suppress superfluous lsof warn (in arm/trunk: . src/util)

Damian Johnson atagar1 at gmail.com
Mon Dec 20 15:21:22 UTC 2010


Author: atagar
Date: 2010-12-20 15:21:22 +0000 (Mon, 20 Dec 2010)
New Revision: 23959

Modified:
   arm/trunk/TODO
   arm/trunk/src/util/connections.py
Log:
Applying a patch from Hans to suppress superfluous lsof warnings.



Modified: arm/trunk/TODO
===================================================================
--- arm/trunk/TODO	2010-12-20 14:36:26 UTC (rev 23958)
+++ arm/trunk/TODO	2010-12-20 15:21:22 UTC (rev 23959)
@@ -86,6 +86,8 @@
             - http://www.linuxjournal.com/article/5737
 
 - Bugs
+  * The cpu usage spikes for scrollable content when the key's held. Try
+    coalescing the events.
   * The manpage layout is system dependent, so the scraper needs to be more
     resilient against being confused by whitespace. Another improvement is
     including fallback results if the man page can't be parsed (suggested by
@@ -133,6 +135,27 @@
     * connection uptimes shouldn't show fractions of a second
     * connections aren't cleared when control port closes
 
+- Packaging
+  * OpenWrt - OpenWrt uses the opkg packaging format which could make use of
+    arm's current deb packages. Packaging for this platform would help with
+    the Torouter project:
+    https://trac.torproject.org/projects/tor/wiki/TheOnionRouter/Torouter
+  * Mac - Couple of options include macport and dmg...
+    * macport (http://guide.macports.org/#development)
+      Build-from-source distribution method (like BSD portinstall). This has
+      been suggested by several people.
+      
+    * dmg (http://en.wikipedia.org/wiki/Apple_Disk_Image)
+      Most conventional method of software distribution on mac. This is just
+      a container (no updating/removal support), but could contain an icon
+      for the dock that starts a terminal with arm. This might include a pkg
+      installer.
+    
+    * mpkg (http://pypi.python.org/pypi/bdist_mpkg/)
+      Plugin for distutils. Like most mac packaging, this can only run on a
+      mac. It also requires setuptools:
+      http://www.errorhelp.com/search/details/74034/importerror-no-module-named-setuptools
+
 - Future Features
   * client mode use cases
     * not sure what sort of information would be useful in the header (to
@@ -175,22 +198,6 @@
     * accounting and alerts for if the bandwidth drops to zero
     * daily/weekly/etc alerts for basic status (log output, bandwidth history,
         etc), borrowing from the consensus tracker for some of the formatting
-  * mac installer
-    * Couple of options include macport and dmg...
-      * macport (http://guide.macports.org/#development)
-        Build-from-source distribution method (like BSD portinstall). This has
-        been suggested by several people.
-        
-      * dmg (http://en.wikipedia.org/wiki/Apple_Disk_Image)
-        Most conventional method of software distribution on mac. This is just
-        a container (no updating/removal support), but could contain an icon
-        for the dock that starts a terminal with arm. This might include a pkg
-        installer.
-      
-      * mpkg (http://pypi.python.org/pypi/bdist_mpkg/)
-        Plugin for distutils. Like most mac packaging, this can only run on a
-        mac. It also requires setuptools:
-        http://www.errorhelp.com/search/details/74034/importerror-no-module-named-setuptools
   * tab completion for input fields that expect a filesystem path
   * look through vidalia's tickets for more ideas
     https://trac.vidalia-project.net/
@@ -212,7 +219,8 @@
   * setup wizard for new relays
     Setting the password and such for torrc generation. Maybe a netinstaller
     that fetches the right package for the plagform, verifies signatures, etc?
-    (idea by ioerror)
+    Another alternative would be that when arm is started and tor isn't
+    running offer to start tor as a client, relay, or bridge. (idea by ioerror)
   * audit what tor does
     * Provide warnings if tor connections misbehaves, for instance:
       * ensuring ExitPolicyRejectPrivate is being obeyed

Modified: arm/trunk/src/util/connections.py
===================================================================
--- arm/trunk/src/util/connections.py	2010-12-20 14:36:26 UTC (rev 23958)
+++ arm/trunk/src/util/connections.py	2010-12-20 15:21:22 UTC (rev 23959)
@@ -4,7 +4,7 @@
 utilities:
 - netstat   netstat -np | grep "ESTABLISHED <pid>/<process>"
 - sockstat  sockstat | egrep "<process> *<pid>.*ESTABLISHED"
-- lsof      lsof -nPi | egrep "^<process> *<pid>.*((UDP.*)|(\(ESTABLISHED\)))"
+- lsof      lsof -wnPi | egrep "^<process> *<pid>.*((UDP.*)|(\(ESTABLISHED\)))"
 - ss        ss -nptu | grep "ESTAB.*\"<process>\",<pid>"
 
 all queries dump its stderr (directing it to /dev/null). Results include UDP
@@ -53,14 +53,15 @@
 # *note: under freebsd this command belongs to a spreadsheet program
 RUN_SS = "ss -nptu | grep \"ESTAB.*\\\"%s\\\",%s\""
 
-# n = prevent dns lookups, P = show port numbers (not names), i = ip only
+# n = prevent dns lookups, P = show port numbers (not names), i = ip only,
+# -w = no warnings
 # output:
 # tor  3873  atagar  45u  IPv4  40994  0t0  TCP 10.243.55.20:45724->194.154.227.109:9001 (ESTABLISHED)
 # 
 # oddly, using the -p flag via:
 # lsof      lsof -nPi -p <pid> | grep "^<process>.*(ESTABLISHED)"
 # is much slower (11-28% in tests I ran)
-RUN_LSOF = "lsof -nPi | egrep \"^%s *%s.*((UDP.*)|(\\(ESTABLISHED\\)))\""
+RUN_LSOF = "lsof -wnPi | egrep \"^%s *%s.*((UDP.*)|(\\(ESTABLISHED\\)))\""
 
 # output:
 # atagar  tor  3475  tcp4  127.0.0.1:9051  127.0.0.1:38942  ESTABLISHED



More information about the tor-commits mailing list