X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;ds=sidebyside;f=applications%2Fluci-app-statistics%2Fluasrc%2Fstatistics%2Frrdtool%2Fdefinitions%2Fnetlink.lua;h=7b6acf36633262ef57a14d09eebcad49bc52790d;hb=8023fb9c433d01db99dc19668f892b4d4269eadb;hp=9313952518e16ebd4c5798ac9cfbfa5e0b7b30ce;hpb=1bb4822dca6113f73e3bc89e2acf15935e6f8e92;p=project%2Fluci.git diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua index 931395251..7b6acf366 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua @@ -1,17 +1,5 @@ ---[[ - -Luci statistics - netlink plugin diagram definition -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -$Id$ - -]]-- +-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich +-- Licensed to the public under the Apache License 2.0. module("luci.statistics.rrdtool.definitions.netlink", package.seeall) @@ -34,11 +22,13 @@ function rrdargs( graph, plugin, plugin_instance ) -- special options for single data lines options = { if_octets__tx = { + title = "Bytes (TX)", total = true, -- report total amount of bytes color = "00ff00" -- tx is green }, if_octets__rx = { + title = "Bytes (RX)", flip = true, -- flip rx line total = true, -- report total amount of bytes color = "0000ff" -- rx is blue @@ -71,6 +61,8 @@ function rrdargs( graph, plugin, plugin_instance ) options = { -- processed packets (tx DS) if_packets__tx = { + weight = 2, + title = "Total (TX)", overlay = true, -- don't summarize total = true, -- report total amount of bytes color = "00ff00" -- processed tx is green @@ -78,6 +70,8 @@ function rrdargs( graph, plugin, plugin_instance ) -- processed packets (rx DS) if_packets__rx = { + weight = 3, + title = "Total (RX)", overlay = true, -- don't summarize flip = true, -- flip rx line total = true, -- report total amount of bytes @@ -86,6 +80,8 @@ function rrdargs( graph, plugin, plugin_instance ) -- dropped packets (tx DS) if_dropped__tx = { + weight = 1, + title = "Dropped (TX)", overlay = true, -- don't summarize total = true, -- report total amount of bytes color = "660055" -- dropped tx is ... dunno ;) @@ -93,14 +89,18 @@ function rrdargs( graph, plugin, plugin_instance ) -- dropped packets (rx DS) if_dropped__rx = { + weight = 4, + title = "Dropped (RX)", overlay = true, -- don't summarize flip = true, -- flip rx line total = true, -- report total amount of bytes - color = "440066" -- dropped rx is violett + color = "ff00ff" -- dropped rx is violett }, -- packet errors (tx DS) if_errors__tx = { + weight = 0, + title = "Errors (TX)", overlay = true, -- don't summarize total = true, -- report total amount of packets color = "ff5500" -- tx errors are orange @@ -108,6 +108,8 @@ function rrdargs( graph, plugin, plugin_instance ) -- packet errors (rx DS) if_errors__rx = { + weight = 5, + title = "Errors (RX)", overlay = true, -- don't summarize flip = true, -- flip rx line total = true, -- report total amount of packets @@ -134,6 +136,7 @@ function rrdargs( graph, plugin, plugin_instance ) options = { -- multicast packets if_multicast = { + title = "Packets", total = true, -- report total amount of packets color = "0000ff" -- multicast is blue } @@ -158,6 +161,7 @@ function rrdargs( graph, plugin, plugin_instance ) options = { -- collision rate if_collisions = { + title = "Collisions", total = true, -- report total amount of packets color = "ff0000" -- collsions are red } @@ -185,15 +189,19 @@ function rrdargs( graph, plugin, plugin_instance ) }, -- special options for single data lines - options = { -- XXX: fixme (define colors...) - if_tx_errors = { - total = true - }, - - if_rx_errors = { - flip = true, - total = true - } + options = { + if_tx_errors_aborted_value = { total = true, color = "ffff00", title = "Aborted (TX)" }, + if_tx_errors_carrier_value = { total = true, color = "ffcc00", title = "Carrier (TX)" }, + if_tx_errors_fifo_value = { total = true, color = "ff9900", title = "Fifo (TX)" }, + if_tx_errors_heartbeat_value = { total = true, color = "ff6600", title = "Heartbeat (TX)" }, + if_tx_errors_window_value = { total = true, color = "ff3300", title = "Window (TX)" }, + + if_rx_errors_length_value = { flip = true, total = true, color = "ff0000", title = "Length (RX)" }, + if_rx_errors_missed_value = { flip = true, total = true, color = "ff0033", title = "Missed (RX)" }, + if_rx_errors_over_value = { flip = true, total = true, color = "ff0066", title = "Over (RX)" }, + if_rx_errors_crc_value = { flip = true, total = true, color = "ff0099", title = "CRC (RX)" }, + if_rx_errors_fifo_value = { flip = true, total = true, color = "ff00cc", title = "Fifo (RX)" }, + if_rx_errors_frame_value = { flip = true, total = true, color = "ff00ff", title = "Frame (RX)" } } } }