DrayTek UK Users' Community Forum

Help, Advice and Solutions from DrayTek Users

Vigor 2750 Line Speed and SNR Logging Script

More
29 Sep 2012 21:35 #73679 by lorian
I plan to do a few enhancements to the 2750. Hopefully Draytek will soon give me the open source to the latest firmware. There apoears to be at least one bug in pppd i neeed the source to fix.

In the meantime, as My line is pretty poor I have some instability problems (nothing new there) but the 2750 doesn't update the speed and SNR oids, so I;ve written a script to log these to a file. Version 2 will poke the values into the oids. So here is version one. I suggest creating it on a usb key mounted on the system.

So, (with not warrant expressed or implied), Telenet in to your 2750 as root or admin.

df -k (to spot the usb disk) cd to the usb stick (preferrable to a diredtory you have created a samba share to in the GUI)

Create (vi!) a file collect.vs:
Code:
interface xdsl show status 1


Create a file called collect.sh:
Code:
while [ 1 = 1 ] ; do mydate=`date "+%d/%m/%Y"` mytime=`date "+%H:%M:%S"` upspeed=`vdslcli collect.vs |grep -i "actual data rate"|head -1|cut -c26-37` downspeed=`vdslcli collect.vs |grep -i "actual data rate"|tail -1 |cut -c26-37` upsnr=`vdslcli collect.vs |grep -i SNR |grep -i "(US)"|head -1|cut -c26-37` downsnr=`vdslcli collect.vs grep -i SNR|grep -i "(DS)"|tail -1 |cut -c26-37` echo $mydate "," $mytime "," $upspeed "," $upsnr "," $downspeed "," $downsnr > vigorlog.csv sleep 30 done


Then to run it up type:

Code:
./collect.sh &


Then drop your telnet connection. The vigor doesn't have nohup or cron, but this method does create a persistant monitor job, that will run until the router is next rebooted. When create V2 I'll make it so init starts it up.

You can now browse to the samba share, and open the file (vigorlog.csv) in something like Excel to graph it (its a CSV file)

disclaimer: If you don't undertand anything here, and don't know vi or understand the damage you can do to your firmware please dont do this. I also advise NOT playing with the vdslcli command unless you really, really know what you are doing.

Please Log in or Create an account to join the conversation.

Moderators: ChrisSami