Resource icon

multi_report.sh version for Core and Scale 3.0

### Changelog:
# V3.0 (30 March 2024)

# Notable issues:
# NVMe - Last SMART Short and Long tests not displaying in text area. It will be solved when Smartmontools 7.4 is installed.
# -- This is not an issue in SCALE 23.10.2 as it has Smartmontools 7.4.
#
# - Fixed checking NVMe drives for if they support Self-tests.
# - Added NVME Short and Long Self-test for smartctl 7.3 and below. Monday through Saturday a Short Test, Sunday a Long Test.
# --- a Long Test, you may disable either or both options. Once TrueNAS can run NVMe SMART Tests expect this option to go away.
# - Updated to list Drive Idents for NVMe in the Text section.
# - Added NVME Ignore "Invalid Field in Command", disabled by default.
# - Added Wait for SMART Short/Long Self-test to complete before sending the report.
# - Added SMART Self-test Failure Recognition for NVMe.
# - Updated CORE ability to capture NVMe Last Test Age.
# - Updated NVMe routines to ignore real data gathering while in test mode.
# - Enhanced SCSI/SAS drive recognition and Power_On_Hours collection.
# - Fixed Zpool Reporting of 'Resilvering xx days' incorrectly reporting in SCALE.
# - Updated 7zip to only being installed if email is encrypted (See line 5 of this script).
# - Updated script for SCALE Dragonfish for installing 7zip if required.
# - Updated Configuration Questions to make configuration a little easier.
# - Removed 'Mouseover' option and hardcoded it.
# - Corrected 'Pool_Capacity_Type' variable missing in config file.
# - Added checking for all software commands to respond (thanks dak180 for the idea).
# - Added custom wear level alarm value 'i' to the group 'n' 'r' 'd'. 'i' = Ignore. This makes wearLevel="", non-exist.
# - Added Email Report ONLY on Alert (any Error Message).
# - Updated to send attachments when Email_On_Alarm_Only="true" and Email_On_Alarm_Only_And_Attachments="true".
# - Changed Non-Recognized drive power_on_hours from Warning to Caution.
# - Adjusted script for multiple LBA reporting on Yucun SSDs.
# - Updated script to work in a directory with a 'space character' in the path.
# - Removed variables (IncludeSSD and IncludeNVM).
#
# V2.5.1 (3 December 2023)
# - Changed exported configuration file to use .tar/.zip appropriately.
# - Moved NVMe power state setting to end of script.
#

A complete changelog is on Github.
The multi_report_config.txt file will be updated and is backwards compatible.

# V2.5 (25 November 2023)
# - Added Custom Drive option to use 'Normalized' Wear Level.
# - Added customization for Normal, Warning, and Critical Subject Lines.
# - Added quick fix for odd reporting LITEON SSDs.
# - Added nvme power level reporting.
# - Added setting nvme lowest power level option.
# - Updated to use smartmontools 7.4 or greater.
# - Updated to use 'nvme' command in absence of smartmontools 7.4 or greater (Last Test Age is not available in CORE).
# - Added Last Test Type and Last Test Age columns for NVMe (when smartmontools 7.4 is incorporated into TrueNAS).
# - Remove multipath drive data (duplicate drive serial numbers) from the report.
# - Reduced normal drive data collection by 2/3's for troubleshooting/sending to Joe.
# - Added '-dump emailextra' to send all (2/3's more) drive data files if required.
# - Renamed drive dump files to be more user friendly.
# - Added simulation enhancement (Developer tool)
# - Added additional troubleshooting help for Script Running Error.
# - Updated Multiple Instance Check to work properly. Slower processes would generate a false positive.
# - Added '-ignore_lock' parameter to ignore Multiple Instance Check (should never be needed but it's included as an option).
# - Updated reading temperature if value is zero or less to read ID 194.
### Changelog:
# V2.4.3 (16 June 2023)
# - Minor Update to recognize more SCSI drive Offline Uncorrectable Errors and Total Data Written.
# - Minor Update to recognize UDMA CRC Errors for some older Intel SSD's.
#
# V2.4.2 (19 May 2023)
# - Bug Fix to properly recognize Samsung HD103UJ HDD.
# - Bug fix to properly recognize/display more than 26 drives in Scale.
#
# V2.4.1 (29 April 2023)
# - Bugfix to allow script to be run outside the script directory.
# - Updated chmod 755 to the new script file.
# - Updated cleanup routine for upgrade files left behind.
# - Updated TrueNAS Config Backup name to reference the NAS name.
# - Added Automatic Update Feature.
# - Added Update Script File Checksum Check.
#
# V2.4 (21 April 2023)
# - Added NVMe Columns for Media Errors and Total Data Written.
# - Added Total Data Written for all drives.
# - Updated User Guide.
#
There's no schmuck like a JoeSchmuck! Thank you, Joe.

V2.3 (14 April 2023)

-Simplified User Installation
-Bugfix for Custom Drive Configuration - Wear Level, Helium Level.

V2.2 (10 April 2023)

- Bugfix for Test Age always being = "2".
- Bugfix for SSD Wear Level for certain drives.
- Bugfix for Scale, no TrueNAS Config Backup without 7-zip.
- Added Automatic Update Notification for newer version.
- Added Message from the Creator.
- Added Symlink - "multi_report.sh" is the file name to run from this point forward. Read the User Guide for more details.
- Changed TrueNASConfig Backup to zip file type attachment.
- Adjusted for drive that passes SMART Test but reports the test hour as '0'.

See Changelog file on github.com/JoeSchmuck[/CODE]
  • Like
Reactions: NickF
This version has a user manual. It also saves the prior configuration file before updating it (to allow easier fallback if necessary).

# V2.1 (29 March 2023)
#
# - Updated TrueNAS password backup to include encrypted password file, and enable encrypted Config File in email.
# -- NOTE: The encrypted password is on line #5 of this script.
#
# - Updated script to use 'json' data.
# - Fixed script to allow for a zero hour runtime on a drive.
# - Renamed variables so they make more sense.
# - More details when using a '-dump' switch.
# - Added Runtime.
# - New Wear Level & Helium Level formula.
# - Added Backup of original multi_report_config.txt attachment along with the new configuration file.
#
# The multi_report_config.txt file will automatically update previous versions to add new features
# and will not be backwards compatible.
#
#
# V2.0.10 (6 March 2023)
# - Fixed introduced error '-s' sending emails.
#
# V2.0.9 (5 March 2023)
# - Only one running instance allowed.
# - Minor updates to recognize SMART testing in progress for certain drives.
#
# V2.0.9 (4 March 2023)
# - Only one running instance allowed.
# - Minor updates to recognize SMART testing in progress for certain drives.
#
# V2.0.8 (23 February 2023)
# - Added Email/Text Monitoring Feature for NugentS to try out.
# - Edit multi_report_config.txt for additional email address.
# - Use '-m' switch to invoke. Statistical data is recorded each time the script is run.
# - Added last two lines to display elapsed time of script running.
Using "-dump email" when running the script will now send debugging information directly to Joe, including your comments about the problem. Lot's more...

### Changelog:
# V2.0.6 (1 February 2023)
# - Reduced drive data collection. Added 'zpool' data collection.
#
# V2.0.5 (27 January 2023)
# - Adjusted Zpool Status to allow 'resilvering' status message. (Line 1340)
# - Updated '-dump email' command to allow user to enter comments to the author.
#
# V2.0.4 (26 January 2023)
# - Fixed if Zpool does not provide a number for fragmentation, will now display non_exist_value string.
#
# V2.0.3 (24 January 2023)
# - Hacked HDD SMART Testing in progress with "NOW" in the '# 1' line. Will fix better later.
#
# V2.0.2 (24 January 2023)
# - Fix Wear Level that may fail on some drives.
#
# v2.0.1 (21 January 2023)
# - Fixed Zpool Fragmentation Warning for 9% and greater (Hex Math issue again).
#
# v2.0 (21 January 2023)
# - Formatted all -config screens to fit into 80 column x 24 lines.
# - Removed custom builds
# - Fixed Custom Configuration Delete Function.
# - Fixed Zpool Scrub Bytes for FreeNAS 11.x
# - Fixed SMART Test to allow for 'Offline' value.
# - Modified Wear Level script to account for 'Reverse' Adjustment.
# - Added Wear Level Adjustment Reversing to the Custom Drive configuration.
# - Added Output.html to -dump command.
# - Added Mouseover and Alternate '()' to Mouseover for normalized values (Reallocated Sectors, Reallocated Sector Events, UDMA CRC, MultiZone).
# - Updated Testing Code to accept both drive_a and drive_x files.
# - Added Zpool Fragmentation value by request.
# - Added '-dump email' parameter to send joeschmuck2023@hotmail.com an email with the drive data and the multi_report_config.txt file ONLY.
# - Added Drive dump data in JSON format. It looks like a better way to parse the drive data. Still retaining the older file format for now.
#
Per joeschmuck, this version adds a new drive model and also adds the ability to customize alarm settings for individual drives. It fixes a Date issue with FreeNAS 11, and date calculation issue for foreign languages (German was the issue it came up in).

Enjoy.
v1.6e (11 November 2022)
- Fixed gptid not showing in the text section for the cache drive (Scale only affected).
- Fixed Zpool "Pool Size" - Wasn't calculating correctly under certain circumstances.
- Added Toshiba MG07+ drive Helium value support.
- Added Alphabetizing Zpool Names and Device ID's.
- Added No HDD Chart Generation if no HDD's are identified (nice for SSD/NVMe Only Systems).
- Added Warranty Column to chart (by request and must have a value in the Drive_Warranty variable).
- Removed Update option in -config since the sript will automatically update now.
- Updated instructions for multiple email addresses.
- Updated instructions for "from:" address, some email servers will not accept the default
-- value and must be changed to the email address of the account sending the email.
- Added the No Text Section Option (enable_text) to remove the Text Section from the email output
-- and display the chart only, if the value is not "true".
- Added Phison Driven SSD attribute for correct Wear Level value.
  • Like
Reactions: PDM
# v1.6d-2 (09 October 2022)
# - Bug fix for NVMe power on hours.
# --- Unfortunately as the script gets more complex it's very easy to induce a problem. And since I do not have
# --- a lot of different hardware, I need the users to contact me and tell me there is an issue so I can fix it.
# --- It's unfortunate that I've have two bug fixes already but them's the breaks.
# - Updated to support more drives Min/Max temps and display the non-existant value if nothing is obtained vice "0".
#
# The multi_report_config file is compatable with version back to v1.6d.
#
Top