Multi-Report

From a Fresh Install or recreating a New configuration file, those are the defaults. If a person is upgrading and has defined a preference in the older config file, that get carried through. It is a way to minimize all teh configuration work when a new version comes out.

And i am working on the Docker right now, I built a container, now what to do with it :slight_smile:

2 Likes

Ahh, I was not positive of the defaults on a new script install since I have been using the script for quite awhile.

Joe,

After updating the script, I’m getting an error in the Cron Job Report.

Exiting Joe's SMART Drive Self-test Script
Collecting Multi-Report Data...
Using mr_sendemail.py
python3: can't open file '//mr_sendemail.py': [Errno 2] No such file or directory
Sendemail had a problem. Check the file log at /sendmail_log

What is odd, is the script works perfectly if I run it manually from a terminal (elevated). So I deleted everything and started fresh.

(As root)
Created a new script directory.
Copied multi-report.sh to this dir
Copied multi-report-config.txt to this dir
Ran the script manually. It ran fine. Email sent successfully.

(In the Admin Console)
Edited the cron job (which runs as root) to point to the new script directory.
Manually ran the cron job, script ran, I get the error above.
All subsequent attempts to run the cron job fail with the error above. Python cannot find the mr_sendemail.py file. The file is in the script directory.

Everything in the script directory is owned by root. There should be no reason it cannot find this file. I can manually run python3 pointing to the py file and it finds the python script but is obviously missing parameters.

I recall seeing somewhere in your docs to put the script in /root. I tried that, same result.

I also edited your bash script to include the full path to the python script and I get a different error.

Sendemail had a problem. Check the file log at /sendmail_log
Current user doesn't have permission in the execution folder: /

Yet, if I run it as root from a terminal

Exiting Joe's SMART Drive Self-test Script
Collecting Multi-Report Data...
Using mr_sendemail.py
Email Sent

I’m stumped!

In cronjob, as mentioned in previous post, before call the script you must cd into the m.r. folder. Can you check?

2 Likes

That was it! Thanks!

1 Like

So I’ve been using multi-report for many years now. I’m running it on TrueNAS core 13.0-U6.7 and it is started by cron at 8AM every morning.

After upgrading to the latest version of everything, with the new script to do SMART testing, I’ve found that the script never starts a test on my two NVMe drives. All other SMART testing is handled by the TrueNAS middleware, so I set Test_ONLY_NVMe_Drives=“true” in the multi-report configuration file.

The log file in DS_Logs shows:

Joe's SMART Drive Self-test Script - Run: 09 February 08:00:06 AM
Script Version: 1.03 (26 January 2025), TrueNAS Core 13.0-U6.7
 
Logging Enabled
Testing ONLY NVMe Drives
 
  Short Test Mode:(1) "Short SMART Test on 1 Drive(s) Per Day", Running Week Option, Sorting by: DriveID
    Authorized Test Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
    Total Drives Recognized: 2
All Scheduled Drives Complete
 
    Drive(s) previously scheduled to be tested: None
    Drives scheduled for testing today: None
 
 
  Long Test Mode:(1) "Long SMART Test on 1 Drive(s) Per Day", Running Month Option, Sorting by: Serial
 
    Sorting Drive Test Order ............... 
    Authorized Test Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
    Total Drives Recognized: 2
    Drive(s) previously scheduled to be tested:  nvme1 nvme0
0 Drive(s) testing today: 
 
NO SHORT TESTS TO RUN
NO LONG TESTS TO RUN
 
08:00:07:  Drive-Selftest Wrapping things up...
Elapsed Time: Program 0 minutes and 1 seconds elapsed.
 
Saving Log (file name: /mnt/freenas/Scripts/DS_Logs/drive_test_09.txt)
Exiting Joe's SMART Drive Self-test Script

Interestingly, the first time I tried setting this flag, the SMART test script still insisted on trying to test my SSDs and spinning rust drives and I had to add the serial numbers of those drives in the script itself in the Ignore_Drives_List variable to make the script leave them alone.

For now, I’ve simply added a cron job which runs:

nvmecontrol selftest -c 1 nvme0
nvmecontrol selftest -c 1 nvme1

every day at midnight just to avoid getting warnings from multi-report.

@unseen Unfortunately I’m on travel so I will have to wing it until I get home.

You need to set the Short tests to Mode 2, which is a daily test. The NVMe drives “should” get tested then.

The part about the HDD/SSD’s getting tested, Hum… I will look at the script to see what is going on. I have made some changes in version 1.04 of the Drive Selftest script but I don’t think I had that same issue.

Thanks for letting me know, I will address it more when I return home Tuesday.

Thanks, I’ll give that a try!