Description
This document describes the structured log tags output by SnapRAID, which are designed to be used by tools monitoring the SnapRAID processing state. The tags provide information in an easy-to-parse format, ideal for automation and integration.
To capture these structured log tags, you must use the `--log` option with SnapRAID.
You can direct the output to a specific file, or force the output to the standard output or standard error using the special arguments `>&1` or `>&2`. Note that these arguments often need to be quoted on the command line to prevent the shell from interpreting them.
Example:
snapraid status --log ">&2"
The output tags strictly adhere to the following format:
NAME:VALUE:VALUE:VALUE...<EOL>
This document provides a summary of the tags generated by SnapRAID. For the most detailed and up-to-date information regarding the meaning and context of the values, it is recommended to check the source code's `log_tag()` statements.
When a path is output, it is always escaped using a backslash (\) as the escape character.
The following characters are escaped into sequences:
Some tags are output only when the `--gui` or `--gui-verbose` option is used. They provide extra verbose state and runtime progress only useful for a GUI interface.
Integer values are marked as `uint` when they are unsigned and as `int` when they are signed. However, for practical purposes you can treat all of them as signed integers. All integer values should be assumed to be 64 bits wide, regardless of the signed/unsigned marker. Floating point values are marked as `float`.
Configuration Tags
These tags report the memory usage and global configuration.
Content Tags
These tags report the information stored in the content file.
Diagnostics Tags
Scan Tags
These tags report detected differences between the filesystem and the content file. They are output for every discovered change.
These tags provide a final count of all detected changes.
General Progress and Execution Tags
These tags are used to report the runtime processing of the commands `sync`, `scrub`, `check` and `fix`. Only produced when `--gui` option is used.
Thermal Tags
The following tags are produced by the thermal monitoring functions when SnapRAID is processing, typically during operations that involve disk access.
Command Status Tags
This section describes the tags output with the `status` command.
Summary Tags
These tags provide general information about the array configuration and overall state.
Per-Disk Tags
These tags provide statistics for individual data disks. <name> is the disk name.
File Timestamp Tags
These tags list files with zero sub-second timestamps.
Scrub Graph Tags
These tags provide a simple graph data of the past scrub and sync operations.
Command Sync/Scrub Tags
Tags specific for the `sync` and `scrub` commands. Also the error tags are possible.
Summary Tags
These tags provide summary statistics at the end of the command.