Skip to content

Configuration and scripts to collect and plot DSL line statistics in OpenWrt with LuCI.

Notifications You must be signed in to change notification settings

st31ny/openwrt_dsl_stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Lantiq DSL Statistics

Configuration and scripts to collect and plot DSL line statistics in OpenWrt with LuCI using collectd and rrdtool.

OpenWrt provides the /etc/init.d/dsl_control script to query the current DSL parameters. With the scripts and configuration described below, one can collect and plot the values, e.g., in order to analyze stability issues.

If you are unfamiliar with OpenWrt/LuCI's statistics support, check the OpenWrt wiki page on luci-app-statistics. The following guide assumes, that you have statistics basically setup and the package luci-app-statistics installed.

Furthermore, this setup was tested with the rrdtool support from the package collectd-mod-rrdtool which was configured to write to a USB drive in order to avoid flash wear. Check the OpenWrt wiki page about how to add a USB drive for details.

Data Collection

Setup data collection:

  1. Install packages: collectd-mod-exec shadow-useradd sudo
  2. Copy the collect-dsl script into /usr/sbin/ and make it executable.
  3. Add a new user to run collect-dsl as: useradd -r -s /bin/false -d /var collector
  4. Copy sudoers into the new file /etc/sudoers.d/collector to allow execution of collect-dsl with privileges.
  5. Configure collectd's exec module to execute the command /usr/bin/sudo -E /usr/sbin/collect-dsl with user collector and group collector.

This should be enough to get the data collected. Rrdtool's storage directory should now contain a dsl-dsl0/ directory with several .rrd files. Rrdtool provides commands to check the contents of .rrd files.

Some useful links for development:

Plotting

Plotting is based on the package luci-app-statistics.

To plot the collected data in LuCI simply copy dsl.lua into /usr/lib/lua/luci/statistics/rrdtool/definitions/.

After refreshing the graph page, it should show a "DSL" tab with many plots of signal strengths, data rates, and transmission errors.

If you want to change the plot appearence, do not forget to delete /tmp/luci-indexcache and /tmp/luci-modulecache/ before refreshing.

About

Configuration and scripts to collect and plot DSL line statistics in OpenWrt with LuCI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published