³×Æ®¿÷Æ®·¹ÇÈ ÃøÁ¤ °£´Ü ½ºÅ©¸³Æ® |
±Û ¾´ ÀÌ |
linux |
³¯ Â¥ |
2003³â 01¿ù 17ÀÏ 10½Ã 30ºÐ 33ÃÊ |
º» ¹® |
½ÇÇà ¿¹ )
./transfer eth0
ÃøÁ¤ÁßÀÔ´Ï´Ù. ±â´Ù·ÁÁÖ¼¼¿ä
¼ö½Å(in) 1 kbyte/s
¼Û½Å(out) 28 kbyte/s
#!/bin/sh
#
# Scripted by JoungKyun Kim
# 2001.2.15 http://www.oops.org
# This Script follows GPL2 License
if [ "$1" != "" ]; then
# ethnet device
ETH="$1:"
CHECK=/proc/net/dev
CAT=/bin/cat
GREP="/bin/grep ${ETH}"
SED="sed -e s/${ETH}//"
UPTIME=/usr/bin/uptime
# parcket user check
set `${CAT} ${CHECK} | ${GREP} | ${SED}`
# Transmit packet
let "in1 = $1"
let "out1 = $9"
echo "ÃøÁ¤ÁßÀÔ´Ï´Ù. ±â´Ù·ÁÁÖ¼¼¿ä"
sleep 10
set `${CAT} ${CHECK} | ${GREP} | ${SED}`
let "in0 = $1"
let "out0 = $9"
let " in = ($in0 - $in1)/(10*1024)"
let " out = ($out0 - $out1)/(10*1024)"
echo "¼ö½Å(in) $in kbyte/s"
echo "¼Û½Å(out) $out kbyte/s"
else
echo "USAGE: $0 [ethernet device no]"
echo "ex) ./$0 eth0"
fi
exit 0
|
|
|
|