Getting upload and download speeds with the help of script?How?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Getting upload and download speeds with the help of script?How?
# 1  
Old 03-05-2010
Getting upload and download speeds with the help of script?How?

How can I get the upload and download speed of my pc, provided that my interface is wlan0?
I have though something like:
Code:
#!/bin/sh
ups=something
downs=somethingelse
echo "
         Your current up speed is $ups
     Your current down speed is $downs

, but I have no idea how to get them?Are they written to a file for a second or something or what? Thx for the help! I am quite good in scripting and not a beginner so don't be too descriptive! Smilie
# 2  
Old 03-05-2010
The only way to test your upload/download speed is to download/upload something from somewhere thats pretty close to you and has enough bandwith to never bee the bottleneck for you, so you're sure to minimize any thing that might scew the result.
# 3  
Old 03-05-2010
Conky - Conky - Home - has variables for upload/download for interfaces that can show you this on your desktop.
# 4  
Old 03-06-2010
Well actually, I want to make a script which will say me :Your current up speed is blabla and your current down speed is blabla"
I have desklets which can do this but I want to do this with the help of script!Smilie

---------- Post updated 03-06-10 at 02:41 AM ---------- Previous update was 03-05-10 at 07:21 PM ----------

Conky doesn't suits me really. I need a script...Is it that hard?

---------- Post updated at 06:32 PM ---------- Previous update was at 02:41 AM ----------

So, how can an aplication take the upload and download speed?
# 5  
Old 03-06-2010
hmm...

create a 1mb dummy file... upload it somewhere, then retrieve it. while uploading and retrieve use the time command to give you an idea of how long it took then do some math to figure out your speeds.

dd if=/dev/zero of=~/1mb.txt bs=1024 count=1024

then whatever command your using to push it somewhere... put time in front of it. then take the output and do some calculations.

I suck at math or I would probably write it up for you.
# 6  
Old 03-07-2010
Hmmmm.That's a good idea, but very difficult to take instant up and down speed, too many calculations, but I'll try it out. (I don't think so that programs that take upload and download speed work like that although)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Retrieve/download SSH key instead of Send/Upload?

Hi, is it possible to download/retrieve a public SSH key when you are logged in to the remote machine rather than sending the key, for example with ssh-copy-id from your local machine to the remote machine? I can only ssh into one direction (from the remote machine into the local machine),... (5 Replies)
Discussion started by: gczychi
5 Replies

2. UNIX for Dummies Questions & Answers

VM v Physical Server Speeds

HI We have been asked by our IT department to move from our current physical solution to a VM environment. I am not that clued up on VM. I looked from some benchmark tests to run so i can see a comparison between our live and new VM we have been presented. Please see below for results. To me the... (3 Replies)
Discussion started by: treds
3 Replies

3. Solaris

Solaris 10 - A User Can Download File but Cannot Upload

Dear all, I have made a search on the forum, but couldn't find a related topic about this issue. * I have created a user on Solaris 10 OS with below command and then set password for the user. * Now i can FTP to OS with this user (hattesti). Although i can download files under related... (0 Replies)
Discussion started by: byrusber
0 Replies

4. Shell Programming and Scripting

Expect Script for SFTP Upload

I am attempting to utilize an expect script (that is called from a parent bash script) to perform a file transfer over sftp. The script works except I cannot catch timeouts. I need to be able to tell in the parent bash script when the expect script has timed out, or completed successfully. It... (3 Replies)
Discussion started by: thaller
3 Replies

5. Shell Programming and Scripting

upload logo on script

any ideas on how to upload logo on a script?(solaris script) (3 Replies)
Discussion started by: lhareigh890
3 Replies

6. Shell Programming and Scripting

Shell Script for Upload/download files using cURL

hi please help me out here, i want to use curl command in shell script to test web pages, what i have is an opening page, when i click on a button on opening page, the next page comes up and then i have to upload a file n then click another button to submit and then comes the output page,... (2 Replies)
Discussion started by: Olivia
2 Replies

7. Shell Programming and Scripting

Trying to combine upload and download totals from txt file by ip address

I have two files, uploads.txt and downloads.txt. I would like to combine the columns of these files based on the ip address. How can I best do this? Uploads.txt 192.168.0.147 1565369 192.168.0.13 1664855 192.168.0.6 1332868 Downloads.txt 192.168.0.147 9838820 192.168.0.18 12051718... (7 Replies)
Discussion started by: zanyspydude
7 Replies

8. Linux

restrict file download not upload

hi everybody, How cud i stop downloading files from FTP and allow uploading files in FTP. Thanks & reg, (2 Replies)
Discussion started by: utpalsarkar
2 Replies

9. Solaris

Network speeds

Hello all, We have a group of Solaris 8 machines that are having some real network performance issues, they all go through a switch which *should* be set at 100 mb full duplex on every port which goes back to a master switch. I have checked the machines and the NIC cards are all set at 100 full.... (9 Replies)
Discussion started by: Mr Pink
9 Replies

10. UNIX for Dummies Questions & Answers

finding out processor speeds for a sparc

i recently purchased a dual ross sparc processor kit from someone. the person listed these items as 133mhz processors, however, looking at bridgepoint's site, they do not make 133mhz processors. so i was wondering, how can i check the processor speeds? (4 Replies)
Discussion started by: xyyz
4 Replies
Login or Register to Ask a Question