# 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.
# 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.
#
# v1.6d-1 (08 October 2022)
# - Bug Fix for converting multiple numbers from Octal to Decimal. The previous process worked "most" of the time
# -- but we always aim for 100% working.
#
# The multi_report_config file is compatable with version back to v1.6d.
#
# v1.6d (05 October 2022)
# - Thanks goes out to ChrisRJ for offering some great suggestions to enhance and optimize the script.
# - Updated gptid text and help text areas (clarifying information)
# - Updated the -dump parameter to -dump [all] and included non-SMART attachments.
# - Added Automatic UDMA_CRC, MultiZone, and Reallocated Sector Compensation to -config advanced option K.
# - Fixed Warranty Date always showing as expired.
# - Added Helium and Raw Read Error Rates to statistical data file.
# - Added Raw Read Error Rates chart column.
# - Added compensation for Seagate Seek Error Rates and Raw Read Error Rates.
# - Added Automatic Configuration File Update feature.
# - Added selection between ZFS Pool Size or Zpool Pool Size. ZFS is representative of the actual storage capacity
# -- and updated the Pool Status Report Summary chart.
# - Added ATA Error Log Silencing (by special request).
# - Added 0.1 second delay after writing "$logfile" to eliminate intermittent file creation errors.
# - Fixed Text Report -> Drive Model Number not showing up for some drives.
# - Added option to email copy of multi_report_config.txt upon any automatic script modification and/or by day.
# v1.6d (05 October 2022)
# - Thanks goes out to ChrisRJ for offering some great suggestions to enhance and optimize the script.
# - Updated gptid text and help text areas (clarifying information)
# - Updated the -dump parameter to -dump [all] and included non-SMART attachments.
# - Added Automatic UDMA_CRC, MultiZone, and Reallocated Sector Compensation to -config advanced option K.
# - Fixed Warranty Date always showing as expired.
# - Added Helium and Raw Read Error Rates to statistical data file.
# - Added Raw Read Error Rates chart column.
# - Added compensation for Seagate Seek Error Rates and Raw Read Error Rates.
# - Added Automatic Configuration File Update feature.
# - Added selection between ZFS Pool Size or Zpool Pool Size. ZFS is representative of the actual storage capacity
# -- and updated the Pool Status Report Summary chart.
# - Added ATA Error Log Silencing (by special request).
# - Added 0.1 second delay after writing "$logfile" to eliminate intermittent file creation errors.
# - Fixed Text Report -> Drive Model Number not showing up for some drives.
# - Added option to email copy of multi_report_config.txt upon any automatic script modification and/or by day.
# -- Future Work
# ---- Change all the -config dialog to be consistent.
# ---- Optimizing Code
Please use Version 1.6c until further notice.
# v1.6d (05 October 2022)
# - Thanks goes out to ChrisRJ for offering some great suggestions to enhance and optimize the script.
# - Updated gptid text and help text areas (clarifying information)
# - Updated the -dump parameter to -dump [all] and included non-SMART attachments.
# - Added Automatic UDMA_CRC, MultiZone, and Reallocated Sector Compensation to -config advanced option K.
# - Fixed Warranty Date always showing as expired.
# - Added Helium and Raw Read Error Rates to statistical data file.
# - Added Raw Read Error Rates chart column.
# - Added compensation for Seagate Seek Error Rates and Raw Read Error Rates.
# - Added Automatic Configuration File Update feature.
# - Added selection between ZFS Pool Size or Zpool Pool Size. ZFS is representative of the actual storage capacity
# -- and updated the Pool Status Report Summary chart.
# - Added ATA Error Log Silencing (by special request).
# - Added 0.1 second delay after writing "$logfile" to eliminate intermittent file creation errors.
# - Fixed Text Report -> Drive Model Number not showing up for some drives.
# - Added option to email copy of multi_report_config.txt upon any automatic script modification and/or by day.
# -- Future Work
# ---- Change all the -config dialog to be consistent.
# ---- Optimizing Code
#
With version 1.6c you may use an external configuration file. Use [-h] to read the Help Section.
Run the program with the [-config] to create a default configuration file in the directory this script is run from.
v1.6c (28 August 2022)
- Supports external configuration file (but not required).
- Completely Configurable by running the script -config parameter (this took a lot of work).
- Added HDD/SSDmaxtempovrd variables to combat some bogus SSD values.
- Added TLER (SCT) support.
- Added support for drives which do not support recording over 65536 hours for SMART Tests and rolls over to start at zero again.
- Added -dump parameter to create and email all of the drives smartctl outputs as text file email attachments.
- Added support for Helium drives.
At lines 348 and 349 are two new options: the temperature value and if data does not exist you can change it from "N/A" to "---" (which is now the default).