Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wget time measurement

Tags:

time

wget

ubuntu

I am using wget for http traffic measurement. Since the network is quick and the http data is small in size, wget cannot measure time and rate of the download session. So how could I measure the time? Maybe someone could help providing a script or another application that is capable of solving this problem.

Thanks in advance!

like image 203
user1718019 Avatar asked Oct 03 '12 18:10

user1718019


People also ask

What wget means?

Wget is a computer tool created by the GNU Project. You can use it to retrieve content and files from various web servers. The name is a combination of World Wide Web and the word get. It supports downloads via FTP, SFTP, HTTP, and HTTPS. Wget is created in portable C and usable on any Unix system.

Why do we use wget?

Wget is the non-interactive network downloader which is used to download files from the server even when the user has not logged on to the system and it can work in the background without hindering the current process. GNU wget is a free utility for non-interactive download of files from the Web.

What is wget spider?

The wget tool is essentially a spider that scrapes / leeches web pages but some web hosts may block these spiders with the robots. txt files. Also, wget will not follow links on web pages that use the rel=nofollow attribute. You can however force wget to ignore the robots.


1 Answers

As alluded to by user1718019, curl can do this for you:

curl -so /dev/null -w '%{time_total}\n' http://www.example.com/

This will print on stdout, according to the manual:

The total time, in seconds, that the full operation lasted. The time will be displayed with millisecond resolution.

like image 179
G Mawr Avatar answered Oct 10 '22 01:10

G Mawr