Skip to content

Update 封装的一些基础工具.md #19

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
18 changes: 18 additions & 0 deletions 封装的一些基础工具.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,24 @@

以3秒为周期,收集使用goleveldb过程中的延时和I/O数据量等指标。看起来很方便,但问题是我们如何使用这些收集来的信息呢?

我们可以使用命令列来看目前探针储存的讯息,命令格式如下:

```BASH
$geth monitor --attach /YOUR/GETH/IPC/ADDRESS 探针键
```

比方说我要看 txpool/invalid/Overall,就要输入下列的命令:

```BASH
$geth monitor --attach /YOUR/GETH/IPC/ADDRESS txpool/invalid/Overall
```

如果要看所有的键值,只要输入下列命令就行了

```BASH
$geth monitor --attach /YOUR/GETH/IPC/ADDRESS
```

## log(日志)
golang的内置log包一直被作为槽点,而以太坊项目也不例外。故引入了[log15](https://github.com/inconshreveable/log15)以解决日志使用不便的问题。

Expand Down