Skip to content

Commit a478cbb

Browse files
authored
Merge pull request #397 from daipom/add-description-about-new-dump-func
1.0: Add description about new dump function of fluent-ctl and RPC
2 parents 9afb20c + dc0ddcf commit a478cbb

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

deployment/command-line-option.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,21 +162,55 @@ Options:
162162
Control `fluentd` process using [Signals](signals.md) or Windows Event.
163163

164164
```text
165-
Usage: fluent-ctl COMMAND PID
165+
Usage: fluent-ctl COMMAND [PID_OR_SVCNAME]
166166
167167
Commands:
168168
shutdown
169169
restart
170170
flush
171171
reload
172+
dump
172173
```
173174

174175
### Example
175176

177+
You can specify the process id of the supervisor process.
178+
176179
```text
177180
fluent-ctl shutdown 11111
178181
```
179182

183+
If you run Fluentd as a Windows service, then you can omit `PID_OR_SVCNAME` when the service name is the default value `fluentdwinsvc`.
184+
185+
```text
186+
fluent-ctl dump
187+
```
188+
189+
### About `dump`
190+
191+
This function is mainly for Windows.
192+
193+
On Windows, this makes all Fluentd processes (including all worker processes) dump their internal status to the system temp directory (`C:\\Windows\\Temp`). This is the same behavior as sending SIGCONT to all processes on non-Windows.
194+
195+
Since this uses [SIGDUMP](https://github.com/frsyuki/sigdump), you can change the output path by specifying `SIGDUMP_PATH` environment variable. Note that the path has to be a file path.
196+
197+
```Powershell
198+
$ $env:SIGDUMP_PATH="/sigdump/sigdump.log" # The directory `sidgump` has to exist.
199+
$ fuentd -c ...
200+
$ fluent-ctl dump # At another shell.
201+
```
202+
203+
Then Fluentd dumps files as following. Each process id is automatically added to the path.
204+
205+
```text
206+
... [info]: fluent/log.rb:330:info: dump to /sigdump/sigdump-41544.log.
207+
... [info]: #0 fluent/log.rb:330:info: dump to /sigdump/sigdump-21152.log.
208+
... [info]: #1 fluent/log.rb:330:info: dump to /sigdump/sigdump-15656.log.
209+
...
210+
```
211+
212+
As for non-Windows, you don't have to use this function because you can manually send SIGCONT to each process. Although you can use this function on non-Windows, this just sends SIGCONT to the supervisor process, so you can get only the status of the supervisor process.
213+
180214
## `fluent-cap-ctl`
181215

182216
Control Linux Capability for Fluentd. See [Linux Capability](linux-capability.md) article.

deployment/trouble-shooting.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ $ fluentd .. -vv
6565

6666
Fluentd uses [SIGDUMP](https://github.com/frsyuki/sigdump) for dumping fluentd internal information to a local file, e.g. thread dump, object allocation, etc. If you have a problem with fluentd like process hang, please send `SIGCONT` to fluentd parent and child processes.
6767

68+
On Windows, you can use [fluent-ctl](command-line-option.md#fluent-ctl).
69+
6870
## High CPU Usage Issue
6971

7072
If `fluentd` suddenly hits unexpected high CPU usage problem, there are several reasons:

0 commit comments

Comments
 (0)