Changeset 693

Show
Ignore:
Timestamp:
01/29/05 22:17:27 (7 years ago)
Author:
jimmyo
Message:

Added madwifi support to linux/if_* plugins.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    • Property cvs2svn:cvs-rev changed from 1.278 to 1.279
    r688 r693  
    2323  * Plugins: Added plugin generic/hddtemp_smartctl, made by Lupe Christoph. 
    2424    Made it the default hddtemp plugin. 
     25  * Plugin: Added madwifi support to linux/if_* plugins. 
    2526  * Installation: Make the single python plugin use @@PYTHON@@ again. 
    2627  * Docs: Documented minimum requirements for use of graph_sums (SF#1109040). 
  • trunk/node/node.d.linux/if_.in

    • Property cvs2svn:cvs-rev changed from 1.8 to 1.9
    r553 r693  
    1313# 
    1414# $Log$ 
     15# Revision 1.9  2005/01/29 21:17:27  jimmyo 
     16# Added madwifi support to linux/if_* plugins. 
     17# 
    1518# Revision 1.8  2004/12/10 10:47:49  jimmyo 
    1619# Change name from ${scale} to ${graph_period}, to be more consistent. 
     
    7073if [ "$1" = "suggest" ]; then 
    7174        if [ -r /proc/net/dev ]; then 
    72                 egrep '(eth|wlan)' /proc/net/dev | cut -f1 -d: | sed 's/ //g' 
     75                egrep '(eth|wlan|ath)' /proc/net/dev | cut -f1 -d: | sed 's/ //g' 
    7376                exit 0 
    7477        else 
     
    9396        echo 'up.negative down' 
    9497        echo 'up.cdef up,8,*' 
    95         if [ "$INTERFACE" = "wlan0" -o "$INTERFACE" = "wlan1" -o "$INTERFACE" = "wlan2" -o "$INTERFACE" = "wlan3" -o "$INTERFACE" = "wlan4" -o "$INTERFACE" = "wlan5" -o "$INTERFACE" = "wlan6" -o "$INTERFACE" = "wlan7" -o "$INTERFACE" = "wlan8" -o "$INTERFACE" = "wlan9" -o "$INTERFACE" = "wlan10" ] 
    96         then 
    97                 echo -n "up.info Traffic of the $INTERFACE interface. Maximum speed is " 
    98                 which iwlist >/dev/null 2>/dev/null || echo "undeterminable (please install iwlist)." 
    99                 iwlist $INTERFACE rate 2>/dev/null | awk '/Current Bit Rate/ { split ($0, arr, "="); split (arr[2], arr2, "M"); print (arr2[1]*1000000) " bits per second.\nup.max " (arr2[1]*1000000) "\ndown.max "(arr2[1]*1000000); }' 
    100         else 
    101                 echo -n "$INTERFACE.info Traffic of the $INTERFACE interface. Maximum speed is " 
    102                 which ethtool >/dev/null 2>/dev/null || echo "undeterminable (please install ethtool)." 
    103                 ethtool $INTERFACE 2>/dev/null | awk '/Speed/ { split ($2, arr2, "M"); print (arr2[1]*1000000) " bits per second.\nup.max " (arr2[1]*1000000) "\ndown.max "(arr2[1]*1000000); }' 
    104         fi 
     98        case "$INTERFACE" in 
     99                ath*|wlan*) 
     100                        echo -n "up.info Traffic of the $INTERFACE interface. Maximum speed is " 
     101                        which iwlist >/dev/null 2>/dev/null || echo "undeterminable (please install iwlist)." 
     102                        iwlist $INTERFACE rate 2>/dev/null | awk '/Current Bit Rate/ { split ($0, arr, "="); split (arr[2], arr2, "M"); print (arr2[1]*1000000) " bits per second.\nup.max " (arr2[1]*1000000) "\ndown.max "(arr2[1]*1000000); }' 
     103                        ;; 
     104                *) 
     105                        echo -n "$INTERFACE.info Traffic of the $INTERFACE interface. Maximum speed is " 
     106                        which ethtool >/dev/null 2>/dev/null || echo "undeterminable (please install ethtool)." 
     107                        ethtool $INTERFACE 2>/dev/null | awk '/Speed/ { split ($2, arr2, "M"); print (arr2[1]*1000000) " bits per second.\nup.max " (arr2[1]*1000000) "\ndown.max "(arr2[1]*1000000); }' 
     108                        ;; 
     109        esac 
    105110        exit 0 
    106111fi; 
  • trunk/node/node.d.linux/if_err_.in

    • Property cvs2svn:cvs-rev changed from 1.8 to 1.9
    r553 r693  
    1313# 
    1414# $Log$ 
     15# Revision 1.9  2005/01/29 21:17:27  jimmyo 
     16# Added madwifi support to linux/if_* plugins. 
     17# 
    1518# Revision 1.8  2004/12/10 10:47:49  jimmyo 
    1619# Change name from ${scale} to ${graph_period}, to be more consistent. 
     
    6972if [ "$1" = "suggest" ]; then 
    7073        if [ -r /proc/net/dev ]; then 
    71                 egrep '(eth|wlan)' /proc/net/dev | cut -f1 -d: | sed 's/ //g' 
     74                egrep '(eth|wlan|ath)' /proc/net/dev | cut -f1 -d: | sed 's/ //g' 
    7275                exit 0 
    7376        else