seren / freenas-temperature-graphing

Scripts to graph FreeNAS CPU and drive temperatures
Other
77 stars 14 forks source link

ERROR: No DS called 'da0' @ FreeNAS 11.0-U3 #15

Closed DevByChrisX closed 7 years ago

DevByChrisX commented 7 years ago

Hello,

when I run the script manually: /mnt/nas-drive/nas-tools/freenas-temperature-graphing/rrd-graph.sh -v /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd

I got the following error: /mnt/nas-drive/nas-tools/freenas-temperature-graphing # /mnt/nas-drive/nas-tools/freenas-temperature-graphing/rrd-graph.sh -v /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd Rrdtool database filename: /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd Current working directory is: /mnt/nas-drive/nas-tools/freenas-temperature-graphing Current working directory is: /mnt/nas-drive/nas-tools/freenas-temperature-graphing drivedevs: ada0 drivedevs: ada0 ada1 drivedevs: ada0 ada1 ada2 drivedevs: ada0 ada1 ada2 ada3 drivedevs: ada0 ada1 ada2 ada3 ada4 drivedevs: ada0 ada1 ada2 ada3 ada4 da0 numcpus: 4 Interval minutes: 5 Graph timespan seconds: 432000 Output a combined graph of all cpus cpu: 0 cpu: 1 cpu: 2 cpu: 3 Definitions and lines: DEF:cpu0=/mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd:cpu0:MAX LINE1:cpu0#000000:cpu0 DEF:cpu1=/mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd:cpu1:MAX LINE1:cpu1#00FF00:cpu1 DEF:cpu2=/mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd:cpu2:MAX LINE1:cpu2#0000FF:cpu2 DEF:cpu3=/mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd:cpu3:MAX LINE1:cpu3#FF0000:cpu3 Output a combined graph of all drives drive device: ada0 drive device: ada1 drive device: ada2 drive device: ada3 drive device: ada4 drive device: da0 Definitions and lines: DEF:ada0=/mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd:ada0:MAX LINE1:ada0#000000:ada0 DEF:ada1=/mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd:ada1:MAX LINE1:ada1#00FF00:ada1 DEF:ada2=/mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd:ada2:MAX LINE1:ada2#0000FF:ada2 DEF:ada3=/mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd:ada3:MAX LINE1:ada3#FF0000:ada3 DEF:ada4=/mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd:ada4:MAX LINE1:ada4#01FFFE:ada4 DEF:da0=/mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd:da0:MAX LINE1:da0#FFA6FE:da0 ERROR: No DS called 'da0' in '/mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd'

Has someone an idea to fix this?

seren commented 7 years ago

That error indicates that it's trying to graph info for a device (da0) that the script hasn't been recording data for.

Could you download the latest version (I just pushed an update) and then these commands and paste the results here in triple-back-ticks (so it's readable), or in a gist/pastebin: rrdtool info mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd and /mnt/nas-drive/nas-tools/freenas-temperature-graphing/rrd.sh /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd -d

Thanks.

DevByChrisX commented 7 years ago

Hello seren,

thx for your reply I updated your script attached you will find the debug response. I didn't get the error msg form the previous post anymore but the output images don't contain any temp values and devices


+ verbose=1
+ '[' -n '' ']'
+ '[' -n 1 ']'
+ echo 'Script version: 1.0'
Script version: 1.0
+ case "${PLATFORM}" in
+ args=
++ id -u
+ '[' 0 '!=' 0 ']'
+ '[' -z /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd ']'
+ '[' -n 1 ']'
+ echo 'Rrdtool database filename: /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd'
Rrdtool database filename: /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd
+++ dirname /mnt/nas-drive/nas-tools/freenas-temperature-graphing/rrd.sh
++ cd /mnt/nas-drive/nas-tools/freenas-temperature-graphing
++ pwd
+ CWD=/mnt/nas-drive/nas-tools/freenas-temperature-graphing
+ '[' -n 1 ']'
+ echo 'Current working directory is: /mnt/nas-drive/nas-tools/freenas-temperature-graphing'
Current working directory is: /mnt/nas-drive/nas-tools/freenas-temperature-graphing
+ . /mnt/nas-drive/nas-tools/freenas-temperature-graphing/rrd-lib.sh
++ RRDSCRIPTLIBVERSION=1.0
+++ mktemp
++ GETTEMP=/tmp/tmp.eapmC0aS
++ cat
++ trap '{ rm /tmp/tmp.eapmC0aS; }' EXIT
+ '[' -e /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd ']'
+ func_test_writable /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd
+ '[' -e /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd ']'
+ '[' -e /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd ']'
+ '[' -f /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd ']'
+ touch /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd
+ return 0
+ '[' -n 1 ']'
+ echo 'Running script: '\''/mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-rrd-format.sh -v '\'''
Running script: '/mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-rrd-format.sh -v '
+ '[' -n 1 ']'
+ echo ''

+ '[' -n 1 ']'
+ echo ''

+ '[' -n 1 ']'
+ /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-rrd-format.sh
31:32:32:32:28:29:0:28:28:37
+ '[' -n 1 ']'
+ echo ''

+ '[' -n 1 ']'
+ echo ''

+ '[' -n 1 ']'
+ echo '(running script again non-verbosely)'
(running script again non-verbosely)
++ /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-rrd-format.sh
+ data=32:32:33:32:28:29:0:28:28:37
+ '[' -n 1 ']'
+ echo 'Data: 32:32:33:32:28:29:0:28:28:37'
Data: 32:32:33:32:28:29:0:28:28:37
+ '[' -n 1 ']'
+ echo ''

+ '[' -n 1 ']'
+ echo 'Updating the db: '\''/usr/local/bin/rrdtool update /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd N:32:32:33:32:28:29:0:28:28:37'\'''
Updating the db: '/usr/local/bin/rrdtool update /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd N:32:32:33:32:28:29:0:28:28:37'
+ /usr/local/bin/rrdtool update /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd N:32:32:33:32:28:29:0:28:28:37
+ '[' 0 == 0 ']'
+ '[' -n 1 ']'
+ echo 'Added data'
Added data
+ exit 0
+ rm /tmp/tmp.eapmC0aS```

```/mnt/nas-drive/nas-tools/freenas-temperature-graphing # /mnt/nas-drive/nas-tools/freenas-temperature-graphing/rrd.sh /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd -d
+ verbose=1
+ '[' -n '' ']'
+ '[' -n 1 ']'
+ echo 'Script version: 1.0'
Script version: 1.0
+ case "${PLATFORM}" in
+ args=
++ id -u
+ '[' 0 '!=' 0 ']'
+ '[' -z /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd ']'
+ '[' -n 1 ']'
+ echo 'Rrdtool database filename: /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd'
Rrdtool database filename: /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd
+++ dirname /mnt/nas-drive/nas-tools/freenas-temperature-graphing/rrd.sh
++ cd /mnt/nas-drive/nas-tools/freenas-temperature-graphing
++ pwd
+ CWD=/mnt/nas-drive/nas-tools/freenas-temperature-graphing
+ '[' -n 1 ']'
+ echo 'Current working directory is: /mnt/nas-drive/nas-tools/freenas-temperature-graphing'
Current working directory is: /mnt/nas-drive/nas-tools/freenas-temperature-graphing
+ . /mnt/nas-drive/nas-tools/freenas-temperature-graphing/rrd-lib.sh
++ RRDSCRIPTLIBVERSION=1.0
+++ mktemp
++ GETTEMP=/tmp/tmp.aTmu4uiN
++ cat
++ trap '{ rm /tmp/tmp.aTmu4uiN; }' EXIT
+ '[' -e /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd ']'
+ func_test_writable /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd
+ '[' -e /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd ']'
+ '[' -e /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd ']'
+ '[' -f /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd ']'
+ touch /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd
+ return 0
+ '[' -n 1 ']'
+ echo 'Running script: '\''/mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-rrd-format.sh -v '\'''
Running script: '/mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-rrd-format.sh -v '
+ '[' -n 1 ']'
+ echo ''

+ '[' -n 1 ']'
+ echo ''

+ '[' -n 1 ']'
+ /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-rrd-format.sh
31:31:31:31:28:29:0:28:28:37
+ '[' -n 1 ']'
+ echo ''

+ '[' -n 1 ']'
+ echo ''

+ '[' -n 1 ']'
+ echo '(running script again non-verbosely)'
(running script again non-verbosely)
++ /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-rrd-format.sh
+ data=31:32:33:33:28:29:0:28:28:37
+ '[' -n 1 ']'
+ echo 'Data: 31:32:33:33:28:29:0:28:28:37'
Data: 31:32:33:33:28:29:0:28:28:37
+ '[' -n 1 ']'
+ echo ''

+ '[' -n 1 ']'
+ echo 'Updating the db: '\''/usr/local/bin/rrdtool update /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd N:31:32:33:33:28:29:0:28:28:37'\'''
Updating the db: '/usr/local/bin/rrdtool update /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd N:31:32:33:33:28:29:0:28:28:37'
+ /usr/local/bin/rrdtool update /mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd N:31:32:33:33:28:29:0:28:28:37
+ '[' 0 == 0 ']'
+ '[' -n 1 ']'
+ echo 'Added data'
Added data
+ exit 0
+ rm /tmp/tmp.aTmu4uiN```
seren commented 7 years ago

Can you also post the output of rrdtool info mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd?

DevByChrisX commented 7 years ago

filename = "mnt/nas-drive/nas-tools/freenas-temperature-graphing/temps-5min.rrd"
rrd_version = "0003"
step = 300
last_update = 1505886300
header_size = 3392
ds[cpu0].index = 0
ds[cpu0].type = "GAUGE"
ds[cpu0].minimal_heartbeat = 600
ds[cpu0].min = 0.0000000000e+00
ds[cpu0].max = 1.5000000000e+02
ds[cpu0].last_ds = "31"
ds[cpu0].value = 3.0180205000e+01
ds[cpu0].unknown_sec = 0
ds[cpu1].index = 1
ds[cpu1].type = "GAUGE"
ds[cpu1].minimal_heartbeat = 600
ds[cpu1].min = 0.0000000000e+00
ds[cpu1].max = 1.5000000000e+02
ds[cpu1].last_ds = "31"
ds[cpu1].value = 3.0180205000e+01
ds[cpu1].unknown_sec = 0
ds[cpu2].index = 2
ds[cpu2].type = "GAUGE"
ds[cpu2].minimal_heartbeat = 600
ds[cpu2].min = 0.0000000000e+00
ds[cpu2].max = 1.5000000000e+02
ds[cpu2].last_ds = "35"
ds[cpu2].value = 3.4074425000e+01
ds[cpu2].unknown_sec = 0
ds[cpu3].index = 3
ds[cpu3].type = "GAUGE"
ds[cpu3].minimal_heartbeat = 600
ds[cpu3].min = 0.0000000000e+00
ds[cpu3].max = 1.5000000000e+02
ds[cpu3].last_ds = "36"
ds[cpu3].value = 3.5047980000e+01
ds[cpu3].unknown_sec = 0
ds[ada0].index = 4
ds[ada0].type = "GAUGE"
ds[ada0].minimal_heartbeat = 600
ds[ada0].min = 0.0000000000e+00
ds[ada0].max = 1.0000000000e+02
ds[ada0].last_ds = "28"
ds[ada0].value = 2.7259540000e+01
ds[ada0].unknown_sec = 0
ds[ada1].index = 5
ds[ada1].type = "GAUGE"
ds[ada1].minimal_heartbeat = 600
ds[ada1].min = 0.0000000000e+00
ds[ada1].max = 1.0000000000e+02
ds[ada1].last_ds = "29"
ds[ada1].value = 2.8233095000e+01
ds[ada1].unknown_sec = 0
ds[ada2].index = 6
ds[ada2].type = "GAUGE"
ds[ada2].minimal_heartbeat = 600
ds[ada2].min = 0.0000000000e+00
ds[ada2].max = 1.0000000000e+02
ds[ada2].last_ds = "0"
ds[ada2].value = 0.0000000000e+00
ds[ada2].unknown_sec = 0
ds[ada3].index = 7
ds[ada3].type = "GAUGE"
ds[ada3].minimal_heartbeat = 600
ds[ada3].min = 0.0000000000e+00
ds[ada3].max = 1.0000000000e+02
ds[ada3].last_ds = "28"
ds[ada3].value = 2.7259540000e+01
ds[ada3].unknown_sec = 0
ds[ada4].index = 8
ds[ada4].type = "GAUGE"
ds[ada4].minimal_heartbeat = 600
ds[ada4].min = 0.0000000000e+00
ds[ada4].max = 1.0000000000e+02
ds[ada4].last_ds = "28"
ds[ada4].value = 2.7259540000e+01
ds[ada4].unknown_sec = 0
ds[da0].index = 9
ds[da0].type = "GAUGE"
ds[da0].minimal_heartbeat = 600
ds[da0].min = 0.0000000000e+00
ds[da0].max = 1.0000000000e+02
ds[da0].last_ds = "37"
ds[da0].value = 3.6021535000e+01
ds[da0].unknown_sec = 0
rra[0].cf = "MAX"
rra[0].rows = 3000
rra[0].cur_row = 1942
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[0].cdp_prep[1].value = NaN
rra[0].cdp_prep[1].unknown_datapoints = 0
rra[0].cdp_prep[2].value = NaN
rra[0].cdp_prep[2].unknown_datapoints = 0
rra[0].cdp_prep[3].value = NaN
rra[0].cdp_prep[3].unknown_datapoints = 0
rra[0].cdp_prep[4].value = NaN
rra[0].cdp_prep[4].unknown_datapoints = 0
rra[0].cdp_prep[5].value = NaN
rra[0].cdp_prep[5].unknown_datapoints = 0
rra[0].cdp_prep[6].value = NaN
rra[0].cdp_prep[6].unknown_datapoints = 0
rra[0].cdp_prep[7].value = NaN
rra[0].cdp_prep[7].unknown_datapoints = 0
rra[0].cdp_prep[8].value = NaN
rra[0].cdp_prep[8].unknown_datapoints = 0
rra[0].cdp_prep[9].value = NaN
rra[0].cdp_prep[9].unknown_datapoints = 0```
seren commented 7 years ago

Thanks. Btw, if you put triple back-ticks (```) before and after your code, it will format it nicely. See the code section of https://guides.github.com/features/mastering-markdown/#examples

This is much easier than putting single back-ticks at the start and end of each line.

DevByChrisX commented 7 years ago

Thx, and also merci for the triple back-ticks link, this was new for me.

seren commented 7 years ago

No prob. Hmm, interesting: the temps-5min.rrd file has a da0 section in it, so it should be working (it sounds like it is now since the error has stopped).

Not sure why your graphs are empty, but it's possible that data wasn't properly recorded before, and now it is but the graphs are failing. I would try deleting the .rrd file and letting it get recreated to see if things start working. If after 10-15 data recordings (so about an hour at 5 minute intervals) there's still nothing being produced by rrd-graph.sh, try running it manually with the -d flag and I'll take a look (though if there's no error it's a bit weird).

DevByChrisX commented 7 years ago

Hi seren, great work !!! I have now some nice graphs available ;-)