4 l7 W' n% g, f0 s% U1 q% K 在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: 8 j" c" r8 [$ G, N& A % V9 [5 m$ B, ^2 i3 o3 j0 B; X C:\>ping -n 50 202.103.96.68 : s0 G$ F+ d: i- Z; z( | - `2 z0 A3 `# u) k/ ~6 Z' F$ d5 p
Pinging 202.103.96.68 with 32 bytes of data: + v/ F$ x' ]5 p+ V7 D! n- W; b5 b ( R g$ `- [6 c9 N
Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 / p9 x3 u) V; p2 v
. C8 p9 J& ]4 j* x% O
Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 4 J# z" {; ]+ F4 F 4 M- x% }5 F9 F5 D' Z( N/ {
Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 0 q0 _8 @, L7 {$ D8 f( Q% X $ m1 n8 y/ s: _2 R Request timed out. & E+ a* ]( M( ]" }
8 C! t4 T" Z1 M5 W; B) r: [) e
……………… 3 T1 G$ x# w) V Y+ X % b! s! z& j5 g& o/ u* f( k
Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 % D2 V7 i8 D g, `; s
7 \( h! v- i7 F* ?* d Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 # C; w0 l: V. U
4 n. y# A5 i; J% R( P Ping statistics for 202.103.96.68: " Y5 y; b! S) ? Q0 Q/ I* [0 f
, ]1 B+ I# f3 r0 \1 }1 S
Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds: % [& h' p, M: s9 Q4 j1 f2 P $ g/ h* d+ B; C- `& x6 T+ @( D
Minimum = 40ms, Maximum = 51ms, Average = 46ms - F' h. Y1 j, X9 v5 z7 t, ^' s+ a ' n- l @7 K2 [" k1 [* A 从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。 6 a; Q, w. O# i, u) E; z1 L, m
* d( X' S# _0 L1 @ N4 M, @ -l size Send buffer size. 4 [% U7 J0 n. p1 M
" r2 O5 x0 T% d. u
定义echo数据包大小。作者: 冷雨清心 时间: 2008-9-25 15:54