#24826 [Fbk]: PEAR::Net Ping Bug
| From: | kennyt@php.net | Date: | Sun, 07 Mar 2004 16:27:55 +0000 |
| Subject: | #24826 [Fbk]: PEAR::Net Ping Bug | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-26184@lists.php.net to get a copy of this message | ||
ID: 24826
Updated by: kennyt@php.net
Reported By: young at sl dot com dot ua
Status: Feedback
Bug Type: PEAR related
Operating System: Linux
PHP Version: 4.3.2
Assigned To: jan
New Comment:
Oops, probably my fault. :-)
Previous Comments:
------------------------------------------------------------------------
[2004-03-07 11:20:22] mj@php.net
There have been a number of new releases for Net_Ping recently. Can you
please the latest and report back, if the problem persists?
------------------------------------------------------------------------
[2003-08-20 06:18:46] neufeind@php.net
Hmm, the code mentioned above seems quite strange - since it has the
same code in both parts of the if-tree :-))
Don't the patches from Progman2002 work fine? Didn't have time to try
but had a look at the source. And his ideas seem to make the parser
more flexible. They should also catch the recent problems correctly.
Might somebody of the Net_Ping-team please have a look? Do they maybe
have sample-outputs from various linux-systems at hand - or is the
output the same on all variants / versions?
------------------------------------------------------------------------
[2003-08-20 05:58:21] young at sl dot com dot ua
For repair this bug need to change:
From:
---------
if (strpos($this->_raw_data[$raw_data_len - 1], 'mdev')) {
/* do not forget the rtt field */
$this->_round_trip['min'] = ltrim($round_trip[5]);
$this->_round_trip['avg'] = $round_trip[6];
$this->_round_trip['max'] = $round_trip[7];
} else {
$this->_round_trip['min'] = ltrim($round_trip[4]);
$this->_round_trip['avg'] = $round_trip[5];
$this->_round_trip['max'] = $round_trip[6];
}
------------------
To:
if (strpos($this->_raw_data[$raw_data_len - 1], 'mdev')) {
/* do not forget the rtt field */
$this->_round_trip['min'] = ltrim($round_trip[4]);
$this->_round_trip['avg'] = $round_trip[5];
$this->_round_trip['max'] = $round_trip[6];
} else {
$this->_round_trip['min'] = ltrim($round_trip[4]);
$this->_round_trip['avg'] = $round_trip[5];
$this->_round_trip['max'] = $round_trip[6];
}
------------------
------------------------------------------------------------------------
[2003-08-20 05:47:26] young at sl dot com dot ua
why there is no parametr -i in Linux options ?!!
-i interval
Wait interval seconds between sending each packet. The
default is to wait for one second between
each packet normally, or not to wait in flood mode.
------------------------------------------------------------------------
[2003-08-20 03:32:29] young at sl dot com dot ua
-----------
[14] => rtt min/avg/max/mdev = 250.889/298.179/397.075/41.305 ms
)
[_sysname] => linux
[_round_trip] => Array
(
[min] => 298.179
[avg] => 397.075
[max] => 41.305
)
-----------------
I get it again from CVS.
There are another error.
min/avg/max/mdev = rtt min/avg/max/mdev =
250.889/298.179/397.075/41.305 ms
Now:
[min] => 298.179
[avg] => 397.075
[max] => 41.305
Need:
[min] => 250.889
[avg] => 298.179
[max] => 397.075
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/24826
--
Edit this bug report at http://bugs.php.net/?id=24826&edit=1