Changeset 852 for trunk/Modules/NetworkConfigLinux/Generators/Latency.php
- Timestamp:
- Oct 25, 2017, 10:55:05 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkConfigLinux/Generators/Latency.php
r842 r852 22 22 exec('fping -e -r '.$RetryLimit.' -t '.$Timeout.' -a '.implode(' ', $Hosts).' 2>/dev/null', $Output); 23 23 24 $this->Database->query('BEGIN'); 25 foreach($Output as $Index => $Line) { 24 $Queries = array(); 25 foreach($Output as $Index => $Line) 26 { 26 27 $IP = substr($Line, 0, strPos($Line, ' ')); 27 28 $Line = substr($Line, strpos($Line, '(') + 1); 28 29 $Value = substr($Line, 0, strpos($Line, ' ')); 29 30 //echo($IP.' '.$Value."\n"); 30 $ this->Database->insert('NetworkInterfaceLatency', array('Interface' => $HostInterface[$IP],31 $Queries[] = $this->Database->GetInsert('NetworkInterfaceLatency', array('Interface' => $HostInterface[$IP], 31 32 'Value' => $Value, 'Time' => TimeToMysqlDateTime($Time))); 32 33 } 33 $this->Database-> query('COMMIT');34 $this->Database->Transaction($Queries); 34 35 } 35 36
Note:
See TracChangeset
for help on using the changeset viewer.