Ping's definition of mdev

Josh Coates jcoates at archive.org
Fri Jun 17 00:43:05 MDT 2005


> I searched the man page and google but can not find a definition for
> mdev, which is a returned statistic when ping exits.  Does anybody
> know what it is measuring?

>>I found the answer.  It is the standard deviation.  mdev stands for mean
>>deviation.

mdev is the std dev?  standard deviation is not the same thing as the mean
deviation.

http://mathworld.wolfram.com/StandardDeviation.html

http://mathworld.wolfram.com/MeanDeviation.html

i didn't look at the source, but what you've excerpted below looks like they
are assigning 'mdev' the stnd deviation, which doesn't look right.

quick, now is your chance to make a contribution to the open source
movement!!

submit a bug and patch: s/mdev/sdev/g on ping_common.c

w00t!

Josh Coates
www.jcoates.org


-----Original Message-----
From: plug-bounces at plug.org [mailto:plug-bounces at plug.org]On Behalf Of
Derek Burdick
Sent: Friday, June 17, 2005 12:28 AM
To: Provo Linux Users Group Mailing List
Subject: Re: Ping's definition of mdev


I found the answer.  It is the standard deviation.  mdev stands for mean
deviation.

Derek Burdick wrote:

> I searched the man page and google but can not find a definition for
> mdev, which is a returned statistic when ping exits.  Does anybody
> know what it is measuring?  I have looked through the code and
> determined mathematically what the algorithm does, but I don't see any
> relevance to networking.  Does anybody have any insight?  I have
> attached my comments on what the code is doing in case somebody knows
> of a generic use for this algorithm.
>
> Here is the sample output
> 3460 packets transmitted, 3451 received, 0% packet loss, time 119983ms
> rtt min/avg/max/mdev = 303.108/305.426/347.859/2.979 ms, pipe 11
>
> Here is what I believe ping_common.c is doing to determine mdev:
>
> for each packet received and assuming tsum and tsum2 start at 0:
> tsum += triptime
> tsum2 += triptime * triptime
>
> Once ping finishes
> tsum /= nreceived + nrepeats // Get the average of the triptimes.  We
> have 0 repeats so it has no effect here.
> tsum2 /= nreceived + nrepeats // Get the average of the squared
> triptimes.  Once again we have 0 repeats
>
> tmdev = llsqrt(tsum2 - tsum * tsum); // Take the square root of the
> difference of the average squared triptimes and the average triptime
> squared.
>
> tmdev is then printed as printf("%ld.%03ld ms", tmdev /1000,
> tmdev%1000);  //This is giving us the results in milliseconds
>
> If anybody has any insight or comments i'd love to hear them.
>
> Thanks,
>  Derek
>
> p.s.  This is not a class assignment.  Our sales team wants to sell IP
> phone service to a client in India using the Internet for the
> bandwidth.  I was looking for any numbers I could find to help me give
> them a good idea of what to expect.
>
> I think I will add a Jitter calculation in to ping as that is usually
> a great indication along with packet loss on what to expect with VOIP.
>
> Thanks again.
> .===================================.
> | This has been a P.L.U.G. mailing. |
> |      Don't Fear the Penguin.      |
> |  IRC: #utah at irc.freenode.net   |
> `==================================='

.===================================.
| This has been a P.L.U.G. mailing. |
|      Don't Fear the Penguin.      |
|  IRC: #utah at irc.freenode.net   |
`==================================='






More information about the PLUG mailing list