Hard Light Productions Forums

Off-Topic Discussion => General Discussion => Topic started by: Grizzly on November 01, 2014, 02:10:13 pm

Title: I need a constant internet analysis tool.
Post by: Grizzly on November 01, 2014, 02:10:13 pm
Currently, our internet is rather... random. The speed is highly variable, and it's luck of the draw when or when not a webpage will load. Our new home bosses have told us to try and analyze when the internet is down to see if they can fix it.

The problem, however, is not that the internet is 'down' all the time. THe problem is that at highly irregular moments, our internet connection starts partying like it's 1995. This is rather hard to analyze with a simple pinglogger tool, so...

What I need is a tool that analyzes internet connection speeds on a set time interval, like say, every minute. Basically like the basic internet speedtests that you can find anywhere on the internet, except that it does this every minute and logs the results - preferably in a graph.

Anyone knowing such a tool?
Title: Re: I need a constant internet analysis tool.
Post by: rev_posix on November 01, 2014, 08:49:23 pm
Give this a look, last time I looked at it, it was free as well

http://www.dslreports.com/smokeping
Title: Re: I need a constant internet analysis tool.
Post by: Grizzly on November 01, 2014, 09:23:56 pm
Ooh, that one is neat! Thanks.
Title: Re: I need a constant internet analysis tool.
Post by: Bobboau on November 02, 2014, 01:33:07 am
would imagine you could do something with wget and cron

...

OK josh, nice nerdsnipe, here is your command:

{ { date "+%Y-%m-%d %H:%M:%S," ; wget -O /dev/null http://www.google.com 2>&1 | grep -oh '\([0-9.]\+ [KM]B/s\)' ; } | xargs echo -n ; echo "" ; } >> speed.log

the last bit is the log file were the results are stored. you make yourself a cron job to run this command and you will have a csv file with "<timestamp>, <download speed>" cronicleing the speeds of downloading the google home page.

(assuming you have a linux/unix/osx box)
Title: Re: I need a constant internet analysis tool.
Post by: Grizzly on November 02, 2014, 05:23:19 am
Strange. THe command works just fine when entered into a terminal but when entered into the cronjob it gives no errors, but no results either.
Title: Re: I need a constant internet analysis tool.
Post by: Bobboau on November 02, 2014, 11:33:39 am
maybe it's putting it in a file you didn't expect? like the cron job is running as a different user and is putting the log in that user's home directory? maybe it would work better if you put it in a script?
Title: Re: I need a constant internet analysis tool.
Post by: pecenipicek on November 02, 2014, 05:10:44 pm
try this rather:

{ { /bin/date "+%Y-%m-%d %H:%M:%S," ; /usr/bin/wget -O /dev/null http://www.google.com 2>&1 | /bin/grep -oh '\([0-9.]\+ [KM]B/s\)' ; } | /usr/bin/xargs /bin/echo -n ; /bin/echo "" ; } >> /var/log/speed.log

as for why it doesnt work? $PATH is not set in cron, unless you explicitly set it there. i usually just do echo $PATH, take the output of that and stick it at the top of the cron, so you dont need absolute paths everywhere.
(these are the paths on ubuntu 14.04, for the record... whereis command is helpful to find the absolute paths.)