=================== SnapRAID Log Format =================== 1 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... NAME This is the primary tag identifier, always a lowercase string without spaces (e.g., `summary`, `block`, `info_time`). VALUE Following the `NAME`, these can be additional sub-identifiers, descriptive names (like a disk name), or numeric/string data values. They are separated by a colon `:`. Each tag is terminated by an end-of-line character. 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. 2 STATUS ======== This section describe the tags output with the `status` command. All tags start with a prefix indicating the context, typically `summary:` for overall statistics or a disk/block context. ---- 2.0.1 General Summary Tags ---- These tags provide general information about the array configuration and overall state. summary:block_size: The size of a block in bytes. summary:parity_block_count: The total number of blocks allocated for all parity levels. summary:parity_block_total:: Total blocks available for a specific parity level. summary:parity_block_free:: Free blocks available for a specific parity level. summary:parity_block_free_min: The minimum number of free blocks across all parity levels. summary:file_count: Total number of files in the array. summary:file_block_count: Total number of data blocks used by files. summary:fragmented_file_count: Total number of fragmented files. summary:excess_fragment_count: Total number of excess fragments (one less than the total fragments). summary:zerosubsecond_file_count: Total number of files with a zero sub-second timestamp. summary:file_size: Total size of all files in bytes. summary:parity_size: Total size of allocated parity blocks in bytes. summary:parity_size_max: Maximum possible parity size (allocated + min free) in bytes. summary:hash: The current hash algorithm in use. summary:prev_hash: The previous hash algorithm used. summary:best_hash: The best hash algorithm for optimal performance. summary:total_wasted: Total wasted space (space on data disks exceeding parity capacity) in bytes. summary:total_used: Total used space by data files in bytes. summary:total_free: Total free space (usable by data) in bytes. summary:total_use_percent: Overall array use percentage. summary:has_unsynced: Count of blocks that are unsynced (need a sync). summary:has_unscrubbed: Count of blocks that are unscrubbed (just synced). summary:has_rehash: Count of blocks needing a rehash. summary:has_bad::: Count of bad blocks, along with the first and last bad block index. summary:scrub_oldest_days: Days ago the oldest block was last scrubbed. summary:scrub_median_days: Days ago the median block was last scrubbed. summary:scrub_newest_days: Days ago the newest block was last scrubbed. ---- 2.0.2 Per-Disk Tags ---- These tags provide statistics for individual data disks. `` is the disk name. summary:disk_file_count:: Number of files on the disk. summary:disk_block_count:: Number of blocks used by files on the disk. summary:disk_fragmented_file_count:: Number of fragmented files on the disk. summary:disk_excess_fragment_count:: Number of excess fragments on the disk. summary:disk_zerosubsecond_file_count:: Number of files with zero sub-second timestamp on the disk. summary:disk_file_size:: Total size of files on the disk in bytes. summary:disk_block_allocated:: Highest block index used on the disk + 1. summary:disk_block_total:: Total blocks on the disk (physical size). summary:disk_block_free:: Free blocks on the disk. summary:disk_block_max_by_space:: Total blocks by disk space (used + free blocks). summary:disk_block_max_by_parity:: Total blocks limited by parity space (parity size + min parity free blocks). summary:disk_block_max:: Maximum usable blocks (minimum of `..._by_space` and `..._by_parity`). summary:disk_space_wasted:: Wasted space on the disk in bytes (positive if disk is larger than usable parity space). summary:disk_used:: Used space on the disk in bytes. summary:disk_free:: Free usable space on the disk in bytes. summary:disk_use_percent:: Disk use percentage relative to `disk_block_max`. ---- 2.0.3 File Timestamp Tags ---- These tags list files with zero sub-second timestamps. zerosubsecond:: Lists files that have a zero sub-second timestamp. Up to 50 are logged per disk. ---- 2.0.4 Block Information Tags ---- These tags are generated when the GUI option is enabled (`state->opt.gui`). block_count: The total number of blocks in the array. block::