opn-repo icon indicating copy to clipboard operation
opn-repo copied to clipboard

Speedtest not running via cron

Open GioPan04 opened this issue 1 year ago • 7 comments
trafficstars

Hi, I setup a cron job via the web gui to run a speedtest every hour, but reading the logs it looks like it doesn't ever run. The cron service is up and running and other cron jobs seems running fine. What the problem could be?

Here is the configuration of the cron job: image

I tried to find some logs from cron or from the tool, but I didn't find anything relevant.

GioPan04 avatar Apr 26 '24 18:04 GioPan04

Same issue here.

Although I noticed I also get this error when trying to run manually: "speedtest server id XXXX not recognized". But it sometimes work, sometimes not, it's strange.

The list of available servers also changes each time I reload the page...

Qhilm avatar May 05 '24 19:05 Qhilm

@mihakralj any idea?

mimugmail avatar May 06 '24 03:05 mimugmail

Although I noticed I also get this error when trying to run manually: "speedtest server id XXXX not recognized". But it sometimes work, sometimes not, it's strange.

I never encountered this issue, but I can see that some servers differs every time, so it could be totally possible that you are having this problem.

GioPan04 avatar May 06 '24 09:05 GioPan04

It suddenly started working yesterday for me, I have no explanation. I think I changed the cron schedule from daily to hourly, that's it.

I still get the "speedtest server id XXXX not recognized" error with multiple servers, when I trigger it manually.

Qhilm avatar May 06 '24 10:05 Qhilm

list of speedtest servers is pulled straight out from speedtest CLI. Which one do you use - the Python one or Ookla binary? My suspicion is that the Python version of Speedtest is becoming more and more obsolete.

mihakralj avatar May 06 '24 13:05 mihakralj

Speedtest forgot server id after a year of permanent use..offered me locations from some different country. So ran both "speedtest" and "speedtest-cli" manually, and none of the IDs i used are recognized: list1 list2 after a day, it loaded servers from the correct city, with new IDs, so i took whatever was there speedtest-cli --list update: forgot that there's a secret switch "Socket" when help menu is pressed. Then the IDs work.

gitthangbaby avatar Jul 30 '24 22:07 gitthangbaby

try changing the file permissions on the csv file as follows

cd /usr/local/opnsense/scripts/OPNsense/speedtest/ ; chmod 755 speedtest.csv OR try chmod 666 speedtest.csv

and now trying the cronjob or watch the System > Log files > Backend for succesful or failure of cronjob

if the job runs successfully

look at Reports > Speedtest --> Enable showlogs

you should see your speedtest results based on cronjob schedule

PS: i was able to fix this with the 666 as the perms on the csv file

paragm avatar Oct 01 '24 07:10 paragm