dak180 / FreeNAS-Report

SMART & ZPool Status Report for FreeNAS/TrueNAS
GNU General Public License v3.0
38 stars 8 forks source link

Make the report run on scale too. #6

Closed dak180 closed 1 year ago

dak180 commented 2 years ago

Requires bc to be added to scale.

Fixes #5.

aardvarkl commented 2 years ago

Downloaded v1.7 according to the script I get bc is missing, please install

dak180 commented 2 years ago

@aardvarkl unfortunately that would be a deal killer as bc is required for a good portion of the math. I have created an issue on jira I would suggest voting for this and encouraging others to do so as well since this is blocked without bc.

rbollar commented 1 year ago

Date errors are gone:

root@scale[~]# /mnt/scaletest/scripts/report.sh -c /mnt/scaletest/scripts/report.conf
Init SSL without certificate database
root@scale[~]# 

Prior output removed...

dak180 commented 1 year ago

@rbollar Init SSL without certificate database comes from within upsc and is a result of an old version being used.

Is the (email) output now what you would expect given your layout and configuration?

rbollar commented 1 year ago

Actually, yes, as far as the status report summary goes -- the previous report I pasted was old. Well done!

Now, how about the HDD SMART Status Report Summary?

<br style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; line-height: 1.5; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: system-ui, sans-serif; font-size: 14px;"><br style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; line-height: 1.5; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: system-ui, sans-serif; font-size: 14px;">

ZPool Status Report Summary
--

scaletest | ONLINE | 219T | 205T | 13.7T | 14% | 93% | 0 | 0 | 0 | Resilver In Progress | N/A | 61.63% done | 01:44:10 to go
boot-pool | ONLINE | 448G | 66.5G | 382G | 6% | 14% | 0 | 0 | 0 | 0 | 0 | 4 | 00:04:50
ixapps | ONLINE | 1.81T | 1.18T | 651G | 55% | 64% | 0 | 0 | 0 | 0 | 0 | 31 | 02:15:31
scratch | ONLINE | 928G | 208G | 720G | 3% | 22% | 0 | 0 | 0 | 0 | 0 | 2 | 00:06:47
scratch-nvme | ONLINE | 1.81T | 1.60T | 216G | 16% | 88% | 0 | 0 | 0 | 0 | 0 | 23 | 00:13:00
xch01 | ONLINE | 16.4T | 16.2T | 156G | 0% | 99% | 0 | 0 | 0 | 0 | 0 | 1 | 23:44:11
xch02 | ONLINE | 16.4T | 16.2T | 157G | 1% | 99% | 0 | 0 | 0 | 0 | 0 | 1 | 23:53:34
xch03 | ONLINE | 16.4T | 16.2T | 190G | 0% | 98% | 0 | 0 | 0 | 0 | 0 | 1 | 23:58:49
xch04 | ONLINE | 16.4T | 16.2T | 157G | 0% | 99% | 0 | 0 | 0 | 0 | 0 | 1 | 23:49:28
xch05 | ONLINE | 16.4T | 16.1T | 220G | 0% | 98% | 0 | 0 | 0 | 0 | 0 | 1 | 1 days 00:02:18
xch06 | ONLINE | 16.4T | 16.2T | 214G | 0% | 98% | 0 | 0 | 0 | 0 | 0 | 15 | 1 days 00:09:15
xch07 | ONLINE | 16.4T | 16.2T | 156G | 0% | 99% | 0 | 0 | 0 | 0 | 0 | 15 | 1 days 00:19:10
xch08 | ONLINE | 16.4T | 16.2T | 157G | 0% | 99% | 0 | 0 | 0 | 0 | 0 | 1 | 23:46:22
xch09 | ONLINE | 16.4T | 16.2T | 152G | 0% | 99% | 0 | 0 | 0 | 0 | 0 | 1 | 1 days 00:02:00
xch10 | ONLINE | 16.4T | 16.2T | 156G | 0% | 99% | 0 | 0 | 0 | 0 | 0 | 15 | 1 days 00:11:56
xch11 | ONLINE | 16.4T | 16.2T | 157G | 1% | 99% | 0 | 0 | 0 | 0 | 0 | 29 | 23:57:51
xch12 | ONLINE | 16.4T | 16.2T | 157G | 0% | 99% | 0 | 0 | 0 | 0 | 0 | 29 | 1 days 00:48:48
xch13 | ONLINE | 16.4T | 16.2T | 157G | 0% | 99% | 0 | 0 | 0 | 0 | 0 | 22 | 1 days 00:01:48
xch14 | ONLINE | 16.4T | 16.2T | 128G | 0% | 99% | 0 | 0 | 0 | 0 | 0 | 22 | 1 days 00:06:29

<br style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; line-height: 1.5; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: system-ui, sans-serif; font-size: 14px;">
dak180 commented 1 year ago

@rbollar what is the output of ls -l "/sys/block" and lsblk -n -l -o NAME -E PKNAME

rbollar commented 1 year ago
root@scale[~]# ls -l "/sys/block"
total 0
lrwxrwxrwx 1 root root 0 Feb  7 06:31 dm-0 -> ../devices/virtual/block/dm-0
lrwxrwxrwx 1 root root 0 Feb  7 06:31 dm-1 -> ../devices/virtual/block/dm-1
lrwxrwxrwx 1 root root 0 Feb  7 06:31 dm-2 -> ../devices/virtual/block/dm-2
lrwxrwxrwx 1 root root 0 Feb  7 06:31 dm-3 -> ../devices/virtual/block/dm-3
lrwxrwxrwx 1 root root 0 Feb  7 06:31 dm-4 -> ../devices/virtual/block/dm-4
lrwxrwxrwx 1 root root 0 Feb  7 06:31 md123 -> ../devices/virtual/block/md123
lrwxrwxrwx 1 root root 0 Feb  7 06:31 md124 -> ../devices/virtual/block/md124
lrwxrwxrwx 1 root root 0 Feb  7 06:31 md125 -> ../devices/virtual/block/md125
lrwxrwxrwx 1 root root 0 Feb  7 06:31 md126 -> ../devices/virtual/block/md126
lrwxrwxrwx 1 root root 0 Feb  7 06:31 md127 -> ../devices/virtual/block/md127
lrwxrwxrwx 1 root root 0 Feb  4 12:20 nvme0n1 -> ../devices/pci0000:00/0000:00:01.0/0000:01:00.0/nvme/nvme0/nvme0n1
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sda -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:0/end_device-0:0:0/target0:0:0/0:0:0:0/block/sda
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdaa -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:3/end_device-0:1:3/target0:0:27/0:0:27:0/block/sdaa
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdab -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:4/end_device-0:1:4/target0:0:28/0:0:28:0/block/sdab
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdac -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:5/end_device-0:1:5/target0:0:29/0:0:29:0/block/sdac
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdad -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:6/end_device-0:1:6/target0:0:30/0:0:30:0/block/sdad
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdae -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:7/end_device-0:1:7/target0:0:31/0:0:31:0/block/sdae
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdaf -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:8/end_device-0:1:8/target0:0:32/0:0:32:0/block/sdaf
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdag -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:9/end_device-0:1:9/target0:0:33/0:0:33:0/block/sdag
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdah -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:10/end_device-0:1:10/target0:0:34/0:0:34:0/block/sdah
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdai -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:11/end_device-0:1:11/target0:0:35/0:0:35:0/block/sdai
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdaj -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:12/end_device-0:1:12/target0:0:36/0:0:36:0/block/sdaj
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdak -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:13/end_device-0:1:13/target0:0:37/0:0:37:0/block/sdak
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdal -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:14/end_device-0:1:14/target0:0:38/0:0:38:0/block/sdal
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdam -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:15/end_device-0:1:15/target0:0:39/0:0:39:0/block/sdam
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdan -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:16/end_device-0:1:16/target0:0:40/0:0:40:0/block/sdan
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdao -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:17/end_device-0:1:17/target0:0:41/0:0:41:0/block/sdao
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdap -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:18/end_device-0:1:18/target0:0:42/0:0:42:0/block/sdap
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdaq -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:19/end_device-0:1:19/target0:0:43/0:0:43:0/block/sdaq
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdar -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:20/end_device-0:1:20/target0:0:44/0:0:44:0/block/sdar
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdas -> ../devices/pci0000:00/0000:00:1f.2/ata2/host2/target2:0:0/2:0:0:0/block/sdas
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdat -> ../devices/pci0000:00/0000:00:1f.2/ata3/host3/target3:0:0/3:0:0:0/block/sdat
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdau -> ../devices/pci0000:00/0000:00:1f.2/ata4/host4/target4:0:0/4:0:0:0/block/sdau
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdav -> ../devices/pci0000:00/0000:00:1f.2/ata6/host6/target6:0:0/6:0:0:0/block/sdav
lrwxrwxrwx 1 root root 0 Feb  6 14:15 sdaw -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:22/end_device-0:1:22/target0:0:46/0:0:46:0/block/sdaw
lrwxrwxrwx 1 root root 0 Feb  6 15:32 sdax -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:24/end_device-0:0:24/target0:0:47/0:0:47:0/block/sdax
lrwxrwxrwx 1 root root 0 Feb  6 15:35 sday -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:23/end_device-0:1:23/target0:0:48/0:0:48:0/block/sday
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdb -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:1/end_device-0:0:1/target0:0:1/0:0:1:0/block/sdb
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdc -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:3/end_device-0:0:3/target0:0:3/0:0:3:0/block/sdc
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdd -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:2/end_device-0:0:2/target0:0:2/0:0:2:0/block/sdd
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sde -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:4/end_device-0:0:4/target0:0:4/0:0:4:0/block/sde
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdf -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:5/end_device-0:0:5/target0:0:5/0:0:5:0/block/sdf
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdg -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:10/end_device-0:0:10/target0:0:10/0:0:10:0/block/sdg
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdh -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:7/end_device-0:0:7/target0:0:7/0:0:7:0/block/sdh
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdi -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:6/end_device-0:0:6/target0:0:6/0:0:6:0/block/sdi
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdj -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:8/end_device-0:0:8/target0:0:8/0:0:8:0/block/sdj
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdk -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:9/end_device-0:0:9/target0:0:9/0:0:9:0/block/sdk
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdl -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:11/end_device-0:0:11/target0:0:11/0:0:11:0/block/sdl
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdm -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:12/end_device-0:0:12/target0:0:12/0:0:12:0/block/sdm
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdn -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:13/end_device-0:0:13/target0:0:13/0:0:13:0/block/sdn
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdo -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:14/end_device-0:0:14/target0:0:14/0:0:14:0/block/sdo
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdp -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:15/end_device-0:0:15/target0:0:15/0:0:15:0/block/sdp
lrwxrwxrwx 1 root root 0 Feb  7 08:08 sdq -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:25/end_device-0:0:25/target0:0:49/0:0:49:0/block/sdq
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdr -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:17/end_device-0:0:17/target0:0:17/0:0:17:0/block/sdr
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sds -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:18/end_device-0:0:18/target0:0:18/0:0:18:0/block/sds
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdt -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:19/end_device-0:0:19/target0:0:19/0:0:19:0/block/sdt
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdu -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:20/end_device-0:0:20/target0:0:20/0:0:20:0/block/sdu
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdv -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:21/end_device-0:0:21/target0:0:21/0:0:21:0/block/sdv
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdw -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:0/expander-0:0/port-0:0:22/end_device-0:0:22/target0:0:22/0:0:22:0/block/sdw
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdx -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:0/end_device-0:1:0/target0:0:24/0:0:24:0/block/sdx
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdy -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:1/end_device-0:1:1/target0:0:25/0:0:25:0/block/sdy
lrwxrwxrwx 1 root root 0 Feb  4 12:21 sdz -> ../devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/port-0:1/expander-0:1/port-0:1:2/end_device-0:1:2/target0:0:26/0:0:26:0/block/sdz
lrwxrwxrwx 1 root root 0 Feb  4 12:27 zd0 -> ../devices/virtual/block/zd0
root@scale[~]# lsblk -n -l -o NAME -E PKNAME
sda
sda1
sdb
sdb1
sdc
sdc1
sdd
sdd1
sde
sde1
sdf
sdf1
sdg
sdg1
sdh
sdh1
sdi
sdi1
sdj
sdj1
sdk
sdk1
sdl
sdl1
sdm
sdm1
sdn
sdn1
sdo
sdo1
sdp
sdp1
md123
md124
md125
md126
md127
sdq
sdr
sdr1
sds
sds1
sdt
sdt1
sdu
sdu1
sdv
sdv1
sdw
sdw1
sdx
sdx1
sdy
sdy1
sdz
sdz1
sdaa
sdaa1
sdab
sdab1
sdac
sdac1
sdad
sdad1
sdae
sdae1
sdaf
sdaf1
sdag
sdag1
sdah
sdah1
sdai
sdai1
sdaj
sdaj1
sdak
sdak1
sdal
sdal1
sdam
sdam1
sdan
sdan1
sdao
sdao1
sdap
sdap1
sdaq
sdaq1
sdar
sdar1
sdas
sdas1
sdat
sdat1
sdau
sdau1
sdav
sdav1
sdaw
sdaw1
sdax
sdax1
sday
zd0
md127
md126
md125
md124
md123
nvme0n1
nvme0n1p1
root@scale[~]# 
dak180 commented 1 year ago

@rbollar lsblk --help if you can try to get the list down to just whole disk devices if you can so no sdav1 only sdav and sda also if things like md123 and zd0 are not actual disks if they can be filtered out.

dak180 commented 1 year ago

@rbollar but if ls -l "/sys/block" | grep -v 'devices/virtual' | sed -e 's:[[:blank:]]\{1,\}: :g' | cut -d ' ' -f "9" is going to be easier let me know.

dak180 commented 1 year ago

@rbollar having thought about some more, try: ls -l "/sys/block" | grep -v 'devices/virtual' | sed -e 's:[[:blank:]]\{1,\}: :g' | cut -d ' ' -f "9" | sed -e 's:n[0-9]\{1,\}$::g' | uniq

rbollar commented 1 year ago

Here's that last command:

root@scale[~]# ls -l "/sys/block" | grep -v 'devices/virtual' | sed -e 's:[[:blank:]]\{1,\}: :g' | cut -d ' ' -f "9" | sed -e 's:n[0-9]\{1,\}$::g' | uniq

nvme0
sda
sdaa
sdab
sdac
sdad
sdae
sdaf
sdag
sdah
sdai
sdaj
sdak
sdal
sdam
sdan
sdao
sdap
sdaq
sdar
sdas
sdat
sdau
sdav
sdaw
sdax
sday
sdb
sdc
sdd
sde
sdf
sdg
sdh
sdi
sdj
sdk
sdl
sdm
sdn
sdo
sdp
sdq
sdr
sds
sdt
sdu
sdv
sdw
sdx
sdy
sdz
root@scale[~]# 

And the help:

root@scale[~]# ls --help
Usage: ls [OPTION]... [FILE]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.

Mandatory arguments to long options are mandatory for short options too.
  -a, --all                  do not ignore entries starting with .
  -A, --almost-all           do not list implied . and ..
      --author               with -l, print the author of each file
  -b, --escape               print C-style escapes for nongraphic characters
      --block-size=SIZE      with -l, scale sizes by SIZE when printing them;
                               e.g., '--block-size=M'; see SIZE format below
  -B, --ignore-backups       do not list implied entries ending with ~
  -c                         with -lt: sort by, and show, ctime (time of last
                               modification of file status information);
                               with -l: show ctime and sort by name;
                               otherwise: sort by ctime, newest first
  -C                         list entries by columns
      --color[=WHEN]         colorize the output; WHEN can be 'always' (default
                               if omitted), 'auto', or 'never'; more info below
  -d, --directory            list directories themselves, not their contents
  -D, --dired                generate output designed for Emacs' dired mode
  -f                         do not sort, enable -aU, disable -ls --color
  -F, --classify             append indicator (one of */=>@|) to entries
      --file-type            likewise, except do not append '*'
      --format=WORD          across -x, commas -m, horizontal -x, long -l,
                               single-column -1, verbose -l, vertical -C
      --full-time            like -l --time-style=full-iso
  -g                         like -l, but do not list owner
      --group-directories-first
                             group directories before files;
                               can be augmented with a --sort option, but any
                               use of --sort=none (-U) disables grouping
  -G, --no-group             in a long listing, don't print group names
  -h, --human-readable       with -l and -s, print sizes like 1K 234M 2G etc.
      --si                   likewise, but use powers of 1000 not 1024
  -H, --dereference-command-line
                             follow symbolic links listed on the command line
      --dereference-command-line-symlink-to-dir
                             follow each command line symbolic link
                               that points to a directory
      --hide=PATTERN         do not list implied entries matching shell PATTERN
                               (overridden by -a or -A)
      --hyperlink[=WHEN]     hyperlink file names; WHEN can be 'always'
                               (default if omitted), 'auto', or 'never'
      --indicator-style=WORD  append indicator with style WORD to entry names:
                               none (default), slash (-p),
                               file-type (--file-type), classify (-F)
  -i, --inode                print the index number of each file
  -I, --ignore=PATTERN       do not list implied entries matching shell PATTERN
  -k, --kibibytes            default to 1024-byte blocks for disk usage;
                               used only with -s and per directory totals
  -l                         use a long listing format
  -L, --dereference          when showing file information for a symbolic
                               link, show information for the file the link
                               references rather than for the link itself
  -m                         fill width with a comma separated list of entries
  -n, --numeric-uid-gid      like -l, but list numeric user and group IDs
  -N, --literal              print entry names without quoting
  -o                         like -l, but do not list group information
  -p, --indicator-style=slash
                             append / indicator to directories
  -q, --hide-control-chars   print ? instead of nongraphic characters
      --show-control-chars   show nongraphic characters as-is (the default,
                               unless program is 'ls' and output is a terminal)
  -Q, --quote-name           enclose entry names in double quotes
      --quoting-style=WORD   use quoting style WORD for entry names:
                               literal, locale, shell, shell-always,
                               shell-escape, shell-escape-always, c, escape
                               (overrides QUOTING_STYLE environment variable)
  -r, --reverse              reverse order while sorting
  -R, --recursive            list subdirectories recursively
  -s, --size                 print the allocated size of each file, in blocks
  -S                         sort by file size, largest first
      --sort=WORD            sort by WORD instead of name: none (-U), size (-S),
                               time (-t), version (-v), extension (-X)
      --time=WORD            change the default of using modification times;
                               access time (-u): atime, access, use;
                               change time (-c): ctime, status;
                               birth time: birth, creation;
                             with -l, WORD determines which time to show;
                             with --sort=time, sort by WORD (newest first)
      --time-style=TIME_STYLE  time/date format with -l; see TIME_STYLE below
  -t                         sort by time, newest first; see --time
  -T, --tabsize=COLS         assume tab stops at each COLS instead of 8
  -u                         with -lt: sort by, and show, access time;
                               with -l: show access time and sort by name;
                               otherwise: sort by access time, newest first
  -U                         do not sort; list entries in directory order
  -v                         natural sort of (version) numbers within text
  -w, --width=COLS           set output width to COLS.  0 means no limit
  -x                         list entries by lines instead of by columns
  -X                         sort alphabetically by entry extension
  -Z, --context              print any security context of each file
  -1                         list one file per line.  Avoid '\n' with -q or -b
      --help     display this help and exit
      --version  output version information and exit

The SIZE argument is an integer and optional unit (example: 10K is 10*1024).
Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000).
Binary prefixes can be used, too: KiB=K, MiB=M, and so on.

The TIME_STYLE argument can be full-iso, long-iso, iso, locale, or +FORMAT.
FORMAT is interpreted like in date(1).  If FORMAT is FORMAT1<newline>FORMAT2,
then FORMAT1 applies to non-recent files and FORMAT2 to recent files.
TIME_STYLE prefixed with 'posix-' takes effect only outside the POSIX locale.
Also the TIME_STYLE environment variable sets the default style to use.

Using color to distinguish file types is disabled both by default and
with --color=never.  With --color=auto, ls emits color codes only when
standard output is connected to a terminal.  The LS_COLORS environment
variable can change the settings.  Use the dircolors command to set it.

Exit status:
 0  if OK,
 1  if minor problems (e.g., cannot access subdirectory),
 2  if serious trouble (e.g., cannot access command-line argument).

GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Report any translation bugs to <https://translationproject.org/team/>
Full documentation <https://www.gnu.org/software/coreutils/ls>
or available locally via: info '(coreutils) ls invocation'
root@scale[~]# 
dak180 commented 1 year ago

@rbollar let me know how the latest version works for you.

rbollar commented 1 year ago

This version gives this error repeatedly:

(standard_in) 1: syntax error
(standard_in) 1: syntax error

ending with:

/mnt/scaletest/scripts/report.sh: line 2261: nvmecontrol: command not found

The report is populating, though I notice that capacity is missing from the NVMe and SSD drives:

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px 'Helvetica Neue'; min-height: 15.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px 'Helvetica Neue'; min-height: 15.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px 'Helvetica Neue'; min-height: 15.0px"><br></p>

NVMe SMART Status Report Summary |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |  
-- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | --
Device | Model | Serial Number | Capacity | SMART Status | Temp | Power-On Time (ymdh) | Power Cycle Count | Integrity Errors | Error Log Entries | Critical Warning | Wear Leveling Count | Total Bytes Written | Bytes Written (per Day) | Last Test Age (days) | Last Test Type |   |  
/dev/nvme0 | Samsung SSD 980 PRO 2TB | S6B0NS0T507131V | [ TB] | PASSED | 48°C | 0y 0m 24d 18h | 10 | 0 | 0 | 0 | 100 | 569.5TB | 23056.6GB | N/A | N/A |   |  

<br class="Apple-interchange-newline">

SSD SMART Status Report Summary |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |  
-- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | --
Device | Model | Serial Number | Capacity | SMART Status | Temp | Power-On Time (ymdh) | Power Cycle Count | Realloc Sectors | Program Fail Count | Erase Fail Count | Offline Uncorrectable Sectors | CRC Errors | Wear Leveling Count | Total Bytes Written | Bytes Written (per Day) | Last Test Age (days) | Last Test Type
/dev/sdas | Samsung SSD 860 EVO M.2 1TB | S415NS0R800422Z | [ TB] | PASSED | 45°C | 1y 2m 10d 3h | 80 | 0 | 0 | 0 | 0 | 0 | 52% | 694.4TB | 1593.0GB | 0 | Short offline
/dev/sdat | WDC WDS500G2B0A-00SM50 | 21312E800599 | [ GB] | PASSED | 42°C | 1y 2m 18d 0h | 85 | 0 | 0 | 0 | 0 | 0 | 100% | 33.2TB | 74.8GB | 0 | Short offline
/dev/sdau | WDC WDS500G2B0A-00SM50 | 21312E800572 | [ GB] | PASSED | 40°C | 1y 2m 17d 23h | 84 | 0 | 0 | 0 | 0 | 0 | 100% | 34.4TB | 77.5GB | 0 | Short offline
/dev/sdav | INTEL SSDSA2VP020G3 | CVHA2281009B020AGN | [ GB] | PASSED | N/A | 9y 11m 0d 14h | 455 | 32 | 0 | 0 | 0 | 167 | 1% | 249.6TB | 68.9GB | 900 | Vendor (0xb4)
/dev/sdr | WDC WDS200T2B0A-00SM50 | 21154M801009 | [ TB] | PASSED | 39°C | 1y 2m 17d 11h | 93 | 0 | 0 | 0 | 0 | 0 | 100% | 214.7TB | 484.4GB | 0 | Short offline
/dev/sds | WDC WDS200T2B0A-00SM50 | 21204W802666 | [ TB] | PASSED | 40°C | 1y 2m 17d 12h | 95 | 0 | 0 | 0 | 0 | 0 | 100% | 214.8TB | 484.5GB | 0 | Short offline
/dev/sdt | WDC WDS200T2B0A-00SM50 | 21154M802070 | [ TB] | PASSED | 41°C | 1y 2m 17d 12h | 95 | 0 | 0 | 0 | 0 | 0 | 100% | 214.7TB | 484.3GB | 0 | Short offline
/dev/sdu | WDC WDS100T2B0A-00SM50 | 21294T803952 | [ TB] | PASSED | 39°C | 1y 3m 14d 11h | 102 | 0 | 0 | 0 | 0 | 0 | 100% | 31.3TB | 66.4GB | 0 | Short offline
/dev/sdv | WDC WDS100T2B0A-00SM50 | 21294T804163 | [ TB] | PASSED | 36°C | 1y 3m 14d 7h | 101 | 0 | 0 | 0 | 0 | 0 | 100% | 31.2TB | 66.3GB | 0 | Short offline
/dev/sdw | WDC WDS100T2B0A-00SM50 | 21294T803948 | [ TB] | PASSED | 34°C | 1y 3m 14d 8h | 102 | 0 | 0 | 0 | 0 | 0 | 100% | 31.2TB | 66.3GB | 0 | Short offline

<br class="Apple-interchange-newline">

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px 'Helvetica Neue'; min-height: 15.0px"><br></p>

HDD SMART Status Report Summary |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |  
-- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | --
Device | Model | Serial Number | RPM | Capacity | SMART Status | Temp | Power-On Time (ymdh) | Start Stop Count | Spin Retry Count | Realloc Sectors | Realloc Events | Current Pending Sectors | Offline Uncorrectable Sectors | CRC Errors | Seek Error Health | Last Test Age (days) | Last Test Type
/dev/sda | TOSHIBA HDWN160 | 989VK0A1FAXG | 7200 | [ TB] | PASSED | 23°C | 4y 0m 1d 7h | 223 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdaa | WDC WUH721818ALE6L4 | 3WK3G8KJ | 7200 | [ TB] | PASSED | 27°C | 1y 4m 16d 10h | 130 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdab | WDC WUH721818ALE6L4 | 3WJV2YBK | 7200 | [ TB] | PASSED | 27°C | 1y 4m 16d 10h | 130 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdac | WDC WUH721818ALE6L4 | 3WK2YDLJ | 7200 | [ TB] | PASSED | 26°C | 1y 4m 16d 10h | 130 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdad | WDC WUH721818ALE6L4 | 3WJ3ZZDJ | 7200 | [ TB] | PASSED | 26°C | 1y 4m 16d 10h | 130 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdae | WDC WUH721818ALE6L4 | 3WJ6NXPJ | 7200 | [ TB] | PASSED | 26°C | 1y 4m 16d 10h | 130 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdaf | WDC WUH721818ALE6L4 | 3WJSW62L | 7200 | [ TB] | PASSED | 33°C | 1y 4m 15d 15h | 131 | 0 | 19 | 19 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdah | ST18000NM000J-2TV103 | ZR50GEJX | 7200 | [ TB] | PASSED | 38°C | 0y 11m 26d 20h | 39 | 0 | 0 | 0 | 0 | 0 | 0 | 88% | 0 | Short offline
/dev/sdai | WDC WUH721818ALE6L4 | 3RG8179A | 7200 | [ TB] | PASSED | 38°C | 1y 0m 13d 13h | 40 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdak | WDC WUH721818ALE6L4 | 3FG9MPDT | 7200 | [ TB] | PASSED | 37°C | 1y 0m 18d 4h | 40 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdan | WDC WD180EDGZ-11B2DA0 | 3RJ0SPNA | 7200 | [ TB] | PASSED | 41°C | 1y 0m 14d 9h | 44 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdao | WDC WUH721818ALE6L4 | 3GKBRG2G | 7200 | [ TB] | PASSED | 44°C | 1y 0m 13d 13h | 40 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdaw | ST20000NM007D-3DJ103 | ZVT3ZNS4 | 7200 | [ TB] | PASSED | 39°C | 0y 0m 0d 21h | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 68% | 0 | Short offline
/dev/sdax | ST20000NM007D-3DJ103 | ZVT3ZNTJ | 7200 | [ TB] | PASSED | 41°C | 0y 0m 0d 19h | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 63% | 0 | Short offline
/dev/sday | ST20000NM007D-3DJ103 | ZVT1YTL5 | 7200 | [ TB] | PASSED | 38°C | 0y 0m 0d 19h | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdb | TOSHIBA HDWN160 | 9893Y02UFAXG | 7200 | [ TB] | PASSED | 25°C | 4y 0m 1d 16h | 222 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdc | TOSHIBA HDWN160 | 485FK005FAXG | 7200 | [ TB] | PASSED | 36°C | 4y 0m 1d 15h | 225 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdd | TOSHIBA HDWN160 | 9892Y03FFAXG | 7200 | [ TB] | PASSED | 27°C | 4y 0m 2d 23h | 227 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sde | TOSHIBA HDWN160 | 989IK05WFAXG | 7200 | [ TB] | PASSED | 40°C | 4y 0m 3d 13h | 227 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdf | TOSHIBA HDWN160 | 285WK0AMFPAE | 7200 | [ TB] | PASSED | 38°C | 4y 0m 6d 9h | 233 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdg | ST18000NM000J-2TV103 | ZR5384YE | 7200 | [ TB] | PASSED | 39°C | 0y 11m 1d 5h | 38 | 0 | 0 | 0 | 0 | 0 | 0 | 88% | 0 | Short offline
/dev/sdh | WDC WUH721818ALE6L4 | 3FGAL3JT | 7200 | [ TB] | PASSED | 36°C | 1y 1m 0d 0h | 42 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdi | TOSHIBA HDWE160 | 277PK0X5F56D | 7200 | [ TB] | PASSED | 33°C | 5y 9m 7d 5h | 282 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdj | ST18000NM000J-2TV103 | ZR51EGM7 | 7200 | [ TB] | PASSED | 37°C | 0y 11m 26d 5h | 39 | 0 | 0 | 0 | 0 | 0 | 0 | 88% | 0 | Short offline
/dev/sdk | ST18000NM000J-2TV103 | ZR53847Y | 7200 | [ TB] | PASSED | 38°C | 0y 11m 1d 5h | 38 | 0 | 0 | 0 | 0 | 0 | 0 | 88% | 0 | Short offline
/dev/sdl | ST18000NM000J-2TV103 | ZR53844Q | 7200 | [ TB] | PASSED | 42°C | 0y 11m 1d 5h | 38 | 0 | 0 | 0 | 0 | 0 | 0 | 88% | 0 | Short offline
/dev/sdm | ST18000NM000J-2TV103 | ZR558RL4 | 7200 | [ TB] | PASSED | 44°C | 0y 11m 25d 23h | 41 | 0 | 0 | 0 | 0 | 0 | 0 | 88% | 0 | Short offline
/dev/sdn | HGST HDN726060ALE614 | K1HUN88D | 7200 | [ TB] | PASSED | 45°C | 5y 1m 2d 13h | 238 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdo | WDC WUH721818ALE6L4 | 3FHWUEBT | 7200 | [ TB] | PASSED | 37°C | 1y 0m 28d 15h | 40 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdp | ST18000NM000J-2TV103 | ZR54GJFB | 7200 | [ TB] | PASSED | 36°C | 0y 11m 25d 16h | 39 | 0 | 0 | 0 | 0 | 0 | 0 | 88% | 0 | Short offline
/dev/sdq | ST20000NM007D-3DJ103 | ZVT2ETRK | 7200 | [ TB] | PASSED | 36°C | 0y 0m 0d 3h | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | N/A | N/A
/dev/sdx | WDC WUH721818ALE6L4 | 3WJK128K | 7200 | [ TB] | PASSED | 27°C | 1y 4m 16d 11h | 132 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdy | WDC WUH721818ALE6L4 | 3WJ836MJ | 7200 | [ TB] | PASSED | 27°C | 1y 4m 16d 10h | 130 | 0 | 0 | 0 | 0 | 0 | 0 | 100% | 0 | Short offline
/dev/sdz | ST18000NM000J-2TV103 | ZR53ZBQX | 7200 | [ TB] | PASSED | 25°C | 0y 11m 27d 19h | 39 | 0 | 0 | 0 | 0 | 0 | 0 | 90% | 0 | Short offline

<br class="Apple-interchange-newline">
dak180 commented 1 year ago

@rbollar check to make sure that all your drives are listed and then attach the dump file made when running the script with the -d flag.

rbollar commented 1 year ago

The drives are all listed.

Still have these errors (one for each drive, I guess?):

(standard_in) 1: syntax error
(standard_in) 1: syntax error

Oops. Can't do a dump:

root@scale[~]# /mnt/scaletest/scripts/report.sh -d -c /mnt/scaletest/scripts/report.conf
md5 is missing, please install
dak180 commented 1 year ago

@rbollar is md5sum on the system?

rbollar commented 1 year ago

@rbollar is md5sum on the system?

Yes:

root@scale[~]# which md5sum
/usr/bin/md5sum
dak180 commented 1 year ago

@rbollar how about sha256?

rbollar commented 1 year ago

@rbollar how about sha256?

No.

root@scale[~]# which sha256 sha256 not found root@scale[~]#

dak180 commented 1 year ago

@rbollar is sha256sum there?

rbollar commented 1 year ago

sha256sum

Yes, we have that one:

root@scale[~]# which sha256sum
/usr/bin/sha256sum
root@scale[~]# 
dak180 commented 1 year ago

@rbollar try with the latest version.

rbollar commented 1 year ago

@rbollar try with the latest version.

No change for me. Number of

(standard_in) 1: syntax error
(standard_in) 1: syntax error

and the output doesn't have drive capacity.

dak180 commented 1 year ago

@rbollar does the -d make a dump file for you to attach now?

rbollar commented 1 year ago

@rbollar does the -d make a dump file for you to attach now?

Yes. dumpfiles.tgz

dak180 commented 1 year ago

@rbollar what is the output of bc <<< "scale=2; 2000398934016 / (1e12)" and bash --version?

rbollar commented 1 year ago

@rbollar what is the output of bc <<< "scale=2; 2000398934016 / (1e12)" and bash --version?


root@scale[~]# bc <<< "scale=2; 2000398934016 / (1e12)"
(standard_in) 1: syntax error
root@scale[~]# bash --version
GNU bash, version 5.1.4(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. root@scale[~]#

dak180 commented 1 year ago

@rbollar try echo "scale=2; 2000398934016 / (1e12)" | bc and bc --version

rbollar commented 1 year ago

@rbollar try echo "scale=2; 2000398934016 / (1e12)" | bc and bc --version

root@scale[~]# echo "scale=2; 2000398934016 / (1e12)" | bc
(standard_in) 1: syntax error
root@scale[~]# bc --version
bc 1.07.1
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Foundation, Inc.
root@scale[~]# 
dak180 commented 1 year ago

@rbollar bc is the wrong version: it should be at least 5.2.2 from https://git.yzena.com/gavin/bc

rbollar commented 1 year ago

Okay -- but this is the current version in the Debian bullseye distribution: https://packages.debian.org/bullseye/bc

Just noting this in the event that iX does add bc, it will only be 1.07.1

dak180 commented 1 year ago

I will have to remember to note that in the ticket to have them add bc to scale.

rbollar commented 1 year ago

It looks like Debian uses GNU bc: https://tracker.debian.org/pkg/bc -- even the Unstable train has just moved to bc 1.07.1-3 for testing.

I haven't found a .deb package for the Gavin Howard version -- and I don't know when I'll have the opportunity to compile and test his version. If you know of a .deb version, let me know and I'll pull it.

rbollar commented 1 year ago

I haven't looked at all of the instances where you've used bc, but GNU bc doesn't support scientific notation. This substitution works:

root@scale[~]# echo "scale=2; 2000398934016 / 0.000000000001" | bc
2000398934016000000000000.00
root@scale[~]# 
rbollar commented 1 year ago

Good news -- changing the four instances of 1e to 10^ allows the script to complete successfully. If this also works on CORE, IMO, this works better on the SCALE side. I can do a pull request, but it's likely easier to change on your side.

image
rbollar commented 1 year ago

Excellent & added to my crontab.

FYI, I turned on reporting and get the following errors. A configuration backup file is attached to the email, but I don't know if it's complete:

root@scale[~]# /mnt/scaletest/scripts/report.sh -c /mnt/scaletest/scripts/report.conf
md5sum: invalid option -- 'q'
Try 'md5sum --help' for more information.
sha256sum: invalid option -- 'q'
Try 'sha256sum --help' for more information.
Init SSL without certificate database
root@scale[~]# 
rbollar commented 1 year ago

Works great for me -- @dak180 thanks for doing the work to make this work on SCALE -- I've wanted this for a long time.

dak180 commented 1 year ago

@rbollar always easier when there is someone to test things; I just wish ix would go ahead and add bc to scale.

rbollar commented 1 year ago

A suggestion to document getting GNU bc installed on SCALE -- feel free to edit as you want:

This script requires the bc package to run on SCALE. GNU bc is available in the Debian Bullseye distribution and can be downloaded here: https://packages.debian.org/bullseye/bc - the current version is: 1.07.1-2 as of February 2023

EXAMPLE download and install from the TrueNAS SCALE command line as an administrator:

# wget http://http.us.debian.org/debian/pool/main/b/bc/bc_1.07.1-2+b2_amd64.deb
# dpkg -i bc_1.07.1-2+b2_amd64.deb
rbollar commented 1 year ago

Unfortunately, dpkg access has been removed from TrueNAS-SCALE-22.12.3. The workaround is now to uncompress the file using dpkg-deb and then copying bc to its directory.

# wget http://http.us.debian.org/debian/pool/main/b/bc/bc_1.07.1-2+b2_amd64.deb
# dpkg-deb -i bc_1.07.1-2+b2_amd64.deb
# cp bc/usr/bin/bc /usr/bin/
symetryczny commented 1 year ago

Unfortunately, dpkg access has been removed from TrueNAS-SCALE-22.12.3. The workaround is now to uncompress the file using dpkg-deb and then copying bc to its directory.

# wget http://http.us.debian.org/debian/pool/main/b/bc/bc_1.07.1-2+b2_amd64.deb
# dpkg-deb -i bc_1.07.1-2+b2_amd64.deb
# cp bc/usr/bin/bc /usr/bin/

@rbollar , dpkg-deb -i does not seem to be a valid command. Did you check that on your system?

root@truenas[~]# dpkg-deb -i
dpkg-deb: error: unknown option -i
rbollar commented 1 year ago

Unfortunately, dpkg access has been removed from TrueNAS-SCALE-22.12.3. The workaround is now to uncompress the file using dpkg-deb and then copying bc to its directory.

# wget http://http.us.debian.org/debian/pool/main/b/bc/bc_1.07.1-2+b2_amd64.deb
# dpkg-deb -i bc_1.07.1-2+b2_amd64.deb
# cp bc/usr/bin/bc /usr/bin/

@rbollar , dpkg-deb -i does not seem to be a valid command. Did you check that on your system?

root@truenas[~]# dpkg-deb -i
dpkg-deb: error: unknown option -i

Hm. @symetryczny try this:

dpkg-deb -x bc_1.07.1-2+b2_amd64.deb bc

ghubjules commented 9 months ago

TrueNAS Scale 23 (aka Cobia) is based on Debian 12 (bookworm)

I updated rbollar's code to install the Debian 12 version of bc:

# wget http://http.us.debian.org/debian/pool/main/b/bc/bc_1.07.1-3+b1_amd64.deb
# dpkg-deb -x bc_1.07.1-3+b1_amd64.deb bc
# cp bc/usr/bin/bc /usr/bin/
dak180 commented 9 months ago

{config file location}/usr/bin/ is likely a better place to put it since it would not be overwritten by updates

ghubjules commented 9 months ago

Yes, good point.

aserrallerios commented 3 months ago

It's not possible to write on /usr/bin or /usr/local/bin after Dragonfish upgrade.

cp: cannot create regular file '/usr/local/bin/bc': Read-only file system

Can you clarify this suggestion?

{config file location}/usr/bin/ is likely a better place to put it since it would not be overwritten by updates

Edit: I figured it out actually 😅 it's just to move the binary under /user/bin where the FreeNAS-Report.conf file is located.

JoeSchmuck commented 3 months ago

That is because it is a read only location. @dak180 should be able to fix it.

FDrebin commented 1 month ago

Thanks for this, this helped me get Scale and reporting working properly.