Git Product home page Git Product logo

openwrt_dsl_stats's Introduction

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.

openwrt_dsl_stats's People

Contributors

st31ny avatar

Stargazers

Djoolz avatar Dr. Manhattan avatar Thomas Aldrian avatar jekkos avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.