Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Perl module to test internet connection speed?

Does anybody know a module to test the speed of internet-connection?

like image 705
sid_com Avatar asked Dec 17 '22 01:12

sid_com


1 Answers

Speed as in bandwidth? Or as in latency? For the latter, just use Net::Ping.

For bandwidth, I don't know if there's anything ready made, there's 2 approaches:

  1. You can try to leverage ibmonitor

  2. Otherwise, to measure download bandwidth find a web site that lets you measure bandwidth by downloading a large file (or find such a large file on high-performance site); start the timer, start downloading that file (e.g. using LWP or any other module you wish - or Net::FTP if your file is on FTP site) - measure how long it takes and divide by the file size.

    Similar logic for measuring upload bandwidth, but instead of finding large file, you need to find a place on the internet (like a public repository) that'd allow uploading one.

like image 152
DVK Avatar answered Dec 27 '22 15:12

DVK