|
|
|
|
@ -175,6 +175,7 @@ func Ping(domain string, PS int) {
|
|
|
|
|
func foot(address string, icmp_seq int, dropPack, min_lan, avg_lan, max_lan float64, ret_list []float64) {
|
|
|
|
|
red := color.New(color.FgRed).SprintFunc()
|
|
|
|
|
green := color.New(color.FgGreen).SprintFunc()
|
|
|
|
|
icmp_seq -= 1 //最后一个seq没统计过来
|
|
|
|
|
fmt.Printf("\n--- %s ping statistics ---\n", address)
|
|
|
|
|
if dropPack >= 1 {
|
|
|
|
|
fmt.Printf("%d packets transmitted, %f %s, %.2f%% packet loss, time 1000ms\n", icmp_seq, dropPack, red("lost"), dropPack/float64(icmp_seq)*100)
|
|
|
|
|
|