Skip to content

Commit

Permalink
docs: add some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fengjiachun committed Jan 9, 2024
1 parent a14373c commit e5cecfe
Show file tree
Hide file tree
Showing 6 changed files with 387 additions and 8 deletions.
9 changes: 9 additions & 0 deletions docs/global-options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Global Options (System properties / Java -Dxxx)

| Name | Description |
|:-----------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| greptimedb.use_os_signal | Whether or not to use OS Signal, SDK listens for SIGUSR2 signals by default and can outputs some information. This is helpful when troubleshooting complex issues. |
| greptimedb.signal.out_dir | Signal handler can output to the specified directory, default is the process start directory. |
| greptimedb.available_cpus | Specify the number of available cpus, the default is to use the full number of cpus of the current environment. |
| greptimedb.reporter.period_minutes | Metrics reporter timed output period, default 30 minutes. |
| greptimedb.read.write.rw_logging | Whether to print logs for each read/write operation, default off. |
40 changes: 40 additions & 0 deletions docs/magic-tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Magic Tools

### How to use `kill -s SIGUSR2 $pid`

The first time you execute `kill -s SIGUSR2 $pid` you will see the following help messages on
the log output, including:

- Turn on/off the output of the condensed version of the read/write log.
- Turn on/off limiter
- Export in-memory metrics and memory state information of important objects to a local file

### Just follow the help information

```text
- -- GreptimeDB Signal Help --
- Signal output dir: /Users/xxx
-
- How to open or close read/write log(The second execution means close):
- [1] `cd /Users/xxx`
- [2] `touch rw_logging.sig`
- [3] `kill -s SIGUSR2 $pid`
- [4] `rm rw_logging.sig`
-
-
- How to open or close rpc limiter(The second execution means close):
- [1] `cd /Users/xxx`
- [2] `touch rpc_limit.sig`
- [3] `kill -s SIGUSR2 $pid`
- [4] `rm rpc_limit.sig`
-
- How to get metrics and display info:
- [1] `cd /Users/xxx`
- [2] `rm *.sig`
- [3] `kill -s SIGUSR2 $pid`
-
- The file signals that is currently open:
-
- Displaying GreptimeDB clients triggered by signal: USR2 to file: /Users/xxx/greptimedb_client_display.log.2024-01-09_16-28-38.
- Printing GreptimeDB client metrics triggered by signal: USR2 to file: /Users/xxx/greptimedb_client_metrics.log.2024-01-09_16-28-38.
```
Loading

0 comments on commit e5cecfe

Please sign in to comment.