Search code examples
network-programminglatencymeasurementpacket-loss

retrieve the information from cmd


I want to retrieve the latency and the packet loss from the cmd result and I couldn't find a way so can anyone help me out and if there's another way it's all right I just want this information without using other software like PRTG


Pinging @ip with 32 bytes of data:
Reply from @ip: bytes=32 time=1ms TTL=64
Reply from @ip: bytes=32 time=1ms TTL=64
Reply from @ip: bytes=32 time=1ms TTL=64
Reply from @ip: bytes=32 time<1ms TTL=64

Ping statistics for @ip:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 1ms, Average = 0ms

Solution

  • use this:ping @ip >ping.txt