Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What does mdev mean in ping output (last row below)?

me@callisto ~ % ping -c 1   
PING ( 56(84) bytes of data.
64 bytes from ( icmp_seq=1 ttl=245 time=119 ms

--- ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 119.242/119.242/119.242/0.000 ms
share|improve this question
mdev is the moving standard deviation, sometimes also abbreviated "MSTD". It's not possible to calculate the true standard deviation until all the data points have been collected. A moving number is calculated on known data only. – Chris S Nov 25 '11 at 2:55
up vote 27 down vote accepted

It's the standard deviation, essentially an average of how far each ping RTT is from the mean RTT. The higher mdev is, the more variable the RTT is (over time).

With a high RTT variability, you will have speed issues with bulk transfers (they will take longer than is strictly speaking necessary, as the variability will eventually cause the sender to wait for ACKs) and you will have middling to poor VoIP quality.

share|improve this answer
Otherwise known as jitter. – dmourati Jul 29 '13 at 19:32
@dmourati Actually, no, the jitter is the difference between the lowest and highest RTT (or, equally, the difference from min to mean and teh difference from mean to max, depending on if you see it as "I ms" or "-A / +B ms". – Vatine Jul 30 '13 at 9:20

From the source code [1]:

                    tsum += triptime;
                    tsum2 += (long long)triptime * (long long)triptime


            tsum /= nreceived + nrepeats;
            tsum2 /= nreceived + nrepeats;
            tmdev = llsqrt(tsum2 - tsum * tsum);

we can conclude that:

mdev = SQRT(SUM(RTT*RTT) / N – (SUM(RTT)/N)^2)

which exactly matches Vatine's answer above.

share|improve this answer

It's the standard deviation - not sure why the label mdev has been used for it.

share|improve this answer
Google said that it could be mean (or median) devviation. – quanta Nov 21 '11 at 9:26
Okay. The ping(8) man pages does not tell me anything about deviations. What is it exactly or how should I interpret this particular value? – Daniel Nov 21 '11 at 9:37
@Daniel: standard deviation is a statistics concept, it tells you how the samples were distributed from the average. See – Matteo Nov 21 '11 at 13:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.