Edit the line "drives" and add nvd0, so it would look something like drives="da0 da1 da2 da3 da4 da5 da6 da7 nvd0"Anyone got any help for this?
Here you go. I don't see any wrapping.Usually it's because of line wrap; can you post (between codes tags or on pastebin) the output ofcat -e /mnt/Main/Scripts/Runit.shplease?
Cheers. That worked. I used PSPad and thought it was saving as a Unix sh file. Obviously not!You might want to edit the pastebin to remove your email address...
I can see the line breaks are of the Windows type (\^M$ which means \r\n instead of just $ which is \n) it's maybe the source of the problem.
root@freenas:~/scripts # ./smart.sh
./smart.sh: +------+---------------+----+-----+-----+-----+-------+-------+--------+------+------+------+-------+----+: not found
./smart.sh: +------+---------------+----+-----+-----+-----+-------+-------+--------+------+------+------+-------+----+: not found
awk: no variable name
./smart.sh: -v: not found
./smart.sh: -v: not found
awk: no variable name
./smart.sh: -v: not found
./smart.sh: -v: not found
awk: no variable name
./smart.sh: -v: not found
./smart.sh: -v: not found
awk: no variable name
./smart.sh: -v: not found
./smart.sh: -v: not found
awk: no variable name
./smart.sh: -v: not found
./smart.sh: -v: not found
awk: no variable name
./smart.sh: -v: not found
./smart.sh: -v: not found
./smart.sh: +------+---------------+----+-----+-----+-----+-------+-------+--------+------+------+------+-------+----+: not found
usage: awk [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]
./smart.sh: {print $3, $4, $5}: not found
usage: awk [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]
./smart.sh: {print $3}: not found
usage: awk [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]
./smart.sh: {print $3, $4, $5}: not found
usage: awk [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]
./smart.sh: {print $3}: not found
usage: awk [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]
./smart.sh: {print $3, $4, $5}: not found
usage: awk [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]
./smart.sh: {print $3}: not found
usage: awk [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]
./smart.sh: {print $3, $4, $5}: not found
usage: awk [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]
./smart.sh: {print $3}: not found
usage: awk [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]
./smart.sh: {print $3, $4, $5}: not found
usage: awk [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]
./smart.sh: {print $3}: not found
usage: awk [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]
./smart.sh: {print $3, $4, $5}: not found
usage: awk [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]
./smart.sh: {print $3}: not found
root@freenas:~/scripts # cat -e ./smart.sh
#!/bin/sh$
$
### Parameters ###$
logfile="/tmp/smart_report.tmp"$
email="deleted@gmail.com"$
subject="SMART Status Report for FreeNAS"$
drives="ada0 ada1 ada2 ada3 ada4 ada5"$
tempWarn=40$
tempCrit=50$
sectorsCrit=10$
testAgeWarn=1$
warnSymbol="?"$
critSymbol="!"$
$
### Set email headers ###$
($
echo "To: ${email}"$
echo "Subject: ${subject}"$
echo "Content-Type: text/html"$
echo "MIME-Version: 1.0"$
echo -e "\r\n"$
) > "$logfile"$
$
### Set email body ###$
echo "<pre style=\"font-size:14px\">" >> "$logfile"$
$
###### summary ######$
($
echo ""$
echo "########## SMART status report summary for all drives $
##########"$
echo ""$
echo $
"+------+---------------+----+-----+-----+-----+-------+-------+--------+------+------+------+-------+----+"$
echo "|Device|Serial |Temp|Power|Start|Spin $
|ReAlloc|Current|Offline |UDMA |Seek |High |Command|Last|"$
echo "| | | |On |Stop $
|Retry|Sectors|Pending|Uncorrec|CRC |Errors|Fly |Timeout|Test|"$
echo "| | | |Hours|Count|Count| $
|Sectors|Sectors |Errors| |Writes|Count |Age |"$
echo $
"+------+---------------+----+-----+-----+-----+-------+-------+--------+------+------+------+-------+----+"$
) >> "$logfile"$
for drive in $drives$
do$
($
smartctl -A -i -v 7,hex48 /dev/"$drive" | \$
awk -v device="$drive" -v tempWarn="$tempWarn" -v $
tempCrit="$tempCrit" -v sectorsCrit="$sectorsCrit" \$
-v testAgeWarn="$testAgeWarn" -v warnSymbol="$warnSymbol" -v $
critSymbol="$critSymbol" \$
-v lastTestHours="$(smartctl -l selftest /dev/"$drive" | grep "# $
1" | awk '{print $9}')" '\$
/Serial Number:/{serial=$3} \$
/Temperature_Celsius/{temp=$10} \$
/Power_On_Hours/{onHours=$10} \$
/Start_Stop_Count/{startStop=$10} \$
/Spin_Retry_Count/{spinRetry=$10} \$
/Reallocated_Sector/{reAlloc=$10} \$
/Current_Pending_Sector/{pending=$10} \$
/Offline_Uncorrectable/{offlineUnc=$10} \$
/UDMA_CRC_Error_Count/{crcErrors=$10} \$
/Seek_Error_Rate/{seekErrors=("0x" $
substr($10,3,4));totalSeeks=("0x" substr($10,7))} \$
/High_Fly_Writes/{hiFlyWr=$10} \$
/Command_Timeout/{cmdTimeout=$10} \$
END {$
testAge=sprintf("%.0f", (onHours - lastTestHours) / 24);$
if (temp > tempCrit || reAlloc > sectorsCrit || pending > $
sectorsCrit || offlineUnc > sectorsCrit)$
device=device " " critSymbol;$
else if (temp > tempWarn || reAlloc > 0 || pending > 0 || $
offlineUnc > 0 || testAge > testAgeWarn)$
device=device " " warnSymbol;$
seekErrors=sprintf("%d", seekErrors);$
totalSeeks=sprintf("%d", totalSeeks);$
if (totalSeeks == "0") {$
seekErrors="N/A";$
totalSeeks="N/A";$
}$
if (hiFlyWr == "") hiFlyWr="N/A";$
if (cmdTimeout == "") cmdTimeout="N/A";$
printf "|%-6s|%-15s| %s $
|%5s|%5s|%5s|%7s|%7s|%8s|%6s|%6s|%6s|%7s|%4s|\n",$
device, serial, temp, onHours, startStop, spinRetry, reAlloc, $
pending, offlineUnc, \$
crcErrors, seekErrors, hiFlyWr, cmdTimeout, testAge;$
}'$
) >> "$logfile"$
done$
($
echo $
"+------+---------------+----+-----+-----+-----+-------+-------+--------+------+------+------+-------+----+"$
echo ""$
echo ""$
) >> "$logfile"$
$
###### for each drive ######$
for drive in $drives$
do$
brand="$(smartctl -i /dev/"$drive" | grep "Model Family" | awk $
'{print $3, $4, $5}')"$
serial="$(smartctl -i /dev/"$drive" | grep "Serial Number" | awk $
'{print $3}')"$
($
echo ""$
echo "########## SMART status report for ${drive} drive $
(${brand}: ${serial}) ##########"$
smartctl -H -A -l error /dev/"$drive"$
smartctl -l selftest /dev/"$drive" | grep "# 1 \|Num" | cut -c6-$
echo ""$
echo ""$
) >> "$logfile"$
done$
sed -i '' -e '/smartctl 6.3/d' "$logfile"$
sed -i '' -e '/Copyright/d' "$logfile"$
sed -i '' -e '/=== START OF READ/d' "$logfile"$
sed -i '' -e '/SMART Attributes Data/d' "$logfile"$
sed -i '' -e '/Vendor Specific SMART/d' "$logfile"$
sed -i '' -e '/SMART Error Log Version/d' "$logfile"$
echo "</pre>" >> "$logfile"$
$
### Send report ###$
sendmail -t < "$logfile"$
rm "$logfile"$
root@freenas:~/scripts #
########## SMART status report summary for all drives ########## |Device|Serial |Temp|Power|Start|Spin |ReAlloc|Current|Offline |UDMA |Seek |High |Command|Last| | | | |On |Stop |Retry|Sectors|Pending|Uncorrec|CRC |Errors|Fly |Timeout|Test| | | | |Hours|Count|Count| |Sectors|Sectors |Errors| |Writes|Count |Age | ########## SMART status report for ada0 drive (: ) ########## smartctl 6.5 2016-05-07 r4318 [FreeBSD 11.0-STABLE amd64] (local build) SMART overall-health self-assessment test result: PASSED ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0 3 Spin_Up_Time 0x0027 185 172 021 Pre-fail Always - 5708 4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 79 5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0 7 Seek_Error_Rate 0x002e 100 253 000 Old_age Always - 0 9 Power_On_Hours 0x0032 091 091 000 Old_age Always - 7091 10 Spin_Retry_Count 0x0032 100 253 000 Old_age Always - 0 11 Calibration_Retry_Count 0x0032 100 253 000 Old_age Always - 0 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 78 192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 46 193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 68 194 Temperature_Celsius 0x0022 116 101 000 Old_age Always - 34 196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0 197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 0 No Errors Logged Test_Description Status Remaining LifeTime(hours) LBA_of_first_error Short offline Completed without error 00% 7026 - ########## SMART status report for ada1 drive (: ) ########## smartctl 6.5 2016-05-07 r4318 [FreeBSD 11.0-STABLE amd64] (local build) SMART overall-health self-assessment test result: PASSED ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0 3 Spin_Up_Time 0x0027 182 169 021 Pre-fail Always - 5900 4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 57 5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0 7 Seek_Error_Rate 0x002e 100 253 000 Old_age Always - 0 9 Power_On_Hours 0x0032 091 091 000 Old_age Always - 7073 10 Spin_Retry_Count 0x0032 100 253 000 Old_age Always - 0 11 Calibration_Retry_Count 0x0032 100 253 000 Old_age Always - 0 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 56 192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 30 193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 130 194 Temperature_Celsius 0x0022 115 109 000 Old_age Always - 35 196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0 197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 0 No Errors Logged Test_Description Status Remaining LifeTime(hours) LBA_of_first_error Short offline Completed without error 00% 7009 - ########## SMART status report for ada2 drive (: ) ########## smartctl 6.5 2016-05-07 r4318 [FreeBSD 11.0-STABLE amd64] (local build) SMART overall-health self-assessment test result: PASSED ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0 3 Spin_Up_Time 0x0027 184 181 021 Pre-fail Always - 5800 4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 27 5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0 7 Seek_Error_Rate 0x002e 100 253 000 Old_age Always - 0 9 Power_On_Hours 0x0032 094 094 000 Old_age Always - 4916 10 Spin_Retry_Count 0x0032 100 253 000 Old_age Always - 0 11 Calibration_Retry_Count 0x0032 100 253 000 Old_age Always - 0 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 27 192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 13 193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 30 194 Temperature_Celsius 0x0022 114 112 000 Old_age Always - 36 196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0 197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 0 No Errors Logged Test_Description Status Remaining LifeTime(hours) LBA_of_first_error Short offline Completed without error 00% 4852 - ########## SMART status report for ada3 drive (: ) ########## smartctl 6.5 2016-05-07 r4318 [FreeBSD 11.0-STABLE amd64] (local build) SMART overall-health self-assessment test result: PASSED ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0 3 Spin_Up_Time 0x0027 179 179 021 Pre-fail Always - 6033 4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 25 5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0 7 Seek_Error_Rate 0x002e 100 253 000 Old_age Always - 0 9 Power_On_Hours 0x0032 094 094 000 Old_age Always - 4912 10 Spin_Retry_Count 0x0032 100 253 000 Old_age Always - 0 11 Calibration_Retry_Count 0x0032 100 253 000 Old_age Always - 0 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 25 192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 13 193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 24 194 Temperature_Celsius 0x0022 114 112 000 Old_age Always - 36 196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0 197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 0 No Errors Logged Test_Description Status Remaining LifeTime(hours) LBA_of_first_error Short offline Completed without error 00% 4847 - ########## SMART status report for ada4 drive (: ) ########## smartctl 6.5 2016-05-07 r4318 [FreeBSD 11.0-STABLE amd64] (local build) SMART overall-health self-assessment test result: PASSED ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x000f 081 069 044 Pre-fail Always - 119744656 3 Spin_Up_Time 0x0003 099 099 000 Pre-fail Always - 0 4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 2 5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0 7 Seek_Error_Rate 0x000f 069 060 045 Pre-fail Always - 8493236 9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 26 (72 148 0) 10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0 12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 2 184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0 187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0 188 Command_Timeout 0x0032 100 100 000 Old_age Always - 0 189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0 190 Airflow_Temperature_Cel 0x0022 065 064 040 Old_age Always - 35 (Min/Max 24/36) 191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 0 192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 1 193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 6 194 Temperature_Celsius 0x0022 035 040 000 Old_age Always - 35 (0 24 0 0 0) 197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0 240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 26 (255 226 0) 241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 3658851252 242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 3627784956 No Errors Logged ########## SMART status report for ada5 drive (: ) ########## smartctl 6.5 2016-05-07 r4318 [FreeBSD 11.0-STABLE amd64] (local build) SMART overall-health self-assessment test result: PASSED ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x000f 082 071 044 Pre-fail Always - 159766280 3 Spin_Up_Time 0x0003 100 100 000 Pre-fail Always - 0 4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 1 5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0 7 Seek_Error_Rate 0x000f 066 060 045 Pre-fail Always - 3855881 9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 10 (71 215 0) 10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0 12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 1 184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0 187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0 188 Command_Timeout 0x0032 100 100 000 Old_age Always - 0 189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0 190 Airflow_Temperature_Cel 0x0022 067 067 040 Old_age Always - 33 (Min/Max 22/33) 191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 0 192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 1 193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 3 194 Temperature_Celsius 0x0022 033 040 000 Old_age Always - 33 (0 22 0 0 0) 197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0 240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 10 (51 102 0) 241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 3642382300 242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 534229 No Errors Logged
That's the problem exactly. If using the nano editor, the -w flag will avoid the line wrapping:You have a lot of newline chars where you shouldn't.
nano -w filename.sh.Subject:Cron <root@FreeNAS> PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin" /mnt/Media/James/scripts/report3.sh > /dev/null Failed conversion of ``17-on-Fri_Nov'' using format ``%Y-%b-%e_%H:%M:%S'' date: illegal time format usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format] Failed conversion of ``17-on-Fri_Nov'' using format ``%Y-%b-%e_%H:%M:%S'' date: illegal time format usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format] Failed conversion of ``11-on-Mon_Dec'' using format ``%Y-%b-%e_%H:%M:%S'' date: illegal time format usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]
I kind of hate to be a "Me Too", but I have this issue also and I can only guess that it is an incompatibility between the old OS and the new OS.I recently update to version 11.1 and this morning my cronjob ran and I received this email
Code:Subject:Cron <root@FreeNAS> PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin" /mnt/Media/James/scripts/report3.sh > /dev/null Failed conversion of ``17-on-Fri_Nov'' using format ``%Y-%b-%e_%H:%M:%S'' date: illegal time format usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format] Failed conversion of ``17-on-Fri_Nov'' using format ``%Y-%b-%e_%H:%M:%S'' date: illegal time format usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format] Failed conversion of ``11-on-Mon_Dec'' using format ``%Y-%b-%e_%H:%M:%S'' date: illegal time format usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]
Also the resulting email from the script running showed this
View attachment 21869
Failed conversion of ``9-on-Sat_Dec'' using format ``%Y-%b-%e_%H:%M:%S'' date: illegal time format usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format] Failed conversion of ``6-on-Wed_Dec'' using format ``%Y-%b-%e_%H:%M:%S'' date: illegal time format usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format] Failed conversion of ``11-on-Mon_Dec'' using format ``%Y-%b-%e_%H:%M:%S'' date: illegal time format usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]
It's a difference in format in the output ofI can only guess that it is an incompatibility between the old OS and the new OS.
zpool status. Also reported and discussed on the thread about the github page for the FreeNAS scripts.Thanks, I didn't look in the discussion there.It's a difference in format in the output of zpool status. Also reported and discussed on the thread about the github page for the FreeNAS scripts.
# scrubErrors="$(zpool status "$pool" | grep "scan" | awk '{print $8}')"
scrubErrors="$(zpool status "$pool" | grep "scan" | awk '{print $10}')"
# scrubDate="$(zpool status "$pool" | grep "scan" | awk '{print $15"-"$12"-"$13"_"$14}')"
scrubDate="$(zpool status "$pool" | grep "scan" | awk '{print $17"-"$14"-"$15"_"$16}')"