LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Puppy (http://www.linuxquestions.org/questions/puppy-71/)
-   -   Download speed script (http://www.linuxquestions.org/questions/puppy-71/download-speed-script-4175499223/)

Fixit7 03-23-2014 08:43 PM

Download speed script
 
I am trying to come up with a ballpark figure for my download speed.

But the results are not showing up in the text file.

Thanks.

# Download_Speed.sh
#
cd Documents
lftp -e 'pget http://www.readyhoustontx.gov/videos...%20Heroes.mp4; exit; ' >> Download_Speed.txt
rm Ready Heroes.mp4

frankbell 03-23-2014 09:37 PM

Try http://www.speedtest.net/

Fixit7 03-23-2014 11:05 PM

I have used them before.

Trouble with it is that it is dependent on where the servers are, traffic, etc.

Using a script, I can find a server close to me for more accurate results.

Andy

kirukan 03-24-2014 12:15 AM

Mostly the ISP's they might have local and overseas Speedtest servers(Ookla quite popular) so can select different servers from their speedtest meter

Karl Godt 04-30-2014 01:08 PM

the data rx_bytes for down and tx_bytes for up load are in

/sys/devices/virtual/net/$ACTIVE_INTERFACE/statistics/

directory .

ACTIVE_INTERFACE for me is ppp0 , for others it might be wlan0 or eth0 .


While sending bigger files over the internet, it is possible to determine the speed as follows :

Code:

ACTIVE_INTERFACE=ppp0

read RX_OLD </sys/devices/virtual/net/$ACTIVE_INTERFACE/statistics/rx_bytes
read TX_OLD </sys/devices/virtual/net/$ACTIVE_INTERFACE/statistics/tx_bytes

while [ running ]; do

sleep 0.98s

read RX </sys/devices/virtual/net/$ACTIVE_INTERFACE/statistics/rx_bytes
read TX </sys/devices/virtual/net/$ACTIVE_INTERFACE/statistics/tx_bytes

SPEED_DOWN=$((((RX-RX_OLD)*8)/1000))
SPEED_UP=$((((TX-TX_OLD)*8)/1000))

#echoPARAM='-en "\r"'
echo ${echoPARAM}"Upload speed is $SPEED_UP kbit / s - Download speed is $SPEED_DOWN kbit / s"

RX_OLD=$RX
TX_OLD=$TX

done


Fixit7 04-30-2014 09:43 PM

Is it some type of script ?

I am familiar with bash scripts.

Andy

Sandra Rowe 05-22-2014 05:21 AM

There are many internet speed test apps like okla, speedtestfree form you can check your internet speed with efficient way so try that you surely you got the solution of your problem. Thanks

Fixit7 05-23-2014 04:23 PM

This works pretty well.

Andy

Quote:

# Download_Speed.sh Use a server as close as possible
#
cd Documents
wget -o Download_Info.txt http://www.readyhoustontx.gov/videos/Ready%20Heroes.mp4
rm Ready Heroes.mp4

John VV 05-23-2014 06:35 PM

i have been using this one it works rather well
https://github.com/sivel/speedtest-cli

you might want to check out this blog post
http://www.unixmen.com/check-interne...speedtest-cli/

Fixit7 05-23-2014 08:00 PM

Nothing happened when I ran speedtest-cli.

Andy

John VV 05-23-2014 08:10 PM

did you read the instructions
it is a python script
is it executable ?

Code:

wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py

chmod +x speedtest-cli

then
Code:

XXXXXXXXXXXX~/test> ./speedtest-cli
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from WideOpenWest (??.??.??.??)...
Selecting best server based on ping...
Hosted by Amplex (Toledo, OH) [72.88 km]: 18.04 ms
Testing download speed........................................
Download: 15.17 Mbits/s
Testing upload speed..................................................
Upload: 1.09 Mbits/s
XXXXXXXXXXXX:~/test>


Fixit7 05-23-2014 10:10 PM

bash: ./speedtest-cli: Permission denied

I am running as root.

ndc85430 05-24-2014 02:53 PM

Quote:

Originally Posted by Fixit7 (Post 5176142)
bash: ./speedtest-cli: Permission denied

I am running as root.

Running the script as root is probably unnecessary. However what is necessary is that it has executable permissions. If you don't know about permissions in Linux, you can read this, for example.


All times are GMT -5. The time now is 03:44 PM.