- Joined
- May 28, 2011
- Messages
- 10,996
That was fast! Glad it works and I didn't break itWorks fine over here. Thank you, Joe!
That was fast! Glad it works and I didn't break itWorks fine over here. Thank you, Joe!
In software/application architecture there is the concept of "separation of concerns" and this situation is similar. It has long been established that having a given program doing one thing only (and hopefully well), is better than to pack multiple things into it. It confuses users and, through increased complexity by covering multiple "domains" (not in the AD sense, but in terms of knowledge areas), makes maintenance a lot harder.Not trying to be mean but Nope. The main focus of this script is for hard drive awareness. A separate script would be best made to poll the other requested data. I've been asked to include UPS data. I'm not sure if I will, even though it's an easy thing to add.
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)
#...
-dump
switch, and you did not use the switch. So it doesn't find the files and continues on smartly.Version 2.0.7 was posted in the download center. This fixes the minor bug.Version 2.0.6 has a slight annoyance bug.
That is funny, never noticed it and I thought he put it in there. But it's changed for the next release. Thanks for pointing it out.Also, there's a typo in the credits. It says Bidelu0hm, instead of Bidule0hm. Not that it particularly matters...
./multi_report.sh: 296: Bad substitution ./multi_report.sh: 695: [[: not found ./multi_report.sh: 928: Syntax error: redirection unexpected
I have not tested this script on version 22.12.0, but it does run on 22.12.1. While I doubt that is the issue, please explain in terrible detail how and where you installed the script and how you are running it. The very first failure you have is the location of the script directory. I suspect you placed it somewhere it doesn't like. Where is it located? I place my script in a dataset I called "scripts" for that is where I locate all my scripts and only script related data.I have been trying to get this to work, but I think there is something fundamentally I am missing.
Keep getting:
Code:./multi_report.sh: 296: Bad substitution ./multi_report.sh: 695: [[: not found ./multi_report.sh: 928: Syntax error: redirection unexpected
This is a clean copy of the v2.0.7, and I am getting these errors when I try running it.
Anyone been having the same problem?
Version: Truenas Scale 22.12.0
I could update to 22.12.1 just to be sure.I have not tested this script on version 22.12.0, but it does run on 22.12.1. While I doubt that is the issue, please explain in terrible detail how and where you installed the script and how you are running it. The very first failure you have is the location of the script directory. I suspect you placed it somewhere it doesn't like. Where is it located? I place my script in a dataset I called "scripts" for that is where I locate all my scripts and only script related data.
-Joe
pwd /root/scripts/ wget -O wget -O multi_report.sh https://www.truenas.com/community/resources/multi_report-sh-version-for-core-and-scale.179/download chmod +x multi_report.sh sh ./multi_report.sh
I have never done this method before to install a script from the the recourses, interesting but I suspect that is the problem. I just share the dataset via SMB and drag and drop it.The location is:
Code:
pwd
/root/scripts/
wget -O wget -O multi_report.sh https://www.truenas.com/community/resources/multi_report-sh-version-for-core-and-scale.179/download
chmod +x multi_report.sh
sh ./multi_report.sh
Probably not the best practice. Would love for hints to place it better!
./multi_report.sh -config
and then answer the questions to create the configuration file.I just figured it out.. I'm an idiotI have never done this method before to install a script from the the recourses, interesting but I suspect that is the problem. I just share the dataset via SMB and drag and drop it.
When you first run the script, it will fail with a message to configure the script, meaning run./multi_report.sh -config
and then answer the questions to create the configuration file.
You know, you are going to make me try that out so I can see what is the issue. But that won't happen today, I have to leave for work shortly. As I said, interesting.
./multi_report.sh -config (worked) sh ./multi_report.sh -config (not so much)
-dump email
option and it will send me a copy of the report and the information about your drives so I can replicate the issue(s). The only personal information I receive is your email address to which you send your report to. I don't share that with anyone.If you look into the script the first line readsCode:./multi_report.sh -config (worked) sh ./multi_report.sh -config (not so much)
#!/bin/bash
bash ./multi_report.sh -config
./mnt/TrueNAS/scripts/multi_report.sh: line 2772: ( / 8760): syntax error: operand expected (error token is "/ 8760)")
-dump email
and if that runs, I will get some data to try and troubleshoot what is going on. Often this will be caused by a SMART Test or a drive reporting some non-standard report. Most likely we cannot divide a string vice a number. Once the test is over the problem goes away. But if I know what the problem is, I can generally address it.No need for a dump, looking up 2.0.7. and upgrading to that fixed the error and look of the report.@GrimmReaperNL
Version 2.0.7 is the current released version. If you have this version then if you could run the script with-dump email
and if that runs, I will get some data to try and troubleshoot what is going on. Often this will be caused by a SMART Test or a drive reporting some non-standard report. Most likely we cannot divide a string vice a number. Once the test is over the problem goes away. But if I know what the problem is, I can generally address it.
It would be good to know if the problem is reproducible. If it is, then how.
# 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.