Ping : add "round-trip" in awk regex
This commit is contained in:
parent
725787bcf7
commit
1d3a790919
|
@ -12,7 +12,7 @@ else
|
||||||
|
|
||||||
foreach ($hosts as $host)
|
foreach ($hosts as $host)
|
||||||
{
|
{
|
||||||
exec('/bin/ping -qc 1 '.$host.' | awk -F/ \'/^rtt/ { print $5 }\'', $result);
|
exec('/bin/ping -qc 1 '.$host.' | awk -F/ \'/^(rtt|round-trip)/ { print $5 }\'', $result);
|
||||||
|
|
||||||
if (!isset($result[0]))
|
if (!isset($result[0]))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue