Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add some docs #14

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading