Link Quality v1
Version 2.0.2
This is one of my favourite modifications, and I thought something like it may have got into the standard v2 code, but it didn't. I wanted a pictorial representation (i.e. another graph) showing the quality of my link to my internet service provider (ISP). So I used a bit of code that I'd come across in the Coyote Linux project many years ago, and adapted it for ipcop. This is the view I wanted:

1. To achieve this requires a fair bit of editing. First in /usr/local/bin/makegraphs add a new sub-procedure updatelq
|
|
2. Then add another sub-procedure updatelqgraph in the same file
|
|
3. Once again, in /usr/local/bin/makegraphs, near the bottom of the file add these lines:
|
|
4. Add a new file /var/ipcop/addons/lang/linkquality.en.pl that has the following text in it. This is used to provide appropriate language translations shouldl you wish to provide the modification in other languages,
|
|
5. For this new language file to be considered you'll need to run the following command: rebuildlangtexts
6. Next we are going to make some changes, so that we can see our graphs. This involves editing /home/httpd/cgi-bins/graphs.cgi. Make the following (green) additions to the file
|
|
7. and a bit further down in the same file, these changes:
|
|
8. If you want even finer detail, alter sub-procedure updatelqgraph in /usr/local/bin/makegraphs as below:
sub updatelqgraph { my $period = $_[0]; my @rrd = (); push @rrd, @{&rrd_header("lq", $period, "$Lang::tr{'lq'} ($Lang::tr{$period})", -1,-1)}; push @rrd, "-v speed ms"; push @rrd, "DEF:roundtrip=$rrdlog/lq.rrd:roundtrip:AVERAGE"; push @rrd, "DEF:loss=$rrdlog/lq.rrd:loss:AVERAGE"; push @rrd, "CDEF:roundavg=roundtrip,PREV(roundtrip),+,1.05,/"; push @rrd, "CDEF:lossavg=loss,PREV(loss),+,2,/"; push @rrd, "CDEF:lossd=lossavg"; push @rrd, "CDEF:loss10=loss,10,*"; push @rrd, "CDEF:lossh=loss,2,/"; |
result:
