Advertisement
ajcorrea

mrtg/system

Aug 4th, 2013
98
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2.  
  3. TYPE=$1
  4. PARAM=$2
  5.  
  6. if [ "$TYPE" = "network" ]; then
  7.     LINE=`cat /proc/net/dev | grep $PARAM | sed s/$PARAM://`
  8.     INDATA=`echo $LINE | awk '{print $1}' `
  9.     OUTDATA=`echo $LINE | awk '{print $9}' `
  10. fi
  11.  
  12. echo $INDATA
  13. echo $OUTDATA
  14. echo `uptime | cut -d"," -f1,2`
  15. echo $TYPE
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement