⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tg.sh

📁 模仿cisco路由器
💻 SH
字号:
#!/bin/shQ=10000if test $# -ne 2; then    echo -e "\Usage: `basename $0` [target] [number]This is simple traffic generator script for stress tests.It based on the traceroute: ftp://ftp.ee.lbl.gov/traceroute.tar.gz(FreeBSD and Debian Linux ships with this version).Script will send number*$Q UDP packetsand, of course, receive number*$Q ICMP replys.Note: for stress test you must turn off ICMP rate limit on target machine:Linux: sysctl -w net/ipv4/icmp_ratelimit=0FreeBSD: sysctl -w net.inet.icmp.icmplim=0Solaris: /usr/sbin/ndd -set /dev/ip ip_icmp_err_interval 0"    exitfiH=$1C=$2c=0s=`date +%s`while test $C -gt 0; do    C=$(($C-1))    traceroute -n -q $Q $H >/dev/null 2>&1    e=`date +%s`    l=$(($e-$s))    c=$(($c+2*$Q))    p=$(($c*10/($l*10+1)))    echo -ne "$l sec. $p pkts/s       \r"done echo# v1.1 by sla@0n.ru

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -