summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-04-04 10:33:01 -0400
committerNick Mathewson <nickm@torproject.org>2014-04-24 10:26:14 -0400
commite3af72647db51e99186b9f284066dedcdc8c10d6 (patch)
tree070853d6de71b2c3abb0fb0a2a321e084eefa82a
parent17ecd04fde2fd98b0cca3afb251b7173e22d3f42 (diff)
downloadtor-e3af72647db51e99186b9f284066dedcdc8c10d6.tar.gz
tor-e3af72647db51e99186b9f284066dedcdc8c10d6.zip
Expose the real maxmeminqueues via a GETINFO
That is, GETINFO limits/max-mem-in-queues
-rw-r--r--changes/bug113964
-rw-r--r--src/or/control.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/changes/bug11396 b/changes/bug11396
index af94be04f9..fd263291d9 100644
--- a/changes/bug11396
+++ b/changes/bug11396
@@ -5,3 +5,7 @@
the default was always 8 GB. You can still override the default by
setting MaxMemInQueues yourself. Resolves ticket 11396.
+ o Minor features (controller):
+ - Because of the fix for ticket 11396, the real limit for memory
+ usage may no longer match the configured MaxMemInQueues value.
+ The real limit is now exposed via GETINFO limits/max-mem-in-queues.
diff --git a/src/or/control.c b/src/or/control.c
index 23e2054f9e..4d41e10a9f 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -1504,6 +1504,9 @@ getinfo_helper_misc(control_connection_t *conn, const char *question,
int max_fds=-1;
set_max_file_descriptors(0, &max_fds);
tor_asprintf(answer, "%d", max_fds);
+ } else if (!strcmp(question, "limits/max-mem-in-queues")) {
+ tor_asprintf(answer, U64_FORMAT,
+ U64_PRINTF_ARG(get_options()->MaxMemInQueues));
} else if (!strcmp(question, "dir-usage")) {
*answer = directory_dump_request_log();
} else if (!strcmp(question, "fingerprint")) {
@@ -2184,6 +2187,7 @@ static const getinfo_item_t getinfo_items[] = {
ITEM("process/user", misc,
"Username under which the tor process is running."),
ITEM("process/descriptor-limit", misc, "File descriptor limit."),
+ ITEM("limits/max-mem-in-queues", misc, "Actual limit on memory in queues"),
ITEM("dir-usage", misc, "Breakdown of bytes transferred over DirPort."),
PREFIX("desc-annotations/id/", dir, "Router annotations by hexdigest."),
PREFIX("dir/server/", dir,"Router descriptors as retrieved from a DirPort."),