CLI ping command time

book

Article ID: 167857

calendar_today

Updated On:

Products

XOS

Issue/Introduction

Describes time presented as output of CLI ping command, as well as how to measure response time (rtt) from CLI and shell level.The ping command can be used from the CLI to test connectivity to a specific IP address. This command reports number of packets transmitted, received, percentage loss, and total time it took to execute command in milliseconds.

BEESPPANDVBS01# ping 1.1.1.20
-- Ping Statistic from PRIMARY CP to 1.1.1.20 --
!!!!!
5 packets transmitted, 5 received, 0% loss, time 3996ms

BEESPPANDVBS01# ping 192.168.15.9
-- Ping Statistic from PRIMARY CP to 192.168.15.9 --
!!!!!
5 packets transmitted, 5 received, 0% loss, time 3996ms

Cause

The time value reported by the ping command is not the round trip time, but the total time that the command was running.

Resolution

The "time" is the total time it took to run the ping command. Packets are sent at 1 second intervals.

BEESPPANDVBS01# ping 1.1.1.20
-- Ping Statistic from PRIMARY CP to 1.1.1.20 --
!!!!!
5 packets transmitted, 5 received, 0% loss, time 3996ms


To monitor response time, run a shell level ping command from CLI level:
CLI# unix "ping -c 5 -n <destination>"

Or it can be run directly from root shell level:
ping -c 5 -n <destination>

In both cases all the standard ping switches work.

X45_3# unix "ping 192.168.128.1 -c 5 -n"
PING 192.168.128.1 (192.168.128.1) 56(84) bytes of data.
64 bytes from 192.168.128.1: icmp_seq=1 ttl=64 time=0.248 ms
64 bytes from 192.168.128.1: icmp_seq=2 ttl=64 time=0.167 ms
64 bytes from 192.168.128.1: icmp_seq=3 ttl=64 time=0.225 ms
64 bytes from 192.168.128.1: icmp_seq=4 ttl=64 time=0.284 ms
64 bytes from 192.168.128.1: icmp_seq=5 ttl=64 time=0.338 ms

--- 192.168.128.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4000ms
rtt min/avg/max/mdev = 0.167/0.252/0.338/0.058 ms


Response time (rtt) is reported for each packet and at the end of output (min/avg/max/mdev).

Workaround