Try
cd /mnt/HDD/apps/scripts/multi_report && ./multi_report.sh
Instead
With this command I get an email āsh: 1: cd: canāt cd to /mnt/HDD/apps/scripts/multi_reportā
If I run the ./multi_report.sh I get the email fine. but from the cron no. Well I do get an email that truenas doesnāt support sendmail.
I run the midclt call mail.config | jq
and this is the result.
The path where multi_report.sh is /mnt/HDD/apps/scripts/multi-report
Sorry, typo in last message
cd /mnt/HDD/apps/scripts/multi-report && ./multi_report.sh
A - instead of _ into the path
it was a typo cd /mnt/HDD/apps/scripts/multi-report && ./multi_report.sh
thank you⦠I just run the cron, and I got 2 emails. One with the resoults and a second in the same time, that TrueNAS does not support sendmail function, using curl.
I just run again, and I get the same 2 emails, the first with the results, the second that it does not support curl. But it works, I can ignore the second.
Just flag Hide standard output and you will not receive 2 emails
Thank you for your help.
If you hide the CRON job email, you will not see what drives are being tested. This may be fine since the Multi-Report chart will identify which are being tested and more importantly, which have not been tested. It is your call, I would recommend leaving it not hidden for a while until you are sure you understand what is going on, and then when you feel comfortable, hide it.
OK I leave it on, but I only have 4 drive and I have set multi-report to run a short scan once a week on all 4 drives in the same time and once a month on all 4 drives in the same time. Should I set to run by Id so there is no too much stress on the drives?
This is my config. Is it ok as it is?
###### HDD/SSD/NVMe SMART Testing
### SHORT SETTINGS
Short_Test_Mode=1 # 1 = Use Short_Drives_to_Test_Per_Day value, 2 = All Drives Tested (Ignores other options), 3 = No Drives Tested.
Short_Time_Delay_Between_Drives=1 # Tests will have a XX second delay between the drives starting testing.
Short_SMART_Testing_Order="Week" # Test order is for Test Mode 1 ONLY, select "Serial" or "DriveID" for sort order. Default = "Serial"
Short_Drives_to_Test_Per_Day=4 # For Test_Mode 1) How many drives to run each day minimum?
Short_Drives_Test_Period="Week" # "Week" (7 days) or "Month" (28 days)
Short_Drives_Tested_Days_of_the_Week="1" # Days of the week to run, 1=Mon, 2=Tue, 3=Wed, 4=Thu, 5=Fri, 6=Sat, 7=Sun.
Short_Drives_Test_Delay=130 # How long to delay when running Short tests, before exiting to controlling procedure. Default is 130 second should allow.
# Short tests to complete before continuing. If using without Mulit-Report, set this value to 1.
### LONG SETTINGS
Long_Test_Mode=2 # 1 = Use Long_Drives_to_Test_Per_Day value, 2 = All Drives Tested (Ignores other options), 3 = No Drives Tested.
Long_Time_Delay_Between_Drives=1 # Tests will have a XX second delay between the drives starting the next test.
Long_SMART_Testing_Order="Month" # Test order is either "Serial" or "DriveID". Default = "Serial"
Long_Drives_to_Test_Per_Day=4 # For Test_Mode 1) How many drives to run each day minimum?
Long_Drives_Test_Period="Month" # "Week" (7 days) or "Month" (28 days)
Long_Drives_Tested_Days_of_the_Week="2" # Days of the week to run, 1=Mon, 2=Tue, 3=Wed, 4=Thu, 5=Fri, 6=Sat, 7=Sun.
@smic717394
When you run the script, any drives which is due to be tested are tested immediately or separated by the time delay which is 1 second as your setup shows. The delay is to limit current inrush but can be used for a longer period of time if you desire.
Your setting above, if you run the CRON job daily (that is important here), it will run a SMART Short test on all drives every Monday. SMART Long test will run on all drives every time you run the script since you have Test Mode=2 which ignores all other options.
The choice of ID or Serial has to do with either running the tests on the drives by the ID (ada0, ada1, sda, sdb) order or by Serial number order. The intent here is if there are groupings of drives which can generate a lot of heat during a Long test, using the Serial option āmightā break apart some of these groupings.
My advice is these settings:
### SHORT SETTINGS
Short_Test_Mode=2 # 1 = Use Short_Drives_to_Test_Per_Day value, 2 = All Drives Tested (Ignores other options), 3 = No Drives Tested.
Short_Time_Delay_Between_Drives=1 # Tests will have a XX second delay between the drives starting testing.
Short_SMART_Testing_Order="DriveID" # Test order is for Test Mode 1 ONLY, select "Serial" or "DriveID" for sort order. Default = "Serial"
Short_Drives_to_Test_Per_Day=1 # For Test_Mode 1) How many drives to run each day minimum?
Short_Drives_Test_Period="Week" # "Week" (7 days) or "Month" (28 days)
Short_Drives_Tested_Days_of_the_Week="1,2,3,4,5,6,7" # Days of the week to run, 1=Mon, 2=Tue, 3=Wed, 4=Thu, 5=Fri, 6=Sat, 7=Sun.
Short_Drives_Test_Delay=6 # How long to delay when running Short tests, before exiting to controlling procedure. Default is 130 second should allow.
# Short tests to complete before continuing. If using without Multi-Report, set this value to 1.
### LONG SETTINGS
Long_Test_Mode=1 # 1 = Use Long_Drives_to_Test_Per_Day value, 2 = All Drives Tested (Ignores other options), 3 = No Drives Tested.
Long_Time_Delay_Between_Drives=1 # Tests will have a XX second delay between the drives starting the next test.
Long_SMART_Testing_Order="Serial" # Test order is either "Serial" or "DriveID". Default = "Serial"
Long_Drives_to_Test_Per_Day=1 # For Test_Mode 1) How many drives to run each day minimum?
Long_Drives_Test_Period="Month" # "Week" (7 days) or "Month" (28 days)
Long_Drives_Tested_Days_of_the_Week="2" # Days of the week to run, 1=Mon, 2=Tue, 3=Wed, 4=Thu, 5=Fri, 6=Sat, 7=Sun.
The above settings result in a Short test being conducted every day unless a Long test is being conducted once a month on Tuesday. If you power your system off often then I would set both Test Modes =3 and then schedule your drives to be tested via the TrueNAS GUI. Test Mode 3 disables the script from testing the drives, and this will leave Multi-Report to just generate a report when the script is run. However if you have NVMe drives, you will likely want to run this the SMART testing as the current version of TrueNAS cannot schedule NVMe drives for testing, also smartmontools 7.4 may not test some NVMe drives so I use the nvme or nvmecontrol commands to run these tests, until TrueNAS GUI supports it and smartmontools 7.5 is integrated (it hasnāt been released yet).
Let me say this, the intent of the drive_selftest portion of the script is to help schedule SMART testing for those folks who have a lot of drives to test, and the script must be run once a day to ensure all drives are tested within the given periodicity selected. Even people who have 4 drives can take advantage of this but you need to understand what is going on.
In your script folder on your computer you should find (may not show up in the Beta) the Drive_Selftest_User_Guide.pdf, if not, grab a copy from here. I plan to review this document and update for any changes that have occured since it was originally written. Hopefully this will help.
Iām running Beta 6 with the short_test_mode set to 2 and long_test_mode to 3. I run the script daily and have set a schedule for long tests through the gui.
Three drives a week, once a month.
I have 11x 14tb drives which take 24+hours for a long test >.<
Seems to be running okay. The āfromā field in the email is just a ā>ā for me though. Is that a setting I messed up?
Also, what are all the ā.partitionā files that are attached to the email?
@joeschmuck Dumb question. On my test setup I do get system test and stdout emails. The script appears to work without errors but I donāt get an email from the script. I do get the stdout email with this message (last line of stdout when running the script either by ssh or by cron and not hiding stdout/stderror). I can also pipe stdout to a text file using ./multi_report_v3.1.sh > /mnt/pool1/data1/scripts/multi-report/send-updates.log 2>&1
using either cron or ssh and it runs and pipes the same output recorded into a text file as I get in the system email so it can write to the directory fine.
Email sending is skipped due to USE_WITH_MULTI_REPORT setting.
Is that indicating something is configured wrong or is it just the Spencer integration message stating Spencer email is being handled by Multi_report?
Multi-Report v3.1 dtd:2024-12-10 (TrueNAS Scale 24.10.1)
Checking for Updates
Current Version 3.1 ā GitHub Version 3.0.7
No Update Required
Run as root from Cron and or ssh
There is an option to backup the partition tables of the drives. It was a request that followed the guidelines of drive care so I added it. You can disable that as well, but the default is only on Mondays to email you the files. Beta 7 will shove all those into a .tar file to clean up the look.
Iāve been told there is no such thing, however we all know there isā¦
It sounds like your problem is just not receiving the Multi-Report generated email. There have been a lot of issues here and I would request you contact @oxyde at oxyde1989@gmail.com and tell him of your plight. You have indicated that you are using TrueNAS 24.10.1, but if you try to use TrueNAS 25.04, Multi-Report will fail. I have fixed this in Beta 7 and will release it in a few days, what is fixed for now can be broken once someone else tests it. There is more to do.
Spencer will not send itās own email if being run via Multi-Report, but itās status will be included in Multi-Report.
I am only on 24.10.1 as that matches what Iām running in production. I have used the Multi-report script for a long time so I am more or less familiar with how the script is supposed to work, and what it is supposed to send me daily. I have recently been more or less following along with the sudden script email issues so the script has been turned off on the production servers and itās not a problem for me to wait until a solution is found. I saw some progress was made I did look in the scripts before posting and found the message is from (embeded in) the Spenser script and since I normally have stdout turned off I never see any of the stdout messages. Since no email is being sent and some appear to have the script partially working I thought maybe I missed a configuration parameter. So yes dumb question.
@PhilD13 you can use Beta6 if you desire, it will get you the emails back, but if you wanted to wait until this weekend, I should have the new version out then.
Guess I thought I was on the beta. I installed V3.1 (11 December 2024) from Github.
Didnāt find any other later ones on the site but confess didnāt look very hard while eating lunch. I can wait.
Yes, still beta. I can easily break the beta so trying to fix that now. And Iād like to update the user guide.
I have beta6 running for a couple of days now. Very happy to have my daily emails back.
Much love @joeschmuck for all your hard work.
This is honestly something that should be a build-in feature.
Anyone have any other recommendations of must have scripts/apps not part of TrueNAS by default?
after few days, the beta version work fine, no errors. THANK YOU
I found this or this a while ago.
In DragonFish I managed to get the second one, the UPS script, to work; of course now it does not work on EE presumably for the same reasons that multi-report has required so much (first class) effort.
Regrettably the fixes needed are so complicated I doubt if the UPS report script will ever be re-written but hopefully the built-in capabilities within EE (for example the netdata stuff) might suffice. I havenāt looked into it yet though.
While I do not use it, the FreeNAS Report that @dak180 maintains I believe has support to monitoring UPS. I do not know if it was affected but it is worth a try and if it works, maybe parts can be borrowed to repair the UPS Report script.
Iād have the UPS stuff in Multi-Report however I desire to keep the script focused on drives, not other components. Although I do list memory capacities, only because it can help diagnose a problem at a glance such as short RAM which can induce drive like problems (SWAP Space in CORE).
While Iām here, tomorrow I will be posting Beta7, and unless there is a show stopper, I plan to finish up the Multi-Report User Guide and publish it all this weekend. For those on Fangtooth, realize that it is still in development before Beta release.