Ignore:
Timestamp:
Jul 27, 2014, 9:14:56 PM (10 years ago)
Author:
chronos
Message:
  • Odstraněno: Zbytečná PHP ukončovací značka "?>" z konce všech souborů.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 
        21config.php
         2.project
  • trunk/Application/Model/Measurement/System.php

    r44 r47  
    2424
    2525  function Ping($Host = 'nix.cz')
    26   { 
     26  {
     27    $Row = array();
    2728    exec('ping '.$Host.' -c 1 -W 1|grep time=', $Row);
    2829    // W - timeout in seconds
     
    5556    $LastCpuUsage = unserialize(file_get_contents($CpuStateFileName));
    5657    //$cpuIDLEprev, $cpuSYSTprev, $cpuUSERprev;
    57  
     58
    5859    // get processor usage seconds for pct stats ###
    5960    $File = fopen('/proc/stat', 'r');
     
    6970    $CpuUsageDiffTotal = (($CpuUsageDiff['User'] + $CpuUsageDiff['System']) + $CpuUsageDiff['Idle']);
    7071    if ($CpuUsageDiffTotal > 0)
    71     { 
     72    {
    7273      $CpuUsagePercent['User'] = ($CpuUsageDiff['User'] / $CpuUsageDiffTotal) * 100;
    7374      $CpuUsagePercent['System'] = ($CpuUsageDiff['System'] / $CpuUsageDiffTotal) * 100;
     
    9394    array_shift($Output); // Skip header
    9495    foreach($Output as $Item)
    95     { 
     96    {
    9697      while(strpos($Item, '  ') !== false) $Item = str_replace('  ', ' ', $Item);  // Rrmove multiple spaces
    9798      $Item = explode(':', $Item);
     
    108109        $NetworkState[$Interface]['DownAverage'] = 0;
    109110        $NetworkState[$Interface]['UpAverage'] = 0;
    110       } 
     111      }
    111112      if($NetworkState[$Interface]['DownAverage'] < 0) $NetworkState[$Interface]['DownAverage'] = 0;
    112113      if($NetworkState[$Interface]['UpAverage'] < 0) $NetworkState[$Interface]['UpAverage'] = 0;
     
    121122    return($NetworkState['Interface']['DownAverage']);
    122123  }
    123  
     124
    124125  function NetworkSpeedUpload($Interface)
    125126  {
     
    177178  }
    178179}
    179 
    180 ?>
Note: See TracChangeset for help on using the changeset viewer.