Browse code

Add documentation on the dump-stack-traces capability of the daemon

Add a paragraph about how to force a stack trace dump to the daemon log.
This feature was added in Docker 1.9 I believe, but documentation was
never added.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)

Phil Estes authored on 2016/03/18 15:19:07
Showing 1 changed files
... ...
@@ -61,6 +61,24 @@ These options :
61 61
 The command line reference has the [complete list of daemon flags](../reference/commandline/daemon.md)
62 62
 with explanations.
63 63
 
64
+### Daemon debugging
65
+
66
+As noted above, setting the log level of the daemon to "debug" or enabling debug mode
67
+with `-D` allows the administrator or operator to gain much more knowledge about the
68
+runtime activity of the daemon. If faced with a non-responsive daemon, the administrator
69
+can force a full stack trace of all threads to be added to the daemon log by sending the
70
+`SIGUSR1` signal to the Docker daemon. A common way to send this signal is using the `kill`
71
+command on Linux systems. For example, `kill -USR1 <daemon-pid>` sends the `SIGUSR1`
72
+signal to the daemon process, causing the stack dump to be added to the daemon log.
73
+
74
+> **Note:** The log level setting of the daemon must be at least "info" level and above for
75
+> the stack trace to be saved to the logfile. By default the daemon's log level is set to
76
+> "info".
77
+
78
+The daemon will continue operating after handling the `SIGUSR1` signal and dumping the stack
79
+traces to the log. The stack traces can be used to determine the state of all goroutines and
80
+threads within the daemon.
81
+
64 82
 ## Ubuntu
65 83
 
66 84
 As of `14.04`, Ubuntu uses Upstart as a process manager. By default, Upstart jobs