Joined: 15 Nov 2006 Posts: 11 Location: Hungary , Debrecen
Posted: Sun Feb 23, 2020 7:41 Post subject: create cron schedule for speedtest_cli
Hi all,
I have tried all the variations which came into my mind, without success.
Having problems with internet speed, I would like to create a log for the provider to see where is the issue.
Firmware: DD-WRT v3.0-r42460 std (02/20/20)
ASUS AC66 with AC68 firmware as addiced on wikipage.
Intension is to have a log with speeds every hour:
tried this on Administration»Management»cron - without success.
It is working good from th command shell.
Any idea how to format the ddwrt speedtest_cli to one line output? _________________ Linksys WRT54GL v1.1 dd-wrt v24 RC6.2 + SD Mod
Asus RT-N16 dd-wrt.v24-13972_NEWD-2_K2.6_big+ 2,5" 250Gb transmissin, no samba?
Joined: 15 Nov 2006 Posts: 11 Location: Hungary , Debrecen
Posted: Fri Feb 28, 2020 17:34 Post subject:
No,
however I have sold it in different way...
not a good one, but a working solution.
1. script on my system with sshpass
2. the script from my server will connect to remote and start the speedtest_cli
thats it for now,
awaiting for a good ddwrt-cron solution/hint _________________ Linksys WRT54GL v1.1 dd-wrt v24 RC6.2 + SD Mod
Asus RT-N16 dd-wrt.v24-13972_NEWD-2_K2.6_big+ 2,5" 250Gb transmissin, no samba?
Joined: 15 Nov 2006 Posts: 11 Location: Hungary , Debrecen
Posted: Fri Feb 28, 2020 21:02 Post subject:
I dont really see the point of script.
The command is working by itself, should work in cron as well...but it is not ! _________________ Linksys WRT54GL v1.1 dd-wrt v24 RC6.2 + SD Mod
Asus RT-N16 dd-wrt.v24-13972_NEWD-2_K2.6_big+ 2,5" 250Gb transmissin, no samba?
Joined: 08 May 2018 Posts: 14223 Location: Texas, USA
Posted: Fri Feb 28, 2020 21:27 Post subject:
Then you are not following proper formatting in the additional cron jobs config on the page OR, that is an outdated version of the cli. I don't see how it is working with those command line parameters (it won't work for me here). I do know it requires python, and your router may not have python installed... _________________ "Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT Pogo - A minimal level of ability is expected and needed... DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)
----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Joined: 15 Nov 2006 Posts: 11 Location: Hungary , Debrecen
Posted: Fri Feb 28, 2020 21:44 Post subject:
I am not sure i understand the python connection here...
in the ddwrt command the following line is working properly:
speedtest_cli -d 1 3 1 2 >/tmp/mnt/sda/speedtest2_`date +%Y-%m-%d_%H.%M`.txt
hence the cron version should work also:
0 * * * * root speedtest_cli -d 1 3 1 2 >/tmp/mnt/sda/speedtest2_`date +%Y-%m-%d_%H.%M`.txt
..but it is not scheduled and does nothing, should run the command every hour. _________________ Linksys WRT54GL v1.1 dd-wrt v24 RC6.2 + SD Mod
Asus RT-N16 dd-wrt.v24-13972_NEWD-2_K2.6_big+ 2,5" 250Gb transmissin, no samba?
Joined: 08 May 2018 Posts: 14223 Location: Texas, USA
Posted: Fri Feb 28, 2020 22:01 Post subject:
speedtest-cli / speedtest_cli requires python to work or be installed, normally. The version I have is speedtest-cli from the most recent git. I don't know which version you're using. So, you may have to do some workaround or something. I don't know what will apply in this wiki: https://wiki.dd-wrt.com/wiki/index.php/CRON
How are you entering this as far as the cron job? Or rather, WHERE? This might help me help you figure this out.
mac913 wrote:
Only /tmp/cron.d/cron_jobs shows my cron jobs from the GUI. "/tmp/crontab" is an empty file.
Joined: 08 May 2018 Posts: 14223 Location: Texas, USA
Posted: Sat Feb 29, 2020 1:30 Post subject:
I'm actually shocked it worked in the web command shell. But, I am wondering if that build is before certain fixes were applied. https://svn.dd-wrt.com/ticket/2621
Joined: 15 Nov 2006 Posts: 11 Location: Hungary , Debrecen
Posted: Sat Feb 29, 2020 6:35 Post subject:
it seems i was already asleap yesterday...
attachments fixed.
The command part working as expected, the export created. ( shouldnt be? )
the cron part does nothing, however if i check the cron_jobs, I see the line has been added to it.
I went trough the cron wiki, but it seems without success to implement it my need.
I do not need a script as per examples, it should work as a simple line. it is just a speedtest command with a pipe for output-not a rocket science and multiple cmds. _________________ Linksys WRT54GL v1.1 dd-wrt v24 RC6.2 + SD Mod
Asus RT-N16 dd-wrt.v24-13972_NEWD-2_K2.6_big+ 2,5" 250Gb transmissin, no samba?
Joined: 15 Nov 2006 Posts: 11 Location: Hungary , Debrecen
Posted: Sat Feb 29, 2020 20:37 Post subject:
ok, I will try.
thanks for the hint. _________________ Linksys WRT54GL v1.1 dd-wrt v24 RC6.2 + SD Mod
Asus RT-N16 dd-wrt.v24-13972_NEWD-2_K2.6_big+ 2,5" 250Gb transmissin, no samba?
Putting the space between the > and / might fix your issue.
You may also wish to update to the latest release (42557 at the time of this post).
I don't use remarks in cron jobs and I have no issues. I recall in the past that remarks in dnsmasq GUI would cause dnsmasq issues too.
I ONLY found that remarks can be added to GUI Command Startup, Shutdown, Firewall and to any custom scripts (sh files) stored on the router without any problems. _________________ Home Network on Telus 1Gb PureFibre - 10GbE Copper Backbone
2x R7800 - Gateway & WiFi & 3xWireGuard - DDWRT r53562 Std k4.9
Off Site 1
R7000 - Gateway & WiFi & WireGuard - DDWRT r54517 Std
E3000 - Station Bridge - DDWRT r49626 Mega K4.4
Off Site 2
R7000 - Gateway & WiFi - DDWRT r54517 Std
E2000 - Wired ISP IPTV PVR Blocker - DDWRT r35531