Calculating packet loss from ping?Reducing packet loss in tc rate limitingBehavior of ping with partial...
Warnings of R. Chaim Vital
Why is Japan trying to have a better relationship with Iran?
What is this mount with two buttons on side of Vivitar 75-205mm lens?
How could an armless race establish civilization?
Using the ArcGIS 'select by location' tool in ModelBuilder?
If two black hole event horizons overlap (touch) can they ever separate again?
How is this practical and very old scene shot?
Why does the recording about Twin Pines Mall not change the same way the newspapers and photographs change?
Do the 26 richest billionaires own as much wealth as the poorest 3.8 billion people?
How to describe POV characters?
Sacrifice blocking creature before damage is dealt no longer working (MtG Arena)?
Do home values typically rise and fall at a consistent percent?
Sharing referee/AE report online to point out a grievous error in refereeing
Handling a player (unintentionally) stealing the spotlight
Can you actually break an FPGA by programming it wrong?
How can a valley surrounded by mountains be fertile and rainy?
"Vector quantity" --More than two dimensions?
How Do I Know When I am in Private Mode?
I just started should I accept a farewell lunch for a coworker I don't know?
13th chords on guitar
Is there a legal way for US presidents to extend their terms beyond two terms of four years?
Will writing actual numbers instead of writing them with letters affect readership?
How receiver knows the exact frequency in the channel to "listen to"?
Why did NASA wet the road in front of the Space Shuttle crawler?
Calculating packet loss from ping?
Reducing packet loss in tc rate limitingBehavior of ping with partial packet loss on UbuntuPing command results in packet lossHuge packet loss on openwrtKVM network packet loss to guestVMWare vSphere packet lossWhy ping receives another ping command packet?Ping from VRF VLAN interfacePing - big packet size problemsWhy specify packet size during ping test?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I've got an ESXi VM that does command execution on some 700~ devices on our network. It's using Expect, and due to the age of this equipment they have periods of poor performance. These two don't mix well - as the Expect script will have to wait really long to get output before proceeding.
To try to avoid this, our team decided that a ping test should be issued before connecting to the device. If there's packet loss, we'll come back to it later.
The issue we're having is that our ping test looks like this:
loss=`ping -i 0.2 -w 2 $1 | grep "packet loss" | awk '{print $6}'`
loss=${loss%?}
echo "$loss"
10 pings over two seconds - but we get a LOT of 9% Packet Loss responses. For example we usually have 74/700 tests exit preemptively due to packet loss detection. 39/74 of those report 9%, while the rest report in multiples of 10.
Far as we can tell that doesn't really make sense; there are 10 packets being sent...if one is dropped that should be 10% loss. This has been observed infrequently, but it does happen. Is it possible there's something going on in memory that's causing the number 9 to manifest? If these are legitimate instances of packets being lost then it's big news for us.
networking ping expect
add a comment |
I've got an ESXi VM that does command execution on some 700~ devices on our network. It's using Expect, and due to the age of this equipment they have periods of poor performance. These two don't mix well - as the Expect script will have to wait really long to get output before proceeding.
To try to avoid this, our team decided that a ping test should be issued before connecting to the device. If there's packet loss, we'll come back to it later.
The issue we're having is that our ping test looks like this:
loss=`ping -i 0.2 -w 2 $1 | grep "packet loss" | awk '{print $6}'`
loss=${loss%?}
echo "$loss"
10 pings over two seconds - but we get a LOT of 9% Packet Loss responses. For example we usually have 74/700 tests exit preemptively due to packet loss detection. 39/74 of those report 9%, while the rest report in multiples of 10.
Far as we can tell that doesn't really make sense; there are 10 packets being sent...if one is dropped that should be 10% loss. This has been observed infrequently, but it does happen. Is it possible there's something going on in memory that's causing the number 9 to manifest? If these are legitimate instances of packets being lost then it's big news for us.
networking ping expect
add a comment |
I've got an ESXi VM that does command execution on some 700~ devices on our network. It's using Expect, and due to the age of this equipment they have periods of poor performance. These two don't mix well - as the Expect script will have to wait really long to get output before proceeding.
To try to avoid this, our team decided that a ping test should be issued before connecting to the device. If there's packet loss, we'll come back to it later.
The issue we're having is that our ping test looks like this:
loss=`ping -i 0.2 -w 2 $1 | grep "packet loss" | awk '{print $6}'`
loss=${loss%?}
echo "$loss"
10 pings over two seconds - but we get a LOT of 9% Packet Loss responses. For example we usually have 74/700 tests exit preemptively due to packet loss detection. 39/74 of those report 9%, while the rest report in multiples of 10.
Far as we can tell that doesn't really make sense; there are 10 packets being sent...if one is dropped that should be 10% loss. This has been observed infrequently, but it does happen. Is it possible there's something going on in memory that's causing the number 9 to manifest? If these are legitimate instances of packets being lost then it's big news for us.
networking ping expect
I've got an ESXi VM that does command execution on some 700~ devices on our network. It's using Expect, and due to the age of this equipment they have periods of poor performance. These two don't mix well - as the Expect script will have to wait really long to get output before proceeding.
To try to avoid this, our team decided that a ping test should be issued before connecting to the device. If there's packet loss, we'll come back to it later.
The issue we're having is that our ping test looks like this:
loss=`ping -i 0.2 -w 2 $1 | grep "packet loss" | awk '{print $6}'`
loss=${loss%?}
echo "$loss"
10 pings over two seconds - but we get a LOT of 9% Packet Loss responses. For example we usually have 74/700 tests exit preemptively due to packet loss detection. 39/74 of those report 9%, while the rest report in multiples of 10.
Far as we can tell that doesn't really make sense; there are 10 packets being sent...if one is dropped that should be 10% loss. This has been observed infrequently, but it does happen. Is it possible there's something going on in memory that's causing the number 9 to manifest? If these are legitimate instances of packets being lost then it's big news for us.
networking ping expect
networking ping expect
edited 1 hour ago
Lucas Ramage
5251 silver badge12 bronze badges
5251 silver badge12 bronze badges
asked 6 hours ago
KuboMDKuboMD
2451 silver badge10 bronze badges
2451 silver badge10 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
There are several ping versions. Some have the -w option. Some accept it but is undocumented. In some versions of ping, this happens:
$ ping -i 0.2 -w 2 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.091 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.091 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.089 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.086 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.088 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.097 ms
64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.091 ms
64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.095 ms
64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.095 ms
64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.092 ms
--- 127.0.0.1 ping statistics ---
11 packets transmitted, 10 packets received, 9% packet loss
round-trip min/avg/max/stddev = 0.086/0.091/0.097/0.000 ms
That is: one packet is emitted, the time expire and it is never received back.
Thus: 1 packet of 11 got lost, that's 9% loss.
With those ping versions, adding a -c option should solve the issue:
$ ping -i 0.2 -c 10 -w 5 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.127 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.096 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.088 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.084 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.084 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.093 ms
64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.089 ms
64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.089 ms
64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.087 ms
64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.094 ms
--- 127.0.0.1 ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.084/0.093/0.127/0.000 ms
That means: try packets each 0.2 sec until 10 packets have been received or until a time limit of 5 seconds has elapsed.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f527094%2fcalculating-packet-loss-from-ping%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
There are several ping versions. Some have the -w option. Some accept it but is undocumented. In some versions of ping, this happens:
$ ping -i 0.2 -w 2 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.091 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.091 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.089 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.086 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.088 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.097 ms
64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.091 ms
64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.095 ms
64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.095 ms
64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.092 ms
--- 127.0.0.1 ping statistics ---
11 packets transmitted, 10 packets received, 9% packet loss
round-trip min/avg/max/stddev = 0.086/0.091/0.097/0.000 ms
That is: one packet is emitted, the time expire and it is never received back.
Thus: 1 packet of 11 got lost, that's 9% loss.
With those ping versions, adding a -c option should solve the issue:
$ ping -i 0.2 -c 10 -w 5 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.127 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.096 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.088 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.084 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.084 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.093 ms
64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.089 ms
64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.089 ms
64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.087 ms
64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.094 ms
--- 127.0.0.1 ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.084/0.093/0.127/0.000 ms
That means: try packets each 0.2 sec until 10 packets have been received or until a time limit of 5 seconds has elapsed.
add a comment |
There are several ping versions. Some have the -w option. Some accept it but is undocumented. In some versions of ping, this happens:
$ ping -i 0.2 -w 2 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.091 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.091 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.089 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.086 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.088 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.097 ms
64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.091 ms
64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.095 ms
64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.095 ms
64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.092 ms
--- 127.0.0.1 ping statistics ---
11 packets transmitted, 10 packets received, 9% packet loss
round-trip min/avg/max/stddev = 0.086/0.091/0.097/0.000 ms
That is: one packet is emitted, the time expire and it is never received back.
Thus: 1 packet of 11 got lost, that's 9% loss.
With those ping versions, adding a -c option should solve the issue:
$ ping -i 0.2 -c 10 -w 5 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.127 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.096 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.088 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.084 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.084 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.093 ms
64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.089 ms
64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.089 ms
64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.087 ms
64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.094 ms
--- 127.0.0.1 ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.084/0.093/0.127/0.000 ms
That means: try packets each 0.2 sec until 10 packets have been received or until a time limit of 5 seconds has elapsed.
add a comment |
There are several ping versions. Some have the -w option. Some accept it but is undocumented. In some versions of ping, this happens:
$ ping -i 0.2 -w 2 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.091 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.091 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.089 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.086 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.088 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.097 ms
64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.091 ms
64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.095 ms
64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.095 ms
64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.092 ms
--- 127.0.0.1 ping statistics ---
11 packets transmitted, 10 packets received, 9% packet loss
round-trip min/avg/max/stddev = 0.086/0.091/0.097/0.000 ms
That is: one packet is emitted, the time expire and it is never received back.
Thus: 1 packet of 11 got lost, that's 9% loss.
With those ping versions, adding a -c option should solve the issue:
$ ping -i 0.2 -c 10 -w 5 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.127 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.096 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.088 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.084 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.084 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.093 ms
64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.089 ms
64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.089 ms
64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.087 ms
64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.094 ms
--- 127.0.0.1 ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.084/0.093/0.127/0.000 ms
That means: try packets each 0.2 sec until 10 packets have been received or until a time limit of 5 seconds has elapsed.
There are several ping versions. Some have the -w option. Some accept it but is undocumented. In some versions of ping, this happens:
$ ping -i 0.2 -w 2 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.091 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.091 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.089 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.086 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.088 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.097 ms
64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.091 ms
64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.095 ms
64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.095 ms
64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.092 ms
--- 127.0.0.1 ping statistics ---
11 packets transmitted, 10 packets received, 9% packet loss
round-trip min/avg/max/stddev = 0.086/0.091/0.097/0.000 ms
That is: one packet is emitted, the time expire and it is never received back.
Thus: 1 packet of 11 got lost, that's 9% loss.
With those ping versions, adding a -c option should solve the issue:
$ ping -i 0.2 -c 10 -w 5 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.127 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.096 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.088 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.084 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.084 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.093 ms
64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.089 ms
64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.089 ms
64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.087 ms
64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.094 ms
--- 127.0.0.1 ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.084/0.093/0.127/0.000 ms
That means: try packets each 0.2 sec until 10 packets have been received or until a time limit of 5 seconds has elapsed.
answered 4 hours ago
IsaacIsaac
13.6k1 gold badge22 silver badges59 bronze badges
13.6k1 gold badge22 silver badges59 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f527094%2fcalculating-packet-loss-from-ping%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown