My Goal is : create script to get speedtest result with available package, after i can get my download & upload speed. after i can get it, i can process the result same as my autoSQM script
You can use iPerf3 to measure speed through your router. However, you probably won't get very good results when you test on the router itself -- the SoCs in most consumer routers are not powerful enough to be able to process packets (as an endpoint) at line rate... they are designed to route packets rapidly, but they cannot generate or terminate them fast enough to provide useful data.
That being said, you are not running an official build of OpenWrt, so I don't know if the iperf3 package is available for your build. You can either switch over to an official build, or request help from the AndyX community.
iperf3 is not available
i already post my packages list above
i was thinking to use scp to test download test.but i need use method to measure average speed when doing scp use packages above.
i have no idea To do it
if you have the opkg package manager, you may be able to install it.
I will repeat that you need to keep in mind that you are not going to get meaningful speed test results when running on the router itself, unless your connection speed is indeed relatively slow.
Finally, you should direct further questions to the appropriate forum (not here) since you are not using an official OpenWrt release. Or change to OpenWrt official.
Conceptually simple, use wget to download a file of known size from a known site and just measure the time this takes. Slightly trickier for upload, as only few sites will accept anonymous file uploads, and wget does not handle uploads at all. FTP might work. But I concurr with @psherman many router's do not have the oomph to perform Speedtest termination in addition to their normal duty.
Also, I thought this was already a buildable package. My buildbox is in pieces at the moment, but I am almost sure it's there.. do a search (/) in menuconfig for speedtest
If you have python already installed, just get the .py file directly
If you don't have python installed on that router, and you can't add packages, there really isn't much left you're going to be able to do for quantifiable data.
if i can findout how to get the data from ssh, i can use the data from specific tim while doing wget to measure average speed and use it as value for my auto SQM script
Ah, see, that is a different question than you asked! Those values are available on luCi, so they have to be somewhere on-device. The real question you need to ask is, WHERE are those values kept.
Someone will be able to help with that, I'm not sure where it would be. Check your /tmp directory, as most of the sensor and luci data is stored there since it doesn't need to be saved anyway.
actually if someone give other method with current packages to measure realtime traffic is okay
that just sample, and i still cant find out how to get realtime traffic from terminal haha
Check out /www/luci-static/resources/view/status/bandwidth.js, as that is the page luci is using, it seems. Maybe it'll give you an idea how it pulls it, and if you might be able to parse it.
after wget finish i want to kill test.sh (contain ur script) to stop the measure, but my script above cant kill the test.sh process
alreayd try use killall, but always got output killall: test.sh: no process killed
i already add ur script to write the result in file