Changeset 47 for trunk/measure_scripts/system.php
- Timestamp:
- Jul 27, 2014, 9:14:56 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 2 1 config.php 2 .project
-
- Property svn:ignore
-
trunk/measure_scripts/system.php
r39 r47 5 5 function ErrorHandler($errno,$errmsg,$filename,$linenum,$vars) 6 6 { 7 } 7 } 8 8 9 9 function CheckPortStatus($Ip, $Port, $Timeout = 0.5) … … 24 24 25 25 function Ping($Host = 'nix.cz') 26 { 26 { 27 27 exec('ping '.$Host.' -c 1 -W 1|grep time=', $Row); 28 28 // W - timeout in seconds … … 85 85 { 86 86 global $LastNetworkState; 87 87 88 88 if(!isset($LastNetworkState)) $LastNetworkState = array(); 89 89 $NetworkState = array('Time' => time()); … … 93 93 array_shift($Output); // Skip header 94 94 foreach($Output as $Item) 95 { 95 { 96 96 while(strpos($Item, ' ') !== false) $Item = str_replace(' ', ' ', $Item); // Rrmove multiple spaces 97 97 $Item = explode(':', $Item); … … 164 164 return($UptimeParts[0]); 165 165 } 166 167 168 ?>
Note:
See TracChangeset
for help on using the changeset viewer.