Got something to say or just want fewer pesky ads? Join us... 😊

OT - Pinging and Time Stamp



Westdene Seagull

aka Cap'n Carl Firecrotch
NSC Patreon
Oct 27, 2003
20,938
The arse end of Hangleton
I currently have a problem with my internet connection - random drop outs. I want to prove this and claim a % back on the bill.

I can pipe a ping -t to a file but it lacks a time and date stamp. I can do a time /t and a date /t but not all at the same time as the ping -t. How do I get all three elements in one text file using the pipe command ?

First person to suggest a reboot gets a good thumbing !
 


Joey Jo Jo Jr. Shabadoo

Waxing chumps like candles since ‘75
Oct 4, 2003
10,895
When using the pipe use >> instead of > as this will append to a file rather than over-write.

ie

time /t >> test.txt
date /t >> test.txt
ping xx.xx.xxx.x >> test.txt

Your output should look something like this

15:17
03/03/2015

Pinging xx.xx.xxx.x with 32 bytes of data:
Reply from xx.xx.xxx.x: bytes=32 time<1ms TTL=128
Reply from xx.xx.xxx.x: bytes=32 time<1ms TTL=128
Reply from xx.xx.xxx.x: bytes=32 time<1ms TTL=128
Reply from xx.xx.xxx.x: bytes=32 time<1ms TTL=128

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


Westdene Seagull

aka Cap'n Carl Firecrotch
NSC Patreon
Oct 27, 2003
20,938
The arse end of Hangleton
When using the pipe use >> instead of > as this will append to a file rather than over-write.

ie

time /t >> test.txt
date /t >> test.txt
ping xx.xx.xxx.x >> test.txt

Your output should look something like this

15:17
03/03/2015

Pinging xx.xx.xxx.x with 32 bytes of data:
Reply from xx.xx.xxx.x: bytes=32 time<1ms TTL=128
Reply from xx.xx.xxx.x: bytes=32 time<1ms TTL=128
Reply from xx.xx.xxx.x: bytes=32 time<1ms TTL=128
Reply from xx.xx.xxx.x: bytes=32 time<1ms TTL=128

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

Absolute star !!!! Created a batch file with :start and then a goto start and it works a blinder. Thank you.

NSC strikes again - is there nothing it can't solve ?
 


Guinness Boy

Tofu eating wokerati
Helpful Moderator
NSC Patreon
Jul 23, 2003
33,820
Up and Coming Sunny Portslade
When using the pipe use >> instead of > as this will append to a file rather than over-write.

ie

time /t >> test.txt
date /t >> test.txt
ping xx.xx.xxx.x >> test.txt

Your output should look something like this

15:17
03/03/2015

Pinging xx.xx.xxx.x with 32 bytes of data:
Reply from xx.xx.xxx.x: bytes=32 time<1ms TTL=128
Reply from xx.xx.xxx.x: bytes=32 time<1ms TTL=128
Reply from xx.xx.xxx.x: bytes=32 time<1ms TTL=128
Reply from xx.xx.xxx.x: bytes=32 time<1ms TTL=128

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

Sad git that I am I tested that. Works a treat.
 


Titanic

Super Moderator
Helpful Moderator
Jul 5, 2003
39,025
West Sussex
Or if you want the date and time on each response... you can use free utitily PINGWIZ

C:\>pingwiz www.google.co.uk


Pinging www.google.co.uk [31.55.162.246] with 32 bytes of data:


03/03/15 15:36:24 Reply from: 31.55.162.246: bytes=32 time=16ms TTL=57
03/03/15 15:36:25 Reply from: 31.55.162.246: bytes=32 time=93ms TTL=57
03/03/15 15:36:26 Reply from: 31.55.162.246: bytes=32 time=0ms TTL=57
03/03/15 15:36:27 Reply from: 31.55.162.246: bytes=32 time=94ms TTL=57
 




Westdene Seagull

aka Cap'n Carl Firecrotch
NSC Patreon
Oct 27, 2003
20,938
The arse end of Hangleton
Or if you want the date and time on each response... you can use free utitily PINGWIZ

C:\>pingwiz www.google.co.uk


Pinging www.google.co.uk [31.55.162.246] with 32 bytes of data:


03/03/15 15:36:24 Reply from: 31.55.162.246: bytes=32 time=16ms TTL=57
03/03/15 15:36:25 Reply from: 31.55.162.246: bytes=32 time=93ms TTL=57
03/03/15 15:36:26 Reply from: 31.55.162.246: bytes=32 time=0ms TTL=57
03/03/15 15:36:27 Reply from: 31.55.162.246: bytes=32 time=94ms TTL=57

I'm on Windows 7 and I get a "Pingwiz has stopped responding" the moment I run it ?
 




Westdene Seagull

aka Cap'n Carl Firecrotch
NSC Patreon
Oct 27, 2003
20,938
The arse end of Hangleton
You need to run it as an administrator.

Even then I get no output - Joey Jo Jo's solution seems to work far easier so I'll stick with that but thank you for the help.
 





Paying the bills

Latest Discussions

Paying the bills

Paying the bills

Paying the bills

Albion and Premier League latest from Sky Sports


Top
Link Here