- Joined
- May 28, 2011
- Messages
- 10,996
Stable. Well I hope. Beta will be on github, I think that is what I wrote.1.6d is beta or stable?
Stable. Well I hope. Beta will be on github, I think that is what I wrote.1.6d is beta or stable?
# 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...
# 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...
# 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...
# 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...
I created a folder for the script and have a cronjob running it every week.What is the proper way to run this with TrueNAS?
I see the field to input e-mail, and I have e-mail notifications setup. I inputted the e-mail in that field. So my question is simply how do I set the script to run, and where do I place it?
######### INSTRUCTIONS ON USE OF THIS SCRIPT # # This script will perform three main functions: # 1: Generate a report and send an email on your drive(s) status. # 2: Create a copy of your Config File and attach to the same email. # 3: Create a statistical database and attach to the same email. # # In order to configure the script properly read over the User-definable Parameters before making any changes. # Make changes as indicated by the section instructions. # # To run the program from the command line, use ./program_name.sh [-h] for additional help instructions, # and [-config] to run the configuration routine (highly recommended). # # If you create an external configuration file, you never have to edit the script, # so how many times do I need to say it is highly recommended? And I may force the # change to require the external configuration file. # # You may need to make the script executable using "chmod +x program_name.sh" #
Can you provide me some details and I could fix it up. I need the file created this way so I can pass it through the script on my end to find out what the issue is, it can't be a cut/paste operation as that at times will not be processed exactly the same. Sorry that I'm requesting a lot of data from you but I haven't heard anyone else having this issue so I'm perplexed, especially if the other pools are reporting correctly.Hi Joe,
Running the latest version, have just noticed the email reports for one of my servers report the pool size incorrectly. Please see screenshot attached.
zpool status Pool2 > pool_status.txt
zpool list -H -p -o capacity Pool2 > pool_used.txt
zpool list -H -o size Pool2 > pool_size.txt
zpool list -H -o free Pool2 > pool_free.txt
zfs list Pool2 > zfs_list.txt
I do not want want appended data. That does not help me. They need to be clean files for me to process them. Do it how I listed please.Please use >> instead of >.
>> will append data.
> will overwrite.
Thanks. The data you provided looks correct, now I need to figure out what blasted math is wrong. I will be able to use your exact data to feed into the script to troubleshoot it. Math in BASH sucks!I've attached the files requested.
No problem. The reason I ask for the data in this way is because when 'awk' looks through it, any special/hidden characters can throw me for a loop, so I need the data that would be presented in it's exact format. Cut and Paste often interprets some characters and will rain hell all over me as I'm scratching my head to figure out why I can't replicate the problem. I've included in the script the -dump parameter so the script will automatically dump the data I typically need (drive data), but it does not include zpool info, YET. It should on the next version, but I just hope I don't need to collect all that data many more times.Ah. Sorry. Misread that. It's a one time action. Again: Sorry.
While they might be small minor things, they are things none the less. To address some of these:These are all super minor things but figured i would share my systems quirks and stuff.
dax/daxx drives jumbled:
Adding a leading zero would make the device name technically incorrect and would definitely cause confusion for anyone troubleshooting a drive. For example, if I have the script report drive /dev/da01 has a bad sector, then I manually run the commandCan fix in statistical_data by just adding a zero in front so it reads da0x/da0xx.
smartctl -a /dev/da01
it will return an error that the device does not exist. But I appreciate you trying to offer a solution, most people do not make that effort.Helium on Toshiba MG0# drive:
When some data is listed as "unknown attribute" I can't guess what it pertains to. I do not have a table of drive make/models to do this work, that is what I rely on 'smartctl' to decode. I would need the -dump command run and the select drive files sent my way to add them. I need to test the code to make sure it works and I do not mess up something, which is very easy to do as this script has gotten more complex each month.Reserve NAND block Micron/Crucial ssd's:
That is an odd problem and the first time I've heard this and I suspect your email server does not like it. What email server/service do you use? I'm using msn.com (now called outlook.com) now but have used hotmail.com and gmail.com in the past, but I have no idea if they would work today. But I can add a comment to address it.Commented email section:
231
and with the Attribute Name SSD_Life_Left
and they both are currently at 99 (as per the Raw Value). The issue is that the report shows "Wear Level" at 1 when emailed. See below:smartctl --all
for the drives but if a dump or additional info is needed, please let me know.