Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howto:simple_network_monitoring [2008/08/01 12:48] – Simple network monitor using Genmon plugin 194.141.47.101howto:simple_network_monitoring [2016/09/10 15:22] (current) – fix image sakuhl
Line 1: Line 1:
 +===== Simple network monitoring using Genmon plugin =====
 +
 Follow is the code of script that can make this Follow is the code of script that can make this
 I recomment to save in you home directory with name netmonitor.sh (with +x permissions), next have to add new item (On panel right click -> 'Add New Item' -> 'Generic Monitor') and for command type ~/netmonitor.sh . With no label tick and  period for update 1 I recomment to save in you home directory with name netmonitor.sh (with +x permissions), next have to add new item (On panel right click -> 'Add New Item' -> 'Generic Monitor') and for command type ~/netmonitor.sh . With no label tick and  period for update 1
    
  
-**Screenshot:** \\ {{http://aug01.imgshare.us/9li.png}}+**Screenshot:** \\ {{http://i.imgur.com/SfRfeyZ.png}}
  
  
Line 24: Line 26:
 fi fi
  
-MY_output=`netstat -i|grep ${interface}|awk '{print $12}'`+MY_output=`netstat -i|grep $interface|awk '{print $12}'`
 MY_icontheme="/usr/share/icons/${ICON_THEME}/${ICON_SIZE}x${ICON_SIZE}/status/" MY_icontheme="/usr/share/icons/${ICON_THEME}/${ICON_SIZE}x${ICON_SIZE}/status/"
  
Line 36: Line 38:
     echo "<img>${MY_icontheme}/network-error.png</img>"     echo "<img>${MY_icontheme}/network-error.png</img>"
 fi fi
-MY_ip=`/sbin/ifconfig eth0|grep inet|awk {'print $2'}|cut -d":" -f2`+MY_ip=`/sbin/ifconfig $interface|grep inet|awk {'print $2'}|cut -d":" -f2`
 echo "<tool> echo "<tool>
     Hostname: ${HOSTNAME}      Hostname: ${HOSTNAME}