New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
timestamp #29
Comments
@geokal It might be considered for the future release. 1. tamestampsDoes it
2. FormatIf parser = pingparsing.PingParsing()
parser.parse("""PING google.com (216.58.199.238) 56(84) bytes of data.
[1521287236.410693] 64 bytes from kix05s02-in-f14.1e100.net (216.58.199.238): icmp_seq=1 ttl=50 time=60.2 ms
[1521287237.295381] 64 bytes from kix05s02-in-f14.1e100.net (216.58.199.238): icmp_seq=2 ttl=50 time=54.2 ms
[1521287238.314844] 64 bytes from kix05s02-in-f14.1e100.net (216.58.199.238): icmp_seq=3 ttl=50 time=73.3 ms
[1521287239.315564] 64 bytes from kix05s02-in-f14.1e100.net (216.58.199.238): icmp_seq=4 ttl=50 time=73.1 ms
...
""")
print(parser.timestamp_list)
|
Hi, @thombashi yes exactly as you said something like ping -D would be great or better format like the %H:%M:%S in date command in Linux. Currently, I was pinging with -D to insert the since epoch time and then parse the ping results but it does not work as expected. Anyways thanks a lot!! |
@geokal |
@geokal |
@thombashi Thanks will try it as soon as possible!! |
I'll close the issue. |
Hi, with the current implementation, we miss sub-second precision :( |
It would be enough to change pingparsing/pingparsing/_parser.py Line 65 in 262d1b5
P.S.: the command line utility fails when using Ciao! |
Hi @marty90, Thank you for your feedback. Example: $ pingparsing google.com --icmp-replies -c 2 --timestamp epoch
{
"google.com": {
"destination": "google.com",
"packet_transmit": 2,
"packet_receive": 2,
"packet_loss_count": 0,
"packet_loss_rate": 0.0,
"rtt_min": 67.999,
"rtt_avg": 72.604,
"rtt_max": 77.209,
"rtt_mdev": 4.605,
"packet_duplicate_count": 0,
"packet_duplicate_rate": 0.0,
"icmp_replies": [
{
"timestamp": 1557592669.136097,
"icmp_seq": 1,
"ttl": 50,
"time": 67.9,
"duplicate": false
},
{
"timestamp": 1557592670.036501,
"icmp_seq": 2,
"ttl": 50,
"time": 77.2,
"duplicate": false
}
]
}
} |
Nice, it works :) |
Hi, thanks for your effort!! Not an issue but do you have any future plans on adding timestamps on every ping? trying to figure out an elegant way on this.
The text was updated successfully, but these errors were encountered: