Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

[docs] Add trace_api_util reference to eosio utilities docs - 2.0 #9498

Merged
merged 6 commits into from
Sep 16, 2020
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
5 changes: 4 additions & 1 deletion docs/01_nodeos/03_plugins/trace_api_plugin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ nodeos --data-dir data_dir --config-dir config_dir --trace-dir traces_dir

## Maintenance Note

To reduce the disk space consummed by the `trace_api_plugin`, configure the following option:
To reduce the disk space consumed by the `trace_api_plugin`, configure the following option:

```console
--trace-minimum-irreversible-history-blocks N (=-1)
Expand All @@ -113,6 +113,9 @@ Once the value is no longer `-1`, only `N` number of blocks before the current L

If resource usage cannot be effectively managed via the `trace-minimum-irreversible-history-blocks` configuration option, then there might be a need for ongoing maintenance. In that case, the user may prefer to manage resources with an external system or process.

[[info | Compressed `log` files]]
| To save more disk space, the trace `log` files can be compressed with the [trace_api_util](../../../10_utilities/trace_api_util.md) utility.

### Manual Filesystem Management

The `trace-dir` configuration option defines a location on the filesystem where all artefacts created by the `trace_api_plugin` are stored. These files are stable once the LIB block has progressed past that slice and then can be deleted at any time to reclaim filesystem space. The conventions regarding these files are to be determined. However, the remainder of the system will tolerate any out-of-process management system that removes some or all of these files in this directory regardless of what data they represent, or whether there is a running `nodeos` instance accessing them or not. Data which would nominally be available, but is no longer so due to manual maintenance, will result in a HTTP 404 response from the appropriate API endpoint(s).
Expand Down
3 changes: 2 additions & 1 deletion docs/10_utilities/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ link_text: EOSIO Utilities

This section contains documentation for additional utilities that complement or extend `nodeos` and potentially other EOSIO software:

* [eosio-blocklog](05_eosio-blocklog.md) - Low-level utility for node operators to interact with block log files.
* [eosio-blocklog](eosio-blocklog.md) - Low-level utility for node operators to interact with block log files.
* [trace_api_util](trace_api_util.md) - Low-level utility for performing tasks associated with the [Trace API](../01_nodeos/03_plugins/trace_api_plugin/index.md).
48 changes: 48 additions & 0 deletions docs/10_utilities/trace_api_util.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
content_title: trace_api_util
link_text: trace_api_util
---

`trace_api_util` is a command-line interface (CLI) utility that allows node operators to perform low-level tasks associated with the [Trace API Plugin](../01_nodeos/03_plugins/trace_api_plugin/index.md). `trace_api_util` can perform one of the following operations:

* Compress a trace `log` file into the compressed `clog` format.

## Usage
```sh
trace_api_util <options> command ...
```

## Options
Option (=default) | Description
-|-
`-h [ --help` ] | show usage help message

## Commands
Command | Description
-|-
`compress` | Compress a trace file to into the `clog` format

### compress
Compress a trace `log` file into the `clog` format. By default the name of the compressed file will be the same as the `input-path` but with the file extension changed to `clog`.

#### Usage
```sh
trace_api_util compress <options> input-path [output-path]
```

#### Positional Options
Option (=default) | Description
-|-
`input-path` | path to the file to compress
`output-path` | [Optional] output file or directory path

#### Options
Option (=default) | Description
-|-
`-h [ --help ]` | show usage help message
`-s [ --seek-point-stride ] arg (=512)` | the number of bytes between seek points in a compressed trace. A smaller stride may degrade compression efficiency but increase read efficiency

## Remarks
When `trace_api_util` is launched, the utility attempts to perform the specified operation, then yields the following possible outcomes:
* If successful, the selected operation is performed and the utility terminates with a zero error code (no error).
* If unsuccessful, the utility outputs an error to `stderr` and terminates with a non-zero error code (indicating an error).