[root@jenkins xxxx]# time ping baidu.com -w 10s
PING baidu.com (220.181.57.217) 56(84) bytes of data.
64 bytes from 220.181.57.217 (220.181.57.217): icmp_seq=1 ttl=52 time=4.07 ms
64 bytes from 220.181.57.217 (220.181.57.217): icmp_seq=2 ttl=52 time=26.9 ms
64 bytes from 220.181.57.217 (220.181.57.217): icmp_seq=3 ttl=52 time=6.78 ms
64 bytes from 220.181.57.217 (220.181.57.217): icmp_seq=4 ttl=52 time=12.9 ms
64 bytes from 220.181.57.217 (220.181.57.217): icmp_seq=5 ttl=52 time=3.86 ms
64 bytes from 220.181.57.217 (220.181.57.217): icmp_seq=6 ttl=52 time=3.30 ms
64 bytes from 220.181.57.217 (220.181.57.217): icmp_seq=7 ttl=52 time=5.63 ms
64 bytes from 220.181.57.217 (220.181.57.217): icmp_seq=8 ttl=52 time=11.2 ms
64 bytes from 220.181.57.217 (220.181.57.217): icmp_seq=9 ttl=52 time=4.30 ms
64 bytes from 220.181.57.217 (220.181.57.217): icmp_seq=10 ttl=52 time=4.17 ms
--- baidu.com ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9013ms
rtt min/avg/max/mdev = 3.300/8.328/26.972/6.954 ms
real 0m10.006s
user 0m0.003s
sys 0m0.006s
不知道能不能满足你的需求