ansemjo / speedtest-plotter

running scheduled speedtests inside docker and plotting the results with gnuplot
MIT License
59 stars 12 forks source link

Graphs fail due to plotscript error #117

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hi,

After some time, the graphs will throw a HTTP 500 and the following entry will show up in the docker logs:

"plotscript" line 120: undefined variable: i

Full log:

* FILE:
  Records:           5
  Out of range:      0
  Invalid:           0
  Header records:    0
  Blank:             0
  Data Blocks:       1

* COLUMN:
  Mean:          3.03075e+09
  Std Dev:       5.22050e+08
  Sample StdDev: 5.83669e+08
  Skewness:           1.3634
  Kurtosis:           3.0707
  Avg Dev:       4.09878e+08
  Sum:           1.51538e+10
  Sum Sq.:       4.72899e+19

  Mean Err.:     2.33468e+08
  Std Dev Err.:  1.65087e+08
  Skewness Err.:      1.0954
  Kurtosis Err.:      2.1909

  Minimum:       2.64506e+09 [3]
  Maximum:       4.05545e+09 [4]
  Quartile:      2.68159e+09
  Median:        2.88485e+09
  Quartile:      2.88681e+09

"plotscript" line 120: undefined variable: i

xx.xx.xx.xx - - [13/Feb/2023 01:51:45] "GET /results.svg?limit=1d&order=desc&date=now HTTP/1.1" 500 -
ansemjo commented 1 year ago

Huh. That should only happen if you're seeing speeds in excess of 5 Gbit/s or have your MARKER_DOWNLOAD set to something bigger than 4166. I'm seeing a maximum speed of about 4 Gbit/s (Maximum: 4.05545e+09) in your log, so I'm guessing you set the marker ...

I guess I never expected anyone with more than a Gigabit to use this script. :P The fix should be easy, though ..

ansemjo commented 1 year ago

The first attempt was a little broken when used with an UPLOAD_SCALE, which I did not notice in my local testing: image

Commit 80a1233eb93ee56020a9769841da88469f937940 should fix that, though. Give it a moment to build a new image and re-pull.

ghost commented 1 year ago

Thank you so much for looking into it! I'll give it a test now. No markers were setduring my report.