[tor-commits] [nyx/master] Rename nyx/config/* to nyx/settings/*

atagar at torproject.org atagar at torproject.org
Sun Feb 14 02:55:49 UTC 2016


commit 8327b73398530c4731bc381ddea9e3e530ced704
Author: Damian Johnson <atagar at torproject.org>
Date:   Sat Feb 6 10:03:56 2016 -0800

    Rename nyx/config/* to nyx/settings/*
    
    I hate it when tab completion has multiple matches. He had both a config
    directory and a config_panel.py. Renaming the former to the name I usually
    use for stem config files.
---
 nyx/config/attributes.cfg   |  94 --------------------------------------
 nyx/config/dedup.cfg        |  91 -------------------------------------
 nyx/config/strings.cfg      | 107 --------------------------------------------
 nyx/config/torrc.cfg        |  53 ----------------------
 nyx/settings/attributes.cfg |  94 ++++++++++++++++++++++++++++++++++++++
 nyx/settings/dedup.cfg      |  91 +++++++++++++++++++++++++++++++++++++
 nyx/settings/strings.cfg    | 107 ++++++++++++++++++++++++++++++++++++++++++++
 nyx/settings/torrc.cfg      |  53 ++++++++++++++++++++++
 nyx/util/__init__.py        |   2 +-
 9 files changed, 346 insertions(+), 346 deletions(-)

diff --git a/nyx/config/attributes.cfg b/nyx/config/attributes.cfg
deleted file mode 100644
index 1942de9..0000000
--- a/nyx/config/attributes.cfg
+++ /dev/null
@@ -1,94 +0,0 @@
-# General configuration data used by nyx.
-
-attr.flag_colors Authority => white
-attr.flag_colors BadExit => red
-attr.flag_colors BadDirectory => red
-attr.flag_colors Exit => cyan
-attr.flag_colors Fast => yellow
-attr.flag_colors Guard => green
-attr.flag_colors HSDir => magenta
-attr.flag_colors Named => blue
-attr.flag_colors Stable => blue
-attr.flag_colors Running => yellow
-attr.flag_colors Unnamed => magenta
-attr.flag_colors Valid => green
-attr.flag_colors V2Dir => cyan
-attr.flag_colors V3Dir => white
-
-attr.version_status_colors new => blue
-attr.version_status_colors new in series => blue
-attr.version_status_colors obsolete => red
-attr.version_status_colors recommended => green
-attr.version_status_colors old => red
-attr.version_status_colors unrecommended => red
-attr.version_status_colors unknown => cyan
-
-attr.hibernate_color awake => green
-attr.hibernate_color soft => yellow
-attr.hibernate_color hard => red
-
-attr.graph.title bandwidth => Bandwidth
-attr.graph.title connections => Connection Count
-attr.graph.title resources => System Resources
-
-attr.graph.header.primary bandwidth => Download
-attr.graph.header.primary connections => Inbound
-attr.graph.header.primary resources => CPU
-
-attr.graph.header.secondary bandwidth => Upload
-attr.graph.header.secondary connections => Outbound
-attr.graph.header.secondary resources => Memory
-
-attr.log_color DEBUG => magenta
-attr.log_color INFO => blue
-attr.log_color NOTICE => green
-attr.log_color WARN => yellow
-attr.log_color ERR => red
-
-attr.log_color NYX_DEBUG => magenta
-attr.log_color NYX_INFO => blue
-attr.log_color NYX_NOTICE => green
-attr.log_color NYX_WARN => yellow
-attr.log_color NYX_ERR => red
-
-attr.log_color CIRC => yellow
-attr.log_color BW => cyan
-attr.log_color NS => blue
-attr.log_color NEWCONSENSUS => blue
-attr.log_color GUARD => yellow
-
-attr.connection.category_color Inbound => green
-attr.connection.category_color Outbound => blue
-attr.connection.category_color Exit => red
-attr.connection.category_color Hidden => magenta
-attr.connection.category_color Socks => yellow
-attr.connection.category_color Circuit => cyan
-attr.connection.category_color Directory => magenta
-attr.connection.category_color Control => red
-
-attr.connection.sort_color Category => red
-attr.connection.sort_color Uptime => yellow
-attr.connection.sort_color Listing => green
-attr.connection.sort_color Ip Address => blue
-attr.connection.sort_color Port => blue
-attr.connection.sort_color Fingerprint => cyan
-attr.connection.sort_color Nickname => cyan
-attr.connection.sort_color Country => blue
-
-attr.config.category_color General => green
-attr.config.category_color Client => blue
-attr.config.category_color Relay => yellow
-attr.config.category_color Directory => magenta
-attr.config.category_color Authority => red
-attr.config.category_color Hidden Service => cyan
-attr.config.category_color Testing => white
-attr.config.category_color Unknown => white
-
-attr.config.sort_color Name => blue
-attr.config.sort_color Value => cyan
-attr.config.sort_color Value Type => green
-attr.config.sort_color Category => red
-attr.config.sort_color Usage => yellow
-attr.config.sort_color Summary => green
-attr.config.sort_color Description => white
-attr.config.sort_color Man Page Entry => blue
diff --git a/nyx/config/dedup.cfg b/nyx/config/dedup.cfg
deleted file mode 100644
index 42d8102..0000000
--- a/nyx/config/dedup.cfg
+++ /dev/null
@@ -1,91 +0,0 @@
-################################################################################
-#
-# Snippets from common log messages. These are used to determine when entries
-# with dynamic content (hostnames, numbers, etc) are the same. If this matches
-# the start of both messages then the entries are flagged as duplicates. If the
-# entry begins with an asterisk (*) then it checks if the substrings exist
-# anywhere in the messages.
-#
-# Examples for the complete messages:
-#
-# [BW] READ: 0, WRITTEN: 0
-# [DEBUG] connection_handle_write(): After TLS write of 512: 0 read, 586 written
-# [DEBUG] flush_chunk_tls(): flushed 512 bytes, 0 ready to flush, 0 remain.
-# [DEBUG] conn_read_callback(): socket 7 wants to read.
-# [DEBUG] conn_write_callback(): socket 51 wants to write.
-# [DEBUG] connection_remove(): removing socket -1 (type OR), n_conns now 50
-# [DEBUG] connection_or_process_cells_from_inbuf(): 7: starting, inbuf_datalen
-#         0 (0 pending in tls object).
-# [DEBUG] connection_read_to_buf(): 38: starting, inbuf_datalen 0 (0 pending in
-#         tls object). at_most 12800.
-# [DEBUG] connection_read_to_buf(): TLS connection closed on read. Closing.
-#         (Nickname moria1, address 128.31.0.34)
-# [INFO] run_connection_housekeeping(): Expiring non-open OR connection to fd
-#        16 (79.193.61.171:443).
-# [INFO] rep_hist_downrate_old_runs(): Discounting all old stability info by a
-#        factor of 0.950000
-# [NOTICE] Circuit build timeout of 96803ms is beyond the maximum build time we 
-#          have ever observed. Capping it to 96107ms.
-#   The above NOTICE changes to an INFO message in maint-0.2.2
-# [NOTICE] Based on 1000 circuit times, it looks like we don't need to wait so 
-#          long for circuits to finish. We will now assume a circuit is too slow
-#          to use after waiting 65 seconds.
-# [NOTICE] We stalled too much while trying to write 150 bytes to address
-#          [scrubbed].  If this happens a lot, either something is wrong with
-#          your network connection, or something is wrong with theirs. (fd 238,
-#          type Directory, state 1, marked at main.c:702).
-# [NOTICE] I learned some more directory information, but not enough to build a
-#          circuit: We have only 469/2027 usable descriptors.
-# [NOTICE] Attempt by %s to open a stream from unknown relay. Closing.
-# [NOTICE] Average packaged cell fullness: 70.976%. TLS write overhead: 11%
-# [NOTICE] Heartbeat: Tor's uptime is 8 days 6:00 hours, with 0 circuits open.
-#          I've sent 3.53 MB and received 90.61 MB.
-# [WARN] You specified a server "Amunet8" by name, but this name is not
-#        registered
-# [WARN] I have no descriptor for the router named "Amunet8" in my declared
-#        family; I'll use the nickname as is, but this   may confuse clients.
-# [WARN] Controller gave us config lines that didn't validate: Value
-#        'BandwidthRate  ' is malformed or out of bounds.
-# [WARN] Problem bootstrapping. Stuck at 80%: Connecting to the Tor network.
-#        (Network is unreachable; NOROUTE; count 47;    recommendation warn)
-# [WARN] 4 unknown, 1 missing key, 3 good, 0 bad, 1 no signature, 4 required
-# [NYX_DEBUG] refresh rate: 0.001 seconds
-# [NYX_DEBUG] proc call (process connections): /proc/net/[tcp|udp] (runtime: 0.0018)
-# [NYX_DEBUG] system call: ps -p 2354 -o %cpu,rss,%mem,etime (runtime: 0.02)
-# [NYX_DEBUG] system call: netstat -npt | grep 2354/tor (runtime: 0.02)
-# [NYX_DEBUG] recreating panel 'graph' with the dimensions of 14/124
-# [NYX_DEBUG] redrawing the log panel with the corrected content height (estimat was off by 4)
-# [NYX_DEBUG] GETINFO accounting/bytes-left (runtime: 0.0006)
-# [NYX_DEBUG] GETINFO traffic/read (runtime: 0.0004)
-# [NYX_DEBUG] GETINFO traffic/written (runtime: 0.0002)
-# [NYX_DEBUG] GETCONF MyFamily (runtime: 0.0007)
-# [NYX_DEBUG] Unable to query process resource usage from ps, waiting 6.25 seconds (unrecognized output from ps: ...)
-#
-################################################################################
-
-dedup.BW READ:
-dedup.DEBUG connection_handle_write(): After TLS write of
-dedup.DEBUG flush_chunk_tls(): flushed
-dedup.DEBUG conn_read_callback(): socket
-dedup.DEBUG conn_write_callback(): socket
-dedup.DEBUG connection_remove(): removing socket
-dedup.DEBUG connection_or_process_cells_from_inbuf():
-dedup.DEBUG *pending in tls object). at_most
-dedup.DEBUG connection_read_to_buf(): TLS connection closed on read. Closing.
-dedup.INFO run_connection_housekeeping(): Expiring
-dedup.INFO rep_hist_downrate_old_runs(): Discounting all old stability info by a factor of
-dedup.INFO *build time we have ever observed. Capping it to
-dedup.NOTICE *build time we have ever observed. Capping it to
-dedup.NOTICE *We will now assume a circuit is too slow to use after waiting
-dedup.NOTICE We stalled too much while trying to write
-dedup.NOTICE I learned some more directory information, but not enough to build a circuit
-dedup.NOTICE Attempt by
-dedup.NOTICE *Loading relay descriptors.
-dedup.NOTICE Average packaged cell fullness:
-dedup.NOTICE Heartbeat: Tor's uptime is
-dedup.WARN You specified a server
-dedup.WARN I have no descriptor for the router named
-dedup.WARN Controller gave us config lines that didn't validate
-dedup.WARN Problem bootstrapping. Stuck at
-dedup.WARN *missing key,
-
diff --git a/nyx/config/strings.cfg b/nyx/config/strings.cfg
deleted file mode 100644
index 85b4f8d..0000000
--- a/nyx/config/strings.cfg
+++ /dev/null
@@ -1,107 +0,0 @@
-################################################################################
-#
-# User facing strings. These are sorted into the following namespaces...
-#
-#   * config    parsing or handling configuration options
-#   * debug     concerns the --debug argument
-#   * misc      anything that doesn't fit into a present namespace
-#   * panel     used after startup by our curses panels
-#   * setup     notificaitons or issues arising while starting nyx
-#   * tracker   related to tracking resource usage or connections
-#   * usage     usage information about starting and running nyx
-#
-################################################################################
-
-msg.wrap {text}
-
-msg.config.unable_to_read_file Failed to load configuration (using defaults): "{error}"
-msg.config.nothing_loaded No nyxrc loaded, using defaults. You can customize nyx by placing a configuration file at {path} (see the nyxrc.sample for its options).
-
-msg.debug.saving_to_path Saving a debug log to {path}, please check it for sensitive information before sharing it.
-msg.debug.unable_to_write_file Unable to write to our debug log file ({path}): {error}
-
-msg.panel.graphing.prepopulation_successful Bandwidth graph has information for the last {duration}
-msg.panel.graphing.bw_event_cache_malformed Tor's 'GETINFO bw-event-cache' provided malformed output: {response}
-msg.panel.header.fd_used_at_sixty_percent Tor's file descriptor usage is at {percentage}%.
-msg.panel.header.fd_used_at_ninety_percent Tor's file descriptor usage is at {percentage}%. If you run out Tor will be unable to continue functioning.
-msg.panel.log.read_from_log_file Read {count} entries from tor's log file: {path} (read limit: {read_limit}, runtime: {runtime})
-
-msg.setup.nyx_is_running_as_root Nyx is currently running with root permissions. This isn't a good idea, nor should it be necessary.
-msg.setup.chroot_doesnt_exist The chroot path set in your config ({path}) doesn't exist.
-msg.setup.set_freebsd_chroot Adjusting paths to account for Tor running in a FreeBSD jail at: {path}
-msg.setup.tor_is_running_as_root Tor is currently running with root permissions. This isn't a good idea, nor should it be necessary. See the 'User UID' option on Tor's man page for an easy method of reducing its permissions after startup.
-msg.setup.unable_to_determine_pid Unable to determine Tor's pid. Some information, like its resource usage will be unavailable.
-msg.setup.unknown_event_types nyx doesn't recognize the following event types: {event_types} (log 'UNKNOWN' events to see them)
-msg.setup.color_support_available Terminal color support detected and enabled
-msg.setup.color_support_unavailable Terminal color support unavailable
-
-msg.tracker.abort_getting_resources Failed three attempts to get process resource usage from {resolver}, {response} ({exc})
-msg.tracker.abort_getting_port_usage Failed three attempts to determine the process using active ports ({exc})
-msg.tracker.lookup_rate_increased connection lookup time increasing to {seconds} seconds per call
-msg.tracker.unable_to_get_port_usages Unable to query the processes using ports usage lsof ({exc})
-msg.tracker.unable_to_get_resources Unable to query process resource usage from {resolver} ({exc})
-msg.tracker.unable_to_use_all_resolvers We were unable to use any of your system's resolvers to get tor's connections. This is fine, but means that the connections page will be empty. This is usually permissions related so if you would like to fix this then run nyx with the same user as tor (ie, "sudo -u <tor user> nyx").
-msg.tracker.unable_to_use_resolver Unable to query connections with {old_resolver}, trying {new_resolver}
-
-msg.usage.invalid_arguments {error} (for usage provide --help)
-msg.usage.not_a_valid_address '{address_input}' isn't a valid IPv4 address
-msg.usage.not_a_valid_port '{port_input}' isn't a valid port number
-msg.usage.unrecognized_log_flags Unrecognized event flags: {flags}
-msg.usage.unable_to_set_color_override "{color}" isn't a valid color
-
-msg.debug.header
-|Nyx {nyx_version} Debug Dump
-|Stem Version: {stem_version}
-|Python Version: {python_version}
-|Platform: {system} ({platform})
-|--------------------------------------------------------------------------------
-|Nyx Configuration ({nyxrc_path}):
-|{nyxrc_content}
-|--------------------------------------------------------------------------------
-
-msg.misc.event_types
-|        d DEBUG      a ADDRMAP           r CLIENTS_SEEN      C SIGNAL
-|        i INFO       f AUTHDIR_NEWDESCS  u DESCCHANGED       F STREAM_BW
-|        n NOTICE     j BUILDTIMEOUT_SET  g GUARD             G STATUS_CLIENT
-|        w WARN       b BW                h HS_DESC           H STATUS_GENERAL
-|        e ERR        k CELL_STATS        v HS_DESC_CONTENT   I STATUS_SERVER
-|                     c CIRC              x NETWORK_LIVENESS  s STREAM
-|                     l CIRC_BW           y NEWCONSENSUS      J TB_EMPTY
-|                     m CIRC_MINOR        z NEWDESC           t TRANSPORT_LAUNCHED
-|                     p CONF_CHANGED      B NS
-|                     q CONN_BW           o ORCONN
-|
-|          DINWE tor runlevel+            A All Events
-|          12345 nyx runlevel+            X No Events
-|                                         U Unknown Events
-
-msg.setup.unknown_term
-|Unknown $TERM: ({term})
-|Either update your terminfo database or run nyx using "TERM=xterm nyx".
-|
-
-msg.usage.help_output
-|Usage nyx [OPTION]
-|Terminal status monitor for Tor relays.
-|
-|  -i, --interface [ADDRESS:]PORT  change control interface from {address}:{port}
-|  -s, --socket SOCKET_PATH        attach using unix domain socket if present,
-|                                    SOCKET_PATH defaults to: {socket}
-|  -c, --config CONFIG_PATH        loaded configuration options, CONFIG_PATH
-|                                    defaults to: {config_path}
-|  -d, --debug LOG_PATH            writes all nyx logs to the given location
-|  -l, --log EVENT_FLAGS           event types to be logged (default: {events})
-|
-|{event_flags}
-|
-|  -v, --version                   provides version information
-|  -h, --help                      presents this help
-|
-|Example:
-|nyx -i 1643             attach to control port 1643
-|nyx -l we -c /tmp/cfg   use this configuration file with 'WARN'/'ERR' events
-
-msg.usage.version_output
-|nyx version {version} (released {date})
-|
-
diff --git a/nyx/config/torrc.cfg b/nyx/config/torrc.cfg
deleted file mode 100644
index 71d4608..0000000
--- a/nyx/config/torrc.cfg
+++ /dev/null
@@ -1,53 +0,0 @@
-################################################################################
-#
-# Information related to tor configuration options. This has two sections...
-#
-#   * torrc.alias       Aliases for configuration options tor will accept.
-#   * torrc.units       Labels accepted by tor for various units.
-#
-################################################################################
-
-# Torrc aliases from the _option_abbrevs struct of 'src/or/config.c'. These
-# couldn't be requested via GETCONF as of 0.2.1.19, but this might have been
-# fixed. Discussion is in...
-#
-#   https://trac.torproject.org/projects/tor/ticket/1802
-#
-# TODO: Check if this workaround can be dropped later.
-
-torrc.alias l => Log
-torrc.alias AllowUnverifiedNodes => AllowInvalidNodes
-torrc.alias AutomapHostSuffixes => AutomapHostsSuffixes
-torrc.alias AutomapHostOnResolve => AutomapHostsOnResolve
-torrc.alias BandwidthRateBytes => BandwidthRate
-torrc.alias BandwidthBurstBytes => BandwidthBurst
-torrc.alias DirFetchPostPeriod => StatusFetchPeriod
-torrc.alias MaxConn => ConnLimit
-torrc.alias ORBindAddress => ORListenAddress
-torrc.alias DirBindAddress => DirListenAddress
-torrc.alias SocksBindAddress => SocksListenAddress
-torrc.alias UseHelperNodes => UseEntryGuards
-torrc.alias NumHelperNodes => NumEntryGuards
-torrc.alias UseEntryNodes => UseEntryGuards
-torrc.alias NumEntryNodes => NumEntryGuards
-torrc.alias ResolvConf => ServerDNSResolvConfFile
-torrc.alias SearchDomains => ServerDNSSearchDomains
-torrc.alias ServerDNSAllowBrokenResolvConf => ServerDNSAllowBrokenConfig
-torrc.alias PreferTunnelledDirConns => PreferTunneledDirConns
-torrc.alias BridgeAuthoritativeDirectory => BridgeAuthoritativeDir
-torrc.alias StrictEntryNodes => StrictNodes
-torrc.alias StrictExitNodes => StrictNodes
-
-# Size and time modifiers allowed by 'src/or/config.c'.
-
-torrc.units.size.b b, byte, bytes
-torrc.units.size.kb kb, kbyte, kbytes, kilobyte, kilobytes
-torrc.units.size.mb m, mb, mbyte, mbytes, megabyte, megabytes
-torrc.units.size.gb gb, gbyte, gbytes, gigabyte, gigabytes
-torrc.units.size.tb tb, terabyte, terabytes
-
-torrc.units.time.sec second, seconds
-torrc.units.time.min minute, minutes
-torrc.units.time.hour hour, hours
-torrc.units.time.day day, days
-torrc.units.time.week week, weeks
diff --git a/nyx/settings/attributes.cfg b/nyx/settings/attributes.cfg
new file mode 100644
index 0000000..1942de9
--- /dev/null
+++ b/nyx/settings/attributes.cfg
@@ -0,0 +1,94 @@
+# General configuration data used by nyx.
+
+attr.flag_colors Authority => white
+attr.flag_colors BadExit => red
+attr.flag_colors BadDirectory => red
+attr.flag_colors Exit => cyan
+attr.flag_colors Fast => yellow
+attr.flag_colors Guard => green
+attr.flag_colors HSDir => magenta
+attr.flag_colors Named => blue
+attr.flag_colors Stable => blue
+attr.flag_colors Running => yellow
+attr.flag_colors Unnamed => magenta
+attr.flag_colors Valid => green
+attr.flag_colors V2Dir => cyan
+attr.flag_colors V3Dir => white
+
+attr.version_status_colors new => blue
+attr.version_status_colors new in series => blue
+attr.version_status_colors obsolete => red
+attr.version_status_colors recommended => green
+attr.version_status_colors old => red
+attr.version_status_colors unrecommended => red
+attr.version_status_colors unknown => cyan
+
+attr.hibernate_color awake => green
+attr.hibernate_color soft => yellow
+attr.hibernate_color hard => red
+
+attr.graph.title bandwidth => Bandwidth
+attr.graph.title connections => Connection Count
+attr.graph.title resources => System Resources
+
+attr.graph.header.primary bandwidth => Download
+attr.graph.header.primary connections => Inbound
+attr.graph.header.primary resources => CPU
+
+attr.graph.header.secondary bandwidth => Upload
+attr.graph.header.secondary connections => Outbound
+attr.graph.header.secondary resources => Memory
+
+attr.log_color DEBUG => magenta
+attr.log_color INFO => blue
+attr.log_color NOTICE => green
+attr.log_color WARN => yellow
+attr.log_color ERR => red
+
+attr.log_color NYX_DEBUG => magenta
+attr.log_color NYX_INFO => blue
+attr.log_color NYX_NOTICE => green
+attr.log_color NYX_WARN => yellow
+attr.log_color NYX_ERR => red
+
+attr.log_color CIRC => yellow
+attr.log_color BW => cyan
+attr.log_color NS => blue
+attr.log_color NEWCONSENSUS => blue
+attr.log_color GUARD => yellow
+
+attr.connection.category_color Inbound => green
+attr.connection.category_color Outbound => blue
+attr.connection.category_color Exit => red
+attr.connection.category_color Hidden => magenta
+attr.connection.category_color Socks => yellow
+attr.connection.category_color Circuit => cyan
+attr.connection.category_color Directory => magenta
+attr.connection.category_color Control => red
+
+attr.connection.sort_color Category => red
+attr.connection.sort_color Uptime => yellow
+attr.connection.sort_color Listing => green
+attr.connection.sort_color Ip Address => blue
+attr.connection.sort_color Port => blue
+attr.connection.sort_color Fingerprint => cyan
+attr.connection.sort_color Nickname => cyan
+attr.connection.sort_color Country => blue
+
+attr.config.category_color General => green
+attr.config.category_color Client => blue
+attr.config.category_color Relay => yellow
+attr.config.category_color Directory => magenta
+attr.config.category_color Authority => red
+attr.config.category_color Hidden Service => cyan
+attr.config.category_color Testing => white
+attr.config.category_color Unknown => white
+
+attr.config.sort_color Name => blue
+attr.config.sort_color Value => cyan
+attr.config.sort_color Value Type => green
+attr.config.sort_color Category => red
+attr.config.sort_color Usage => yellow
+attr.config.sort_color Summary => green
+attr.config.sort_color Description => white
+attr.config.sort_color Man Page Entry => blue
diff --git a/nyx/settings/dedup.cfg b/nyx/settings/dedup.cfg
new file mode 100644
index 0000000..42d8102
--- /dev/null
+++ b/nyx/settings/dedup.cfg
@@ -0,0 +1,91 @@
+################################################################################
+#
+# Snippets from common log messages. These are used to determine when entries
+# with dynamic content (hostnames, numbers, etc) are the same. If this matches
+# the start of both messages then the entries are flagged as duplicates. If the
+# entry begins with an asterisk (*) then it checks if the substrings exist
+# anywhere in the messages.
+#
+# Examples for the complete messages:
+#
+# [BW] READ: 0, WRITTEN: 0
+# [DEBUG] connection_handle_write(): After TLS write of 512: 0 read, 586 written
+# [DEBUG] flush_chunk_tls(): flushed 512 bytes, 0 ready to flush, 0 remain.
+# [DEBUG] conn_read_callback(): socket 7 wants to read.
+# [DEBUG] conn_write_callback(): socket 51 wants to write.
+# [DEBUG] connection_remove(): removing socket -1 (type OR), n_conns now 50
+# [DEBUG] connection_or_process_cells_from_inbuf(): 7: starting, inbuf_datalen
+#         0 (0 pending in tls object).
+# [DEBUG] connection_read_to_buf(): 38: starting, inbuf_datalen 0 (0 pending in
+#         tls object). at_most 12800.
+# [DEBUG] connection_read_to_buf(): TLS connection closed on read. Closing.
+#         (Nickname moria1, address 128.31.0.34)
+# [INFO] run_connection_housekeeping(): Expiring non-open OR connection to fd
+#        16 (79.193.61.171:443).
+# [INFO] rep_hist_downrate_old_runs(): Discounting all old stability info by a
+#        factor of 0.950000
+# [NOTICE] Circuit build timeout of 96803ms is beyond the maximum build time we 
+#          have ever observed. Capping it to 96107ms.
+#   The above NOTICE changes to an INFO message in maint-0.2.2
+# [NOTICE] Based on 1000 circuit times, it looks like we don't need to wait so 
+#          long for circuits to finish. We will now assume a circuit is too slow
+#          to use after waiting 65 seconds.
+# [NOTICE] We stalled too much while trying to write 150 bytes to address
+#          [scrubbed].  If this happens a lot, either something is wrong with
+#          your network connection, or something is wrong with theirs. (fd 238,
+#          type Directory, state 1, marked at main.c:702).
+# [NOTICE] I learned some more directory information, but not enough to build a
+#          circuit: We have only 469/2027 usable descriptors.
+# [NOTICE] Attempt by %s to open a stream from unknown relay. Closing.
+# [NOTICE] Average packaged cell fullness: 70.976%. TLS write overhead: 11%
+# [NOTICE] Heartbeat: Tor's uptime is 8 days 6:00 hours, with 0 circuits open.
+#          I've sent 3.53 MB and received 90.61 MB.
+# [WARN] You specified a server "Amunet8" by name, but this name is not
+#        registered
+# [WARN] I have no descriptor for the router named "Amunet8" in my declared
+#        family; I'll use the nickname as is, but this   may confuse clients.
+# [WARN] Controller gave us config lines that didn't validate: Value
+#        'BandwidthRate  ' is malformed or out of bounds.
+# [WARN] Problem bootstrapping. Stuck at 80%: Connecting to the Tor network.
+#        (Network is unreachable; NOROUTE; count 47;    recommendation warn)
+# [WARN] 4 unknown, 1 missing key, 3 good, 0 bad, 1 no signature, 4 required
+# [NYX_DEBUG] refresh rate: 0.001 seconds
+# [NYX_DEBUG] proc call (process connections): /proc/net/[tcp|udp] (runtime: 0.0018)
+# [NYX_DEBUG] system call: ps -p 2354 -o %cpu,rss,%mem,etime (runtime: 0.02)
+# [NYX_DEBUG] system call: netstat -npt | grep 2354/tor (runtime: 0.02)
+# [NYX_DEBUG] recreating panel 'graph' with the dimensions of 14/124
+# [NYX_DEBUG] redrawing the log panel with the corrected content height (estimat was off by 4)
+# [NYX_DEBUG] GETINFO accounting/bytes-left (runtime: 0.0006)
+# [NYX_DEBUG] GETINFO traffic/read (runtime: 0.0004)
+# [NYX_DEBUG] GETINFO traffic/written (runtime: 0.0002)
+# [NYX_DEBUG] GETCONF MyFamily (runtime: 0.0007)
+# [NYX_DEBUG] Unable to query process resource usage from ps, waiting 6.25 seconds (unrecognized output from ps: ...)
+#
+################################################################################
+
+dedup.BW READ:
+dedup.DEBUG connection_handle_write(): After TLS write of
+dedup.DEBUG flush_chunk_tls(): flushed
+dedup.DEBUG conn_read_callback(): socket
+dedup.DEBUG conn_write_callback(): socket
+dedup.DEBUG connection_remove(): removing socket
+dedup.DEBUG connection_or_process_cells_from_inbuf():
+dedup.DEBUG *pending in tls object). at_most
+dedup.DEBUG connection_read_to_buf(): TLS connection closed on read. Closing.
+dedup.INFO run_connection_housekeeping(): Expiring
+dedup.INFO rep_hist_downrate_old_runs(): Discounting all old stability info by a factor of
+dedup.INFO *build time we have ever observed. Capping it to
+dedup.NOTICE *build time we have ever observed. Capping it to
+dedup.NOTICE *We will now assume a circuit is too slow to use after waiting
+dedup.NOTICE We stalled too much while trying to write
+dedup.NOTICE I learned some more directory information, but not enough to build a circuit
+dedup.NOTICE Attempt by
+dedup.NOTICE *Loading relay descriptors.
+dedup.NOTICE Average packaged cell fullness:
+dedup.NOTICE Heartbeat: Tor's uptime is
+dedup.WARN You specified a server
+dedup.WARN I have no descriptor for the router named
+dedup.WARN Controller gave us config lines that didn't validate
+dedup.WARN Problem bootstrapping. Stuck at
+dedup.WARN *missing key,
+
diff --git a/nyx/settings/strings.cfg b/nyx/settings/strings.cfg
new file mode 100644
index 0000000..85b4f8d
--- /dev/null
+++ b/nyx/settings/strings.cfg
@@ -0,0 +1,107 @@
+################################################################################
+#
+# User facing strings. These are sorted into the following namespaces...
+#
+#   * config    parsing or handling configuration options
+#   * debug     concerns the --debug argument
+#   * misc      anything that doesn't fit into a present namespace
+#   * panel     used after startup by our curses panels
+#   * setup     notificaitons or issues arising while starting nyx
+#   * tracker   related to tracking resource usage or connections
+#   * usage     usage information about starting and running nyx
+#
+################################################################################
+
+msg.wrap {text}
+
+msg.config.unable_to_read_file Failed to load configuration (using defaults): "{error}"
+msg.config.nothing_loaded No nyxrc loaded, using defaults. You can customize nyx by placing a configuration file at {path} (see the nyxrc.sample for its options).
+
+msg.debug.saving_to_path Saving a debug log to {path}, please check it for sensitive information before sharing it.
+msg.debug.unable_to_write_file Unable to write to our debug log file ({path}): {error}
+
+msg.panel.graphing.prepopulation_successful Bandwidth graph has information for the last {duration}
+msg.panel.graphing.bw_event_cache_malformed Tor's 'GETINFO bw-event-cache' provided malformed output: {response}
+msg.panel.header.fd_used_at_sixty_percent Tor's file descriptor usage is at {percentage}%.
+msg.panel.header.fd_used_at_ninety_percent Tor's file descriptor usage is at {percentage}%. If you run out Tor will be unable to continue functioning.
+msg.panel.log.read_from_log_file Read {count} entries from tor's log file: {path} (read limit: {read_limit}, runtime: {runtime})
+
+msg.setup.nyx_is_running_as_root Nyx is currently running with root permissions. This isn't a good idea, nor should it be necessary.
+msg.setup.chroot_doesnt_exist The chroot path set in your config ({path}) doesn't exist.
+msg.setup.set_freebsd_chroot Adjusting paths to account for Tor running in a FreeBSD jail at: {path}
+msg.setup.tor_is_running_as_root Tor is currently running with root permissions. This isn't a good idea, nor should it be necessary. See the 'User UID' option on Tor's man page for an easy method of reducing its permissions after startup.
+msg.setup.unable_to_determine_pid Unable to determine Tor's pid. Some information, like its resource usage will be unavailable.
+msg.setup.unknown_event_types nyx doesn't recognize the following event types: {event_types} (log 'UNKNOWN' events to see them)
+msg.setup.color_support_available Terminal color support detected and enabled
+msg.setup.color_support_unavailable Terminal color support unavailable
+
+msg.tracker.abort_getting_resources Failed three attempts to get process resource usage from {resolver}, {response} ({exc})
+msg.tracker.abort_getting_port_usage Failed three attempts to determine the process using active ports ({exc})
+msg.tracker.lookup_rate_increased connection lookup time increasing to {seconds} seconds per call
+msg.tracker.unable_to_get_port_usages Unable to query the processes using ports usage lsof ({exc})
+msg.tracker.unable_to_get_resources Unable to query process resource usage from {resolver} ({exc})
+msg.tracker.unable_to_use_all_resolvers We were unable to use any of your system's resolvers to get tor's connections. This is fine, but means that the connections page will be empty. This is usually permissions related so if you would like to fix this then run nyx with the same user as tor (ie, "sudo -u <tor user> nyx").
+msg.tracker.unable_to_use_resolver Unable to query connections with {old_resolver}, trying {new_resolver}
+
+msg.usage.invalid_arguments {error} (for usage provide --help)
+msg.usage.not_a_valid_address '{address_input}' isn't a valid IPv4 address
+msg.usage.not_a_valid_port '{port_input}' isn't a valid port number
+msg.usage.unrecognized_log_flags Unrecognized event flags: {flags}
+msg.usage.unable_to_set_color_override "{color}" isn't a valid color
+
+msg.debug.header
+|Nyx {nyx_version} Debug Dump
+|Stem Version: {stem_version}
+|Python Version: {python_version}
+|Platform: {system} ({platform})
+|--------------------------------------------------------------------------------
+|Nyx Configuration ({nyxrc_path}):
+|{nyxrc_content}
+|--------------------------------------------------------------------------------
+
+msg.misc.event_types
+|        d DEBUG      a ADDRMAP           r CLIENTS_SEEN      C SIGNAL
+|        i INFO       f AUTHDIR_NEWDESCS  u DESCCHANGED       F STREAM_BW
+|        n NOTICE     j BUILDTIMEOUT_SET  g GUARD             G STATUS_CLIENT
+|        w WARN       b BW                h HS_DESC           H STATUS_GENERAL
+|        e ERR        k CELL_STATS        v HS_DESC_CONTENT   I STATUS_SERVER
+|                     c CIRC              x NETWORK_LIVENESS  s STREAM
+|                     l CIRC_BW           y NEWCONSENSUS      J TB_EMPTY
+|                     m CIRC_MINOR        z NEWDESC           t TRANSPORT_LAUNCHED
+|                     p CONF_CHANGED      B NS
+|                     q CONN_BW           o ORCONN
+|
+|          DINWE tor runlevel+            A All Events
+|          12345 nyx runlevel+            X No Events
+|                                         U Unknown Events
+
+msg.setup.unknown_term
+|Unknown $TERM: ({term})
+|Either update your terminfo database or run nyx using "TERM=xterm nyx".
+|
+
+msg.usage.help_output
+|Usage nyx [OPTION]
+|Terminal status monitor for Tor relays.
+|
+|  -i, --interface [ADDRESS:]PORT  change control interface from {address}:{port}
+|  -s, --socket SOCKET_PATH        attach using unix domain socket if present,
+|                                    SOCKET_PATH defaults to: {socket}
+|  -c, --config CONFIG_PATH        loaded configuration options, CONFIG_PATH
+|                                    defaults to: {config_path}
+|  -d, --debug LOG_PATH            writes all nyx logs to the given location
+|  -l, --log EVENT_FLAGS           event types to be logged (default: {events})
+|
+|{event_flags}
+|
+|  -v, --version                   provides version information
+|  -h, --help                      presents this help
+|
+|Example:
+|nyx -i 1643             attach to control port 1643
+|nyx -l we -c /tmp/cfg   use this configuration file with 'WARN'/'ERR' events
+
+msg.usage.version_output
+|nyx version {version} (released {date})
+|
+
diff --git a/nyx/settings/torrc.cfg b/nyx/settings/torrc.cfg
new file mode 100644
index 0000000..71d4608
--- /dev/null
+++ b/nyx/settings/torrc.cfg
@@ -0,0 +1,53 @@
+################################################################################
+#
+# Information related to tor configuration options. This has two sections...
+#
+#   * torrc.alias       Aliases for configuration options tor will accept.
+#   * torrc.units       Labels accepted by tor for various units.
+#
+################################################################################
+
+# Torrc aliases from the _option_abbrevs struct of 'src/or/config.c'. These
+# couldn't be requested via GETCONF as of 0.2.1.19, but this might have been
+# fixed. Discussion is in...
+#
+#   https://trac.torproject.org/projects/tor/ticket/1802
+#
+# TODO: Check if this workaround can be dropped later.
+
+torrc.alias l => Log
+torrc.alias AllowUnverifiedNodes => AllowInvalidNodes
+torrc.alias AutomapHostSuffixes => AutomapHostsSuffixes
+torrc.alias AutomapHostOnResolve => AutomapHostsOnResolve
+torrc.alias BandwidthRateBytes => BandwidthRate
+torrc.alias BandwidthBurstBytes => BandwidthBurst
+torrc.alias DirFetchPostPeriod => StatusFetchPeriod
+torrc.alias MaxConn => ConnLimit
+torrc.alias ORBindAddress => ORListenAddress
+torrc.alias DirBindAddress => DirListenAddress
+torrc.alias SocksBindAddress => SocksListenAddress
+torrc.alias UseHelperNodes => UseEntryGuards
+torrc.alias NumHelperNodes => NumEntryGuards
+torrc.alias UseEntryNodes => UseEntryGuards
+torrc.alias NumEntryNodes => NumEntryGuards
+torrc.alias ResolvConf => ServerDNSResolvConfFile
+torrc.alias SearchDomains => ServerDNSSearchDomains
+torrc.alias ServerDNSAllowBrokenResolvConf => ServerDNSAllowBrokenConfig
+torrc.alias PreferTunnelledDirConns => PreferTunneledDirConns
+torrc.alias BridgeAuthoritativeDirectory => BridgeAuthoritativeDir
+torrc.alias StrictEntryNodes => StrictNodes
+torrc.alias StrictExitNodes => StrictNodes
+
+# Size and time modifiers allowed by 'src/or/config.c'.
+
+torrc.units.size.b b, byte, bytes
+torrc.units.size.kb kb, kbyte, kbytes, kilobyte, kilobytes
+torrc.units.size.mb m, mb, mbyte, mbytes, megabyte, megabytes
+torrc.units.size.gb gb, gbyte, gbytes, gigabyte, gigabytes
+torrc.units.size.tb tb, terabyte, terabytes
+
+torrc.units.time.sec second, seconds
+torrc.units.time.min minute, minutes
+torrc.units.time.hour hour, hours
+torrc.units.time.day day, days
+torrc.units.time.week week, weeks
diff --git a/nyx/util/__init__.py b/nyx/util/__init__.py
index 350e96e..e32a816 100644
--- a/nyx/util/__init__.py
+++ b/nyx/util/__init__.py
@@ -37,7 +37,7 @@ stem.control.CACHEABLE_GETINFO_PARAMS = list(stem.control.CACHEABLE_GETINFO_PARA
 stem.control.LOG_CACHE_FETCHES = False
 
 try:
-  uses_settings = stem.util.conf.uses_settings('nyx', os.path.join(BASE_DIR, 'config'), lazy_load = False)
+  uses_settings = stem.util.conf.uses_settings('nyx', os.path.join(BASE_DIR, 'settings'), lazy_load = False)
 except IOError as exc:
   print("Unable to load nyx's internal configurations: %s" % exc)
   sys.exit(1)





More information about the tor-commits mailing list