Resource icon

multi_report.sh version for Core and Scale 3.0

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
Well, I got it all running, cron job and all. That said, I think I like the idea of keeping it in the root, or thereabouts, just to have one less dataset and share.
I prefer witholding execution permissions on my datasets in order to mitigate any possibile damage caused from a compromised system that has access to the NAS.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I prefer witholding execution permissions on my datasets in order to mitigate any possibile damage caused from a compromised system that has access to the NAS.
The new User Guide now only has instructions for placing the script in the /root directory. Now that was an easy change. Thanks for the perspective.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Time for a question... Is there any interest in NVMe SMART Testing? Why do I ask? TrueNAS currently does not support it. I've updated my Beta script with testing NVMe, Short Tests on Mon through Sat, Long Tests on Sunday. They are executed at the end of the script. Also, Last Test Age is only supported on SCALE for NVMe, I have not found a way to get the required data on the FreeBSD/CORE system. This is a stop-gap until TrueNAS supports NVMe SMART Tests. I have a few more hours of work to complete updating the script for the changes I've made, but I'm willing to post it here when done but only as a BETA version. It's fully functional and safe, but I have many more changes coming for the next formal release, and one of those changes is a game changer. Well I think so. But it's probably a month or more down the road. It's a lot of boring work so I'm not on it all the time.

Instead of many people posting they want to have this BETA, just 'Like' this posting. The thread is already 25 pages deep.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
THIS IS A BETA VERSION !!! NOT AN OFFICIAL RELEASE!!!
Tested on TrueNAS CORE 13.0-U6.1 and SCALE 23.10.1

UPDATE: Early NVMe's may not support, sorry that I just found out this and will modify the script to check now.
*** If your NVMe does not support "Self-test", this will not start running the tests, but any drives that do support, should work fine. ***
Attached file has been replaced with version 2.5.3.1. Hope that works better.



Backed by popular demand? :rolleyes:

TrueNAS CORE 13.0-U6.1 and SCALE 23.10.1 does not support SMART Self-testing for NVMe drives.

I was surprised that this is true since the commands are present in the distributions to test the NVMe drives. Maybe it is because Smartmontools 7.4 has not been included in either build, but this is not required to run the tests, it just makes things a little easier.

What this BETA does: This introduces three new variables in the multi_report_config.txt file, hence the file will be updated.
Code:
NVM_Daily_Short_Selftest="true"        # This will run a short test on all NVMe drives everyday of the week, IF smartmontools is not 7.4 or greater.
NVM_Weekly_Long_Selftest="true"        # This will run a long test on all NVMe drives on Sunday and ignore the short test run if set, IF smartmontools is not 7.4 or greater.
NVM_Smartmontools_74_Override="disable"    # Set to "enable" to override the check for smartmontools 7.4 and force the script to run the SMART tests. Set to "disable" by default.


The default setup is to run a SMART Short test only when the script is executed on Monday through Saturday, and a SMART Long test only when the script is executed on Sunday. You can change this "IF" you are willing to edit the script. I can tell you where to look.

The new variables: (You must manually edit the multi_report_config.txt to make a change to these values)

1) "NVM_Daily_Short_Selftest" and "NVM_Weekly_Long_Selftest" only enable or disable if a test will be run or not. Some people might not want to run a Short test everyday and opt to use only the Long test weekly.

2) "NVM_Smartmontools_74_Override" when set to 'disable' it will not run these tests once TrueNAS has incorporated smartmontools 7.4. But since that package inclusion does not mean TrueNAS will be able to schedule SMART tests, if you set this value to 'enable', it will run the SMART tests regardless.

What I have been unable to test: An NVMe SMART Self-test Failure and NVMe SMART Selt-test Incompletion. Hopefully the Multi-Report will flag the error. Unfortunately I do not know what the error message is.

This BETA version should run fine, however If someone has an issue with this BETA version of the script, PM me or roll back to the current official script (Download Button at the top of the page).

Cheers!
 

Attachments

  • multi_report_v2.5.3.1Beta_2023_12_31.txt
    380.2 KB · Views: 57
Last edited:

Macaroni323

Explorer
Joined
Oct 8, 2015
Messages
60
Is there a multi_report_v2.5.2? I've downloaded multi_report_v2.5. Is there a newer version that's officially released?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Is there a multi_report_v2.5.2?
There was, it was a personal build (look at the changelog at the beginning of the script), just like 2.5.1. The next official release should be version 3.0 because I have some drastic changes in the works, and it will not be released soon, it takes time, 5 hours a week (because I have a life thankfully) just isn't much time. Version 2.6 will come out if someone finds a problem with v2.5, and it will include the changes in 2.5.3.
 

Macaroni323

Explorer
Joined
Oct 8, 2015
Messages
60
Thanks "OM" Joe... I am doing maintenance and expansion on my TrueNAS home server and was going to update multi-report to the latest.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Thanks "OM" Joe... I am doing maintenance and expansion on my TrueNAS home server and was going to update multi-report to the latest.
What I just posted is the latest and should work perfectly fine. If you have any NVMe drives, I would recommend v2.5.3 over v2.5, otherwise no major differences.

EDIT: Just updated the posting above with v2.5.3.1 to fix an error if you NVMe drives do not support Self-test. The older ones do not unfortunately.
 
Last edited:

JDE1000

Dabbler
Joined
Sep 15, 2023
Messages
10
I am using Multi-Report v2.5 dtd:2023-11-26 (TrueNAS Scale 23.10.1.3). I have a drive that has 1 CRC error. I went into Advanced config to try and offset it. I keep getting error "fdisk: command not found". Any offsets I specify do not save and it shows No CRC errors found. How can I fix this?

1707244896348.png


Code:
# Multi-Report v2.5 dtd:2023-11-26 (TrueNAS Scale 23.10.1.3)
#
# This file is used exclusively to configure the multi_report version 2.1 or later.
#
# The configuration file will be created in the same directory as the script.
#
# The configuration file will override the default values coded into the script.
 
###### Email Address ######
# Enter your Email address to send the report to.  The from address does not need to be changed unless you experience
# an error sending the email.  Some email servers only use the email address associated with the email server.
 
Email=""            # Send normal emails to this address
From="TrueNAS@local.com"                # From Address
 
### Alert Email Configuration ###
AlertEmail=""    # Alert email address used with the -m switch.
AlertOnWarningTemp="true"            # Send alert on Warning Temp. Default="true"
AlertOnCriticalError="true"            # Send alert on Critical Error. Default="true"
 
###### Spencer Integration
# Warning Levels are: None, Warning, Critical -- This only affects the Email Subject Line, if any errors are present, an attachment will occur.
spencer_new_warning_level="Warning"      # What to do if a "new" error occurs.
spencer_existing_warning_level="None"     # What to do for an existing error.
spencer_enable="true"    # To call the Spencer.py script if "true" or "false" to not run the Spencer.py script.
spencer_script_name="/mnt/Storage/jde1000/spencer.py"      # The default is "spencer.py" located in the default script directory.
 
########## Script Update ##########
# Ensure you understand these options.
CheckForUpdates="true"    # Will check GitHub for updates and include message in next email.
AutomaticUpdate="false"    # WARNING !!!  This option will automatically update the script if a newer version exists on GitHub.
 
###### Zpool Status Summary Table Settings
PoolUsedWarn=80        # Pool used percentage for CRITICAL color to be used.
ScrubAgeWarn=37        # Maximum age (in days) of last pool scrub before CRITICAL error (30 + 7 days for day of week). Default=37.
 
###### Temperature Settings
HDDtempWarn=45        # HDD Drive temp (in C) when WARNING message will be used.
HDDtempCrit=50        # HDD Drive temp (in C) when CRITICAL message will be used.
HDD_Cur_Pwr_Max_Temp_Ovrd="true"        # HDD Max Drive Temp Override. This value when "true" will not alarm on any Current Power Cycle Max Temperature Limit.
SSDtempWarn=45        # SSD Drive temp (in C) when WARNING message will be used.
SSDtempCrit=50        # SSD Drive temp (in C) when CRITICAL message will be used.
SSD_Cur_Pwr_Max_Temp_Ovrd="true"        # SSD Max Drive Temp Override. This value when "true" will not alarm on any Current Power Cycle Max Temperature Limit.
NVMtempWarn=50        # NVM Drive temp (in C) when WARNING message will be used.
NVMtempCrit=60        # NVM Drive temp (in C) when CRITICAL message will be used.
NVM_Cur_Pwr_Max_Temp_Ovrd="true"        # NVM Max Drive Temp Override. This value when "true" will not alarm on any Current Power Cycle Max Temperature Limit.
                # --- NOTE: NVMe drives currently do not report Min/Max temperatures so this is a future feature.
 
###### SSD/NVMe Specific Settings
WearLevelCrit=9        # Wear Level Alarm Setpoint for WARNING message, 9% is the default.
NVM_Low_Power="true"    # Set the NVMe power level to the minimum setting. This does not mean the NVMe will remain at this power level.
 
###### General Settings
# Output Formats
PowerTimeFormat="h"    # Format for power-on hours string, valid options are "ymdh", "ymd", "ym", "y", or "h" (year month day hour).
TempDisplay="*C"        # The format you desire the temperature to be displayed in. Common formats are: "*C", "^C", or "^c". Choose your own.
Non_Exist_Value="---"        # How do you desire non-existent data to be displayed.  The Default is "---", popular options are "N/A" or " ".
Pool_Capacity=""        # Select "zfs" or "zpool" for Zpool Status Report - Pool Size and Free Space capacities. "zfs" is default.
 
# Ignore Alarms
IgnoreUDMA="false"        # Set to "true" to ignore all UltraDMA CRC Errors for the summary alarm (Email Header) only, errors will still appear in the graphical chart.
IgnoreSeekError="true"    # Set to "true" to ignore all Seek Error Rate/Health errors.  Default is true.
IgnoreReadError="true"    # Set to "true" to ignore all Raw Read Error Rate/Health errors.  Default is true.
IgnoreMultiZone="false"   # Set to "true" to ignore all MultiZone Errors. Default is false.
DisableWarranty="true"    # Set to "true to disable Email Subject line alerts for any expired warranty alert. The email body will still report the alert.
ATA_Auto_Enable="true"   # Set to "true" to automatically update Log Error count to only display a log error when a new one occurs.
 
# Disable or Activate Input/Output File Settings
IncludeSSD="true"         # Set to "true" will engage SSD Automatic Detection and Reporting, false = Disable SSD Automatic Detection and Reporting.
IncludeNVM="true"         # Set to "true" will engage NVM Automatic Detection and Reporting, false = Disable NVM Automatic Detection and Reporting.
ReportNonSMART="true"     # Will force even non-SMART devices to be reported, "true" = normal operation to report non-SMART devices.
DisableRAWdata="false"    # Set to "true" to remove the smartctl -a data and non-smart data appended to the normal report.  Default is false.
 
# Media Alarms
SectorsWarn=0             # Number of sectors per drive to allow with errors before WARNING color/message will be used, this value should be less than SectorsCrit.
SectorsCrit=9             # Number of sectors per drive with errors before CRITICAL color/message will be used.
ReAllocWarn=0             # Number of Reallocated sector events allowed.  Over this amount is an alarm condition.
MultiZoneWarn=0           # Number of MultiZone Errors to allow before a Warning color/message will be used.  Default is 0.
MultiZoneCrit=5           # Number of MultiZone Errors to allow before a Warning color/message will be used.  Default is 5.
DeviceRedFlag="true"      # Set to "true" to have the Device Column indicate RED for ANY alarm condition.  Default is true.
HeliumAlarm="true"        # Set to "true" to set for a critical alarm any He value below "HeliumMin" value.  Default is true.
HeliumMin=100             # Set to 100 for a zero leak helium result.  An alert will occur below this value.
RawReadWarn=5             # Number of read errors to allow before WARNING color/message will be used, this value should be less than RawReadCrit.
RawReadCrit=100           # Number of read errors to allow before CRITICAL color/message will be used.
SeekErrorsWarn=5          # Number of seek errors to allow before WARNING color/message will be used, this value should be less than SeekErrorsCrit.
SeekErrorsCrit=100        # Number of seek errors to allow before CRITICAL color/message will be used.
NVM_Media_Errors=1    # Number of NVM Media Errors will cause a CRITICAL alarm.  Default is 1.
 
# Time-Limited Error Recovery (TLER)
SCT_Enable="false"  # Set to "true" to send a command to enable SCT on your drives for user defined timeout if the TLER state is Disabled.
SCT_Warning_Level="TLER_No_Msg" # Set to "all" will generate a Warning Message for all devices not reporting SCT enabled. "TLER" reports only drive which support TLER.
                          # "TLER_No_Msg" will only report for TLER drives and not report a Warning Message if the drive can set TLER on.
SCT_Read_Timeout=70       # Set to the read threshold. Default = 70 = 7.0 seconds.
SCT_Write_Timeout=70      # Set to the write threshold. Default = 70 = 7.0 seconds.
 
# SMART Testing Alarm
TestWarnAge=2             # Maximum age (in days) of last SMART test before CRITICAL color/message will be used.
 
# Zpool Fragmentation Alarm
ZpoolFragWarn=80          # Percent of fragmentation before a Warning message occurs.
 
######## Enable-Disable Text Portion ########
Enable_Text_Section="true"    # This will display the Text Section when = "true" or remove it when not "true".  Default="true"
 
###### Statistical Data File (SDF)
statistical_data_file="/mnt/Storage/jde1000/statisticalsmartdata.csv"    # Default location is where the script is located.
SDF_DataRecordEnable="true"      # Set to "true" will save all drive data into a CSV file defined by "statistical_data_file" below.
SDF_DataPurgeDays=730          # Set to the number of day you wish to keep in the data.  Older data will be purged. Default is 730 days (2 years). 0=Disable.
SDF_DataEmail="true"       # Set to "true" to have an attachment of the file emailed to you. Default is true.
SDF_DataEmailDay="Mon"    # Set to the day of the week the statistical report is emailed.  (All, Mon, Tue, Wed, Thu, Fri, Sat, Sun, Month)
 
###### FreeNAS config backup settings
TrueNASConfigEmailEnable="true"      # Set to "true" to save config backup (which renders next two options operational); "false" to keep disable config backups.
TrueNASConfigEmailDay="Mon"      # Set to the day of the week the config is emailed.  (All, Mon, Tue, Wed, Thu, Fri, Sat, Sun, Month)
TrueNASConfigBackupSave="false"       # Set to "false" to delete FreeNAS config backup after mail is sent; "true" to keep it in dir below.
TrueNASConfigBackupLocation="/tmp/"   # Directory in which to store the backup FreeNAS config files.
 
###### Attach multi_report_config.txt to Email ######
MRConfigEmailEnable="true"   # Set to "true" to enable periodic email (which renders next two options operational).
MRChangedEmailSend="true"  # If "true" it will attach the updated/changed file to the email.
MRConfigEmailDay="Mon"     # Set to the day of the week the multi_report_config.txt is emailed.  (All, Mon, Tue, Wed, Thu, Fri, Sat, Sun, Month, Never)
 
########## REPORT CHART CONFIGURATION ##############
 
###### REPORT HEADER TITLE ######
HDDreportTitle="Spinning Rust Summary Report"     # This is the title of the HDD report, change as you desire.
SSDreportTitle="SSD Summary Report"               # This is the title of the SSD report, change as you desire.
NVMreportTitle="NVMe Summary Report"              # This is the title of the NVMe report, change as you desire.
 
########## CUSTOM SUBJECT LINE ##########
# The host name will preceed the subject line message.
 
Subject_Line_Critical="*CRITICAL ERROR* SMART Testing Results for truenas *CRITICAL ERROR*"
Subject_Line_Warning="*WARNING* SMART Testing Results for truenas *WARNING*"
Subject_Line_Normal="SMART Testing Results for truenas - All is Good"
 
### CUSTOM REPORT CONFIGURATION ###
# By default most items are selected. Change the item to false to have it not displayed in the graph, true to have it displayed.
# NOTE: Alarm setpoints are not affected by these settings, this is only what columns of data are to be displayed on the graph.
# I would recommend that you remove columns of data that you don't really care about to make the graph less busy.
 
# For Zpool Status Summary
Zpool_Pool_Name_Title="Pool Name"
Zpool_Status_Title="Status"
Zpool_Pool_Size_Title="Pool Size"
Zpool_Free_Space_Title="Free Space"
Zpool_Used_Space_Title="Used Space"
Zfs_Pool_Size_Title="^Pool Size"
Zfs_Free_Space_Title="^Free Space"
Zfs_Used_Space_Title="^Used Space"
Zpool_Read_Errors_Title="Read Errors"
Zpool_Write_Errors_Title="Write Errors"
Zpool_Checksum_Errors_Title="Cksum Errors"
Zpool_Scrub_Repaired_Title="Scrub Repaired Bytes"
Zpool_Scrub_Errors_Title="Scrub Errors"
Zpool_Scrub_Age_Title="Last Scrub Age"
Zpool_Scrub_Duration_Title="Last Scrub Duration"
 
# For Hard Drive Section
HDD_Device_ID="true"
HDD_Device_ID_Title="Device ID"
HDD_Serial_Number="true"
HDD_Serial_Number_Title="Serial Number"
HDD_Model_Number="true"
HDD_Model_Number_Title="Model Number"
HDD_Capacity="true"
HDD_Capacity_Title="HDD Capacity"
HDD_Rotational_Rate="true"
HDD_Rotational_Rate_Title="RPM"
HDD_SMART_Status="true"
HDD_SMART_Status_Title="SMART Status"
HDD_Warranty="false"
HDD_Warranty_Title="Warr- anty"
HDD_Raw_Read_Error_Rate="true"
HDD_Raw_Read_Error_Rate_Title="Raw Error Rate"
HDD_Drive_Temp="true"
HDD_Drive_Temp_Title="Curr Temp"
HDD_Drive_Temp_Min="true"
HDD_Drive_Temp_Min_Title="Temp Min"
HDD_Drive_Temp_Max="true"
HDD_Drive_Temp_Max_Title="Temp Max"
HDD_Power_On_Hours="true"
HDD_Power_On_Hours_Title="Power On Time"
HDD_Start_Stop_Count="true"
HDD_Start_Stop_Count_Title="Start Stop Count"
HDD_Load_Cycle="true"
HDD_Load_Cycle_Title="Load Cycle Count"
HDD_Spin_Retry="true"
HDD_Spin_Retry_Title="Spin Retry Count"
HDD_Reallocated_Sectors="true"
HDD_Reallocated_Sectors_Title="Re-alloc Sects"
HDD_Reallocated_Events="true"
HDD_Reallocated_Events_Title="Re-alloc Evnt"
HDD_Pending_Sectors="true"
HDD_Pending_Sectors_Title="Curr Pend Sects"
HDD_Offline_Uncorrectable="true"
HDD_Offline_Uncorrectable_Title="Offl Unc Sects"
HDD_UDMA_CRC_Errors_List="true"
HDD_UDMA_CRC_Errors_List_Title="UDMA CRC Error"
HDD_Seek_Error_Rate="true"
HDD_Seek_Error_Rate_Title="Seek Error Rate"
HDD_MultiZone_Errors="true"
HDD_MultiZone_Errors_Title="Multi Zone Error"
HDD_Helium_Level="true"
HDD_Helium_Level_Title="He Level"
HDD_Last_Test_Age="true"
HDD_Last_Test_Age_Title="Last Test Age"
HDD_Last_Test_Type="true"
HDD_Last_Test_Type_Title="Last Test Type"
HDD_Total_Data_Written="true"
HDD_Total_Data_Written_Title="Total Data Written"
 
# For Solid State Drive Section
SSD_Device_ID="true"
SSD_Device_ID_Title="Device ID"
SSD_Serial_Number="true"
SSD_Serial_Number_Title="Serial Number"
SSD_Model_Number="true"
SSD_Model_Number_Title="Model Number"
SSD_Capacity="true"
SSD_Capacity_Title="SSD Capacity"
SSD_SMART_Status="true"
SSD_SMART_Status_Title="SMART Status"
SSD_Warranty="false"
SSD_Warranty_Title="Warr- anty"
SSD_Drive_Temp="true"
SSD_Drive_Temp_Title="Curr Temp"
SSD_Drive_Temp_Min="true"
SSD_Drive_Temp_Min_Title="Temp Min"
SSD_Drive_Temp_Max="true"
SSD_Drive_Temp_Max_Title="Temp Max"
SSD_Power_On_Hours="true"
SSD_Power_On_Hours_Title="Power On Time"
SSD_Wear_Level="true"
SSD_Wear_Level_Title="Wear Level"
SSD_Reallocated_Sectors="true"
SSD_Reallocated_Sectors_Title="Re-alloc Sects"
SSD_Reallocated_Events="true"
SSD_Reallocated_Events_Title="Re-alloc Evnt"
SSD_Pending_Sectors="true"
SSD_Pending_Sectors_Title="Curr Pend Sects"
SSD_Offline_Uncorrectable="true"
SSD_Offline_Uncorrectable_Title="Offl Unc Sects"
SSD_UDMA_CRC_Errors_List="true"
SSD_UDMA_CRC_Errors_List_Title="UDMA CRC Error"
SSD_Last_Test_Age="true"
SSD_Last_Test_Age_Title="Last Test Age"
SSD_Last_Test_Type="true"
SSD_Last_Test_Type_Title="Last Test Type"
SSD_Total_Data_Written="true"
SSD_Total_Data_Written_Title="Total Data Written"
 
# For NVMe Drive Section
NVM_Device_ID="true"
NVM_Device_ID_Title="Device ID"
NVM_Serial_Number="true"
NVM_Serial_Number_Title="Serial Number"
NVM_Model_Number="true"
NVM_Model_Number_Title="Model Number"
NVM_Capacity="true"
NVM_Capacity_Title="NVMe Capacity"
NVM_SMART_Status="true"
NVM_SMART_Status_Title="SMART Status"
NVM_Warranty="false"
NVM_Warranty_Title="Warr- anty"
NVM_Critical_Warning="true"
NVM_Critical_Warning_Title="Critical Warning"
NVM_Drive_Temp="true"
NVM_Drive_Temp_Title="Curr Temp"
NVM_Drive_Temp_Min="false"               # I have not found this on an NVMe drive yet, so set to false
NVM_Drive_Temp_Min_Title="Temp Min"
NVM_Drive_Temp_Max="false"               # I have not found this on an NVMe drive yet, so set to false
NVM_Drive_Temp_Max_Title="Temp Max"
NVM_Power_Level="true"
NVM_Power_Level_Title="Power State"
NVM_Power_On_Hours="true"
NVM_Power_On_Hours_Title="Power On Time"
NVM_Wear_Level="true"
NVM_Wear_Level_Title="Wear Level"
NVM_Media_Error="true"
NVM_Media_Error_Title="Media Errors"
NVM_Last_Test_Age="true"
NVM_Last_Test_Age_Title="Last Test Age"
NVM_Last_Test_Type="true"
NVM_Last_Test_Type_Title="Last Test Type"
NVM_Total_Data_Written="true"
NVM_Total_Data_Written_Title="Total Data Written"
 
 
###### Mouseover
# This will display the original value of an overridden value (one in yellow)
# This is a tri-state value as explained below.
#   "true" will displaying the actual value via a mouseover html link. Still working to make this a true Mouseover.
#   "false" will not generate any special chart and will run as previous versions.
#   alt will place the actual value within parentheses.  An option if your email client can't display mouseover.
 
Mouseover="alt"
 
 
###### Drive Ignore List
# What does it do:
#  Use this to list any drives to ignore and remove from the report.  This is very useful for ignoring USB Flash Drives
#  or other drives for which good data is not able to be collected (non-standard).
#
# How to use it:
#  We are using a comma delimited file to identify the drive serial numbers.  You MUST use the exact and full serial
#  number smartctl reports, if there is no identical match then it will not match. Additionally you may list drives
#  from other systems and they will not have any effect on a system where the drive does not exist.  This is great
#  to have one configuration file that can be used on several systems.
#
# Example: "VMWare,1JUMLBD,21HNSAFC21410E"
 
Ignore_Drives_List="none"
 
###### Drive UDMA_CRC_Error_Count List
# What does it do:
#  If you have a drive which has an UDMA count other than 0 (zero), this setting will offset the
#  value back to zero for the concerns of monitoring future increases of this specific error. Any match will
#  subtract the given value to report a 0 (zero) value and highlight it in yellow to denote it was overridden.
#  The Warning Title will not be flagged if this is zero'd out in this manner.
#  NOTE: UDMA_CRC_Errors_List are typically permanently stored in the drive and cannot be reset to zero even though
#        they are frequently caused by a data cable communications error.
#
# How to use it:
#  List each drive by serial number and include the current UDMA_CRC_Error_Count value.
#  The format is very specific and will not work if you wing it, use the Live EXAMPLE.
#
#  Set the FLAG in the FLAGS Section IgnoreUDMA to false.
#
# If the error count exceeds the limit minus the offset then a warning message will be generated.
# On the Status Report the UDMA CRC Errors block will be YELLOW with a value of 0 for an overridden value.
#   -- NOTE: We are using the colon : as the separator between the drive serial number and the value to change.
#
# Format: variable=Drive_Serial_Number:Current_UDMA_Error_Count and add a comma if you have more than one drive.
#
# The below example shows drive WD-WMC4N2578099 has 1 UDMA_CRC_Error, drive S2X1J90CA48799 has 2 errors.
#
# Live Example: "WD-WMC4N2578099:1,S2X1J90CA48799:2,P02618119268:1"
 
CRC_Errors_List=""
 
###### MultiZone_List_Errors List
# What does it do:
#   This identifies drives with MultiZone_List_Errors which may be irritating people.
#   MultiZone_List_Errors for some drives, not all drives are pretty much meaningless.
#
# How to use it:
#   Use same format as CRC_Errors_List.
 
MultiZone_List=""
 
#######  Reallocated Sectors Exceptions
# What does it do:
#  This will offset any Reallocated Sectors count by the value provided.
#
#  I do not recommend using this feature as I'm a believer in if you have over 5 bad sectors, odds are the drive will get worse.
#  I'd recommend replacing the drive before complete failure.  But that is your decision.
#
#  Why is it even an option?
#  I use it for testing purposes only but you may want to use it.
#
# How to use it:
#   Use same format as CRC_Errors_List.
 
ReAllocated_Sector_List=""
ReAllocated_Sector_Events_List=""
 
######## ATA Error Log Silencing ##################
# What does it do:
#   This will ignore error log messages equal to or less than the threshold.
# How to use:
#  Same as the CRC_Errors_List, [drive serial number:error count]
 
ATA_Errors_List=""
 
####### Custom Drive Configuration (Experimental)
# Used to define specific alarm values for specific drives by serial number.
# This should only be used for drives where the default alarm settings
# are not proper.  Up to 24 unique drive values may be stored.
#
# Use -config to set these values.
 
Custom_Drives_List=""
 
####### Warranty Expiration Date
# What does it do:
# This section is used to add warranty expirations for designated drives and to create an alert when they expire.
# The date format is YYYY-MM-DD.
#
# Below is an example for the format using my own drives, which yes, are expired.
# As previously stated above, drive serial numbers must be an exact match to what smartctl reports to function.
#
# If the drive does not exist, for example my drives are not on your system, then nothing will happen.
#
# How to use it:
#   Use the format ="Drive_Serial_Number:YYYY-MM-DD" and add a comma if you have more than one drive.
#  Example: $Drive_Warranty_List="K1JUMLBD:2020-09-30,K1JRSWLD:2020-09-30,K1JUMW4D:2020-09-30,K1GVD84B:2020-10-12"
 
Drive_Warranty_List=""
 
######## Expired Drive Warranty Setup
expiredWarrantyBoxColor="#000000"   # "black" = normal box perimeter color.
WarrantyBoxPixels="1"   # Box line thickness. 1 = normal, 2 = thick, 3 = Very Thick, used for expired drives only.
WarrantyBackgndColor="#f1ffad"  # Background color for expired drives. "none" = normal background.
 
###### Global table of colors
# The colors selected you can change but you will need to look up the proper HEX code for a color.
 
okColor="#b5fcb9"       # Hex code for color to use in SMART Status column if drives pass (default is darker light green, #b5fcb9).
warnColor="#F38B16"     # Hex code for WARN color (default is orange, #F38B16).
critColor="#f44336"     # Hex code for CRITICAL color (default is red, #f44336).
altColor="#f4f4f4"      # Table background alternates row colors between white and this color (default is light gray, #f4f4f4).
whtColor="#ffffff"      # Hex for White background.
ovrdColor="#ffffe4"     # Hex code for Override Yellow.
blueColor="#87ceeb"     # Hex code for Sky Blue, used for the SCRUB/SMART Test In Progress/background.
yellowColor="#f1ffad"   # Hex code for pale yellow.



EDIT: Changed from icode to code per request. - Joe
 
Last edited by a moderator:

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Can I suggest you post your config code snippet, in code blocks - so we can see what you have done

I asssume you are editing the config file and NOT the main script file
 

JDE1000

Dabbler
Joined
Sep 15, 2023
Messages
10
Can I suggest you post your config code snippet, in code blocks - so we can see what you have done

I asssume you are editing the config file and NOT the main script file
I just edited my post to include the config. hopefully I did the code blocks right. I am using the ./multi_report.sh -config
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
After you create the config file using -config - you need to edit the multi_report_config.txt file in the same folder
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
The easy way would be to read the config file you posted, but I guess the easier way is to give it to you.

Edit your multi_report_config.txt file in a simple text editor and scroll down to the line: CRC_Errors_List=""

Change that line to: CRC_Errors_List="VLK5B9GY:1"

Note: The serial number must be exact or it will not match.


I went into Advanced config to try and offset it. I keep getting error "fdisk: command not found".
This bothers me and I will check into it. I'm curious if fdisk is not in the path anymore with the new SCALE release. It's very possible, which means other errors as well.

Edit: SCALE 23.10.0.1 works. In the process of upgrading to 23.10.1.3 (hope it works)
 
Last edited:

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I went into Advanced config to try and offset it.
Please provide me a step by step on what you did to generate the error. Feel free to open up a Conversation with me if you desire. The final result of the troubleshooting will still be posted here. You should have gone into Advanced Configuration Settings -> K) Drive Errors and Custom Builds -> Enter -> Enter -> y (select automatic drive compensation) -> press enter a few more times and when you can save the configuration file.

If you do this after manually changing the config file then you should have the drive data entry twice so I would recommend you tell the script to 'd'elete the data when asked. That happens a few steps before the Automatic Drive Compensation.

Right now I need to know if you can reproduce the error and then tell me how I can reproduce it.

Also, I have no issues running 'fdisk' so thankfully it was not a path issue. Whew!

Cheers,
-Joe
 

JDE1000

Dabbler
Joined
Sep 15, 2023
Messages
10
The easy way would be to read the config file you posted, but I guess the easier way is to give it to you.

Edit your multi_report_config.txt file in a simple text editor and scroll down to the line: CRC_Errors_List=""

Change that line to: CRC_Errors_List="VLK5B9GY:1"

Note: The serial number must be exact or it will not match.



This bothers me and I will check into it. I'm curious if fdisk is not in the path anymore with the new SCALE release. It's very possible, which means other errors as well.

Edit: SCALE 23.10.0.1 works. In the process of upgrading to 23.10.1.3 (hope it works)
Thank you this worked. Just to advise what I had tried. I started a new config and when it asked to do auto error detection I said yes. It found no errors. Then I went back into config and hit K and got the Fdisk errors.
No CRC.png
Fdisk error.png
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Thanks for posting that information. Not sure exactly what is going on here. I am unable to recreate the issue. It of course looks like the script cannot locate 'fdisk' and when you created a new config file, you may not have seen the error messages but I'm certain they happened, they are just piped to not display on the screen.

Question, where do you have the script located at? Does the path have a "space" character or other special symbol? I do think it's the location and/or privileges for when you are manually running the script. That is all I can think of as this kind of thing has caused strange problems. Most people like to place the script in the '/root' directory. I hear it solves a lot of permission issues.

But I'm glad it's working for you.
 

JDE1000

Dabbler
Joined
Sep 15, 2023
Messages
10
Thanks for posting that information. Not sure exactly what is going on here. I am unable to recreate the issue. It of course looks like the script cannot locate 'fdisk' and when you created a new config file, you may not have seen the error messages but I'm certain they happened, they are just piped to not display on the screen.

Question, where do you have the script located at? Does the path have a "space" character or other special symbol? I do think it's the location and/or privileges for when you are manually running the script. That is all I can think of as this kind of thing has caused strange problems. Most people like to place the script in the '/root' directory. I hear it solves a lot of permission issues.

But I'm glad it's working for you.
Thank you kind sir for the help. I'm not that familiar with linux commands so I placed this just in a working directory on my Truenas Scale (/mnt/Storage/jde1000).
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
So long as it's working for now, that will be fine. Hum, maybe I should have it automatically move to /root. Nope, that would make people nervous. It would make ne nervous too. I like to control some things.
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
So long as it's working for now, that will be fine. Hum, maybe I should have it automatically move to /root. Nope, that would make people nervous. It would make ne nervous too. I like to control some things.
Maybe add a warning flag that needs to be manually deselected into the script's settings that warns you about the placement in the email report.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Maybe. I'll add that note to the current script in progress. That doesn't mean it will be incorporated but it's a good reminder for me. The next version is closer but still have a while. The GUI configuration is slowly coming along. A different thing I could try, verify all the external appliclications are executable and if not, toss a warning message and exit. I think FreeNAS Report may do this.

Super Bowl weekend = No Progress for me.

Go Taylor's Team! LOL. I really don't care which one wins this time. I will root for the one with the lower score at halftime, I like seeing a comeback.
 
Top