Ignore:
Timestamp:
Dec 31, 2016, 12:57:08 AM (8 years ago)
Author:
chronos
Message:
  • Added: Debian packaging files.
  • Fixed: Use SQL transaction for inserting new network latency values.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/NetworkConfigLinux/Generators/Latency.php

    r824 r842  
    2222    exec('fping -e -r '.$RetryLimit.' -t '.$Timeout.' -a '.implode(' ', $Hosts).' 2>/dev/null', $Output);
    2323
     24    $this->Database->query('BEGIN');
    2425    foreach($Output as $Index => $Line) {
    2526      $IP = substr($Line, 0, strPos($Line, ' '));
     
    2728      $Value = substr($Line, 0, strpos($Line, ' '));
    2829      //echo($IP.' '.$Value."\n");
    29       $this->Database->insert('NetworkInterfaceLatency', array('Interface' => $HostInterface[$IP], 
     30      $this->Database->insert('NetworkInterfaceLatency', array('Interface' => $HostInterface[$IP],
    3031        'Value' => $Value, 'Time' => TimeToMysqlDateTime($Time)));
    3132    }
     33    $this->Database->query('COMMIT');
    3234  }
    3335
Note: See TracChangeset for help on using the changeset viewer.