Auto update

This commit is contained in:
Andrea Mazzoleni 2025-12-14 22:21:44 +01:00
parent 553a4afaf7
commit 2e4c68f65e
11 changed files with 3540 additions and 5994 deletions

180
log.html
View file

@ -64,30 +64,24 @@ Log Tags Documentation for <span class="bold">SnapRAID</span>.
<h2><a name="1">1</a>
Description
</h2>
This document describes the structured log tags output by SnapRAID,
<p>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.
<p>
To capture these structured log tags, you must use the `--log` option
</p><p>To capture these structured log tags, you must use the `--log` option
with SnapRAID.
<p>
You can direct the output to a specific file, or force the output to
</p><p>You can direct the output to a specific file, or force the output to
the standard output or standard error using the special arguments
`&gt;&amp;1` or `&gt;&amp;2`. Note that these arguments often need to be quoted on
the command line to prevent the shell from interpreting them.
<p>
Example:
<p>
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td width="5%"></td><td width="95%">
</p><p>Example:
</p><table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td width="5%"></td><td width="95%">
<pre>
snapraid status --log "&gt;&amp;2"
</pre>
</td></tr></table>
<p>
The output tags strictly adhere to the following format:
<p>
<pre>
<p>The output tags strictly adhere to the following format:
</p><pre>
NAME:VALUE:VALUE:VALUE...&lt;EOL&gt;
</pre>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
@ -110,17 +104,14 @@ values. They are separated by a colon `:`.
Each tag is terminated by an end-of-line character.
</td></tr>
</table>
<p>
This document provides a summary of the tags generated by SnapRAID.
<p>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.
<p>
When a path is output, it is always escaped using a backslash (\) as
</p><p>When a path is output, it is always escaped using a backslash (\) as
the escape character.
<p>
The following characters are escaped into sequences:
<table width="100%" border="0" cellspacing="0" cellpadding="2">
</p><p>The following characters are escaped into sequences:
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td width="5%"></td><td width="5%"><em>
The colon
</em></td><td width="90%">
@ -142,16 +133,15 @@ The backslash
is escaped to \\.
</td></tr>
</table>
<p>
Some tags are output only when the `--gui` option is used. They provide
<p>Some tags are output only when the `--gui` option is used. They provide
extra verbose state and runtime progress only useful for a GUI
interface.
<h2><a name="2">2</a>
</p><h2><a name="2">2</a>
Configuration Tags
</h2>
These tags report the memory usage and global configuration after
<p>These tags report the memory usage and global configuration after
scanning the disk and reading the list of files.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
conf:file:&lt;path&gt;
</strong></td></tr><tr><td>
@ -400,10 +390,10 @@ Size of the internal `snapraid_dir` structure in bytes (uint64).
<h2><a name="4">4</a>
Scan Tags
</h2>
These tags report detected differences between the filesystem and the
<p>These tags report detected differences between the filesystem and the
content file. They are output for every discovered change, and
`scan:equal` is only output when the `--gui` option is used.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
scan:equal:&lt;disk_name&gt;:&lt;path&gt;
</strong></td></tr><tr><td>
@ -500,9 +490,8 @@ The file won't be re-hashed in `sync` as its precomputed hash
is assumed to be correct.
</td></tr>
</table>
<p>
These tags provide a final count of all detected changes.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<p>These tags provide a final count of all detected changes.
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
summary:equal:&lt;count&gt;
</strong></td></tr><tr><td>
@ -570,9 +559,9 @@ The array needs a `sync` operation.
<h2><a name="5">5</a>
General Progress and Execution Tags
</h2>
These tags are used to report the runtime processing of the commands.
<p>These tags are used to report the runtime processing of the commands.
Only produced when `--gui` option is used.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
run:begin:&lt;blockstart&gt;:&lt;blockend&gt;:&lt;countmax&gt;
</strong></td></tr><tr><td>
@ -731,10 +720,10 @@ Text message exactly as it's printed on screen.
<h2><a name="6">6</a>
Thermal Tags
</h2>
The following tags are produced by the thermal monitoring functions
<p>The following tags are produced by the thermal monitoring functions
when SnapRAID is processing, typically during operations that involve
disk access.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
thermal:ambient:device:&lt;hwmon_dir&gt;:&lt;name&gt;:&lt;temp_file&gt;:&lt;label&gt;:&lt;temp&gt;
</strong></td></tr><tr><td>
@ -992,13 +981,13 @@ are being spun back up to resume the operation.
<h2><a name="7">7</a>
Command Status Tags
</h2>
This section describes the tags output with the `status` command.
<h4>
<p>This section describes the tags output with the `status` command.
</p><h4>
Summary Tags
</h4>
These tags provide general information about the array configuration
<p>These tags provide general information about the array configuration
and overall state.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
summary:block_size:&lt;uint&gt;
</strong></td></tr><tr><td>
@ -1153,9 +1142,9 @@ Days ago the newest block was last scrubbed.
<h4>
Per-Disk Tags
</h4>
These tags provide statistics for individual data disks. &lt;name&gt;
<p>These tags provide statistics for individual data disks. &lt;name&gt;
is the disk name.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
summary:disk_file_count:&lt;name&gt;:&lt;uint&gt;
</strong></td></tr><tr><td>
@ -1244,8 +1233,8 @@ Disk use percentage relative to `disk_block_max`.
<h4>
File Timestamp Tags
</h4>
These tags list files with zero sub-second timestamps.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<p>These tags list files with zero sub-second timestamps.
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
zerosubsecond:&lt;disk_name&gt;:&lt;file_path&gt;
</strong></td></tr><tr><td>
@ -1256,8 +1245,8 @@ Up to 50 are logged per disk.
<h4>
Block Information Tags
</h4>
These tags are generated when the GUI option is enabled (`state-&gt;opt.gui`).
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<p>These tags are generated when the GUI option is enabled (`state-&gt;opt.gui`).
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
block_count:&lt;uint&gt;
</strong></td></tr><tr><td>
@ -1331,8 +1320,8 @@ Block index.
<h4>
Scrub History Tags
</h4>
These tags provide details on the scrub/sync time distribution.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<p>These tags provide details on the scrub/sync time distribution.
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
info_count:&lt;uint&gt;
</strong></td></tr><tr><td>
@ -1421,13 +1410,13 @@ Count of newly synced (unscrubbed) blocks in that day range.
<h2><a name="8">8</a>
Command Sync/Scrub Tags
</h2>
Tags specific for the `sync` and `scrub` commands.
<p>Tags specific for the `sync` and `scrub` commands.
Also the error tags are possible.
<h4>
</p><h4>
Summary Tags
</h4>
These tags provide summary statistics at the end of the command.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<p>These tags provide summary statistics at the end of the command.
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
hash_summary:error_file:&lt;count&gt;
</strong></td></tr><tr><td>
@ -1513,13 +1502,13 @@ If any errors were found (file, I/O, or data errors).
<h2><a name="9">9</a>
Command Check/Fix Tags
</h2>
Tags specific for the `check` and `fix` commands.
<p>Tags specific for the `check` and `fix` commands.
Also the error tags are possible.
<h4>
</p><h4>
Fixed/Recovered Tags
</h4>
These tags log successful repairs during fix operations.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<p>These tags log successful repairs during fix operations.
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
fixed:&lt;block_pos&gt;:&lt;disk_name&gt;:&lt;file_path&gt;:&lt;msg&gt;
</strong></td></tr><tr><td>
@ -1679,8 +1668,8 @@ A descriptive message indicating the nature of the fix
<h4>
Unrecoverable Error Tags
</h4>
These tags log errors that could not be recovered.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<p>These tags log errors that could not be recovered.
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
unrecoverable:&lt;block_pos&gt;:&lt;disk_name&gt;:&lt;file_path&gt;:&lt;msg&gt;
</strong></td></tr><tr><td>
@ -1746,8 +1735,8 @@ A descriptive message indicating the nature of the problem
<h4>
File Status Tags
</h4>
These tags log the final status of files after processing.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<p>These tags log the final status of files after processing.
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
status:unrecoverable:&lt;disk_name&gt;:&lt;file_path&gt;
</strong></td></tr><tr><td>
@ -1846,8 +1835,8 @@ The file path relative to disk root (escaped).
<h4>
Summary Tags
</h4>
These tags provide summary statistics at the end of the command.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<p>These tags provide summary statistics at the end of the command.
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
summary:error:&lt;error_count&gt;
</strong></td></tr><tr><td>
@ -1930,13 +1919,13 @@ Indicates that errors were found (audit-only mode).
<h2><a name="10">10</a>
Command List Tags
</h2>
This section describes the tags output with the `list` command.
<h4>
<p>This section describes the tags output with the `list` command.
</p><h4>
List Tags
</h4>
These tags log details about individual files and links processed during
<p>These tags log details about individual files and links processed during
the listing operation.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
file:&lt;disk_name&gt;:&lt;subpath&gt;:&lt;size&gt;:&lt;mtime_sec&gt;:&lt;mtime_nsec&gt;:&lt;inode&gt;
</strong></td></tr><tr><td>
@ -2014,8 +2003,8 @@ The target path of the link (escaped).
<h4>
Summary Tags
</h4>
These tags log final statistics about the entire listing operation.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<p>These tags log final statistics about the entire listing operation.
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
summary:file_count:&lt;count&gt;
</strong></td></tr><tr><td>
@ -2070,14 +2059,14 @@ and you won't get this tag.
<h2><a name="11">11</a>
Command Dup Tags
</h2>
This section describes the tags output with the `dup` command.
<h4>
<p>This section describes the tags output with the `dup` command.
</p><h4>
Duplicate Tags
</h4>
These tags log information about detected duplicate files and provide
<p>These tags log information about detected duplicate files and provide
a summary of the duplicate finding process. The content hash of the
whole file is used to determine duplicates.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
dup:&lt;diskname1&gt;:&lt;file_path1&gt;:&lt;diskname2&gt;:&lt;file_path2&gt;:&lt;size&gt;: dup
</strong></td></tr><tr><td>
@ -2122,8 +2111,8 @@ size corresponds to the file `&lt;file_path2&gt;`.
<h4>
Summary Tags
</h4>
These tags provide a final summary of the duplicate finding process.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<p>These tags provide a final summary of the duplicate finding process.
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
summary:dup_count:&lt;count&gt;
</strong></td></tr><tr><td>
@ -2173,8 +2162,8 @@ zero.
<h2><a name="12">12</a>
Command Pool Tags
</h2>
This section describes the tags output with the `pool` command.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<p>This section describes the tags output with the `pool` command.
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
summary:link_count:&lt;count&gt;
</strong></td></tr><tr><td>
@ -2200,12 +2189,12 @@ and you won't get this tag.
<h2><a name="13">13</a>
Command Rehash Tags
</h2>
This section describes the tags output with the `rehash` command.
<h4>
<p>This section describes the tags output with the `rehash` command.
</p><h4>
Summary Tags
</h4>
These tags provide a final summary of the rehash scheduling process.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<p>These tags provide a final summary of the rehash scheduling process.
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
summary:exit:scheduled
</strong></td></tr><tr><td>
@ -2236,18 +2225,17 @@ a fatal error.
<h2><a name="14">14</a>
Command Smart Tags
</h2>
This section describes the tags output with the `smart` command.
<p>
Note that a `&lt;disk_name&gt;` may be associated with more `&lt;device_file&gt;`,
<p>This section describes the tags output with the `smart` command.
</p><p>Note that a `&lt;disk_name&gt;` may be associated with more `&lt;device_file&gt;`,
in case the logical disk uses more physical disks. In such a case,
you'll see multiple tags for the same `&lt;disk_name&gt;` but with different
`&lt;device_file&gt;`.
<h4>
</p><h4>
SMART Attributes
</h4>
Tags logging specific disk identification and raw SMART attribute
<p>Tags logging specific disk identification and raw SMART attribute
values.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
smart:&lt;device_file&gt;:&lt;disk_name&gt;
</strong></td></tr><tr><td>
@ -2420,8 +2408,8 @@ The raw attribute value (uint64, hexadecimal).
<h4>
Summary
</h4>
Tags logging the overall failure probabilities for the array.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<p>Tags logging the overall failure probabilities for the array.
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
summary:array_failure:&lt;array_afr&gt;:&lt;array_prob&gt;
</strong></td></tr><tr><td>
@ -2442,24 +2430,22 @@ The sum of AFRs of all disks in the array (double).
The probability of at least one disk failure in
</td></tr>
</table>
<p>
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td width="5%"></td><td width="95%">
the next year (double).
</td></tr></table>
<p>the next year (double).
</p></td></tr></table>
<h2><a name="15">15</a>
Command Probe Tags
</h2>
This section describes the tags output with the `probe` command.
<p>
Note that a `&lt;disk_name&gt;` may be associated with more `&lt;device_file&gt;`,
<p>This section describes the tags output with the `probe` command.
</p><p>Note that a `&lt;disk_name&gt;` may be associated with more `&lt;device_file&gt;`,
in case the logical disk uses more physical disks. In such a case,
you'll see multiple tags for the same `&lt;disk_name&gt;` but with different
`&lt;device_file&gt;`.
<h4>
</p><h4>
Device Power State
</h4>
Tags used to report the power state of each device.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<p>Tags used to report the power state of each device.
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
probe:&lt;device_file&gt;:&lt;disk_name&gt;:&lt;power_state&gt;
</strong></td></tr><tr><td>
@ -2487,9 +2473,9 @@ The numerical power state: 0: Unknown,
<h2><a name="16">16</a>
Error Tags
</h2>
These tags report specific errors that occur on data disks during the
<p>These tags report specific errors that occur on data disks during the
commands that access files and parities.
<table width="100%" border="0" cellspacing="0" cellpadding="2">
</p><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
error:&lt;block&gt;:&lt;disk_name&gt;:&lt;file&gt;:&lt;msg&gt;
</strong></td></tr><tr><td>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff