Changeset 47 for trunk/measure_scripts


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:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 
        21config.php
         2.project
  • trunk/measure_scripts/monitor_sample.php

    r39 r47  
    1212
    1313$NetworkState = GetNetworkState();
    14 file_get_contents($Config['AddNewValueUrl'].'?MeasureId=3&Value='.MemoryUsage()); 
     14file_get_contents($Config['AddNewValueUrl'].'?MeasureId=3&Value='.MemoryUsage());
    1515file_get_contents($Config['AddNewValueUrl'].'?MeasureId=4&Value='.CpuUsage());
    1616file_get_contents($Config['AddNewValueUrl'].'?MeasureId=5&Value='.WoWPlayersOnline());
     
    2020file_get_contents($Config['AddNewValueUrl'].'?MeasureId=10&Value='.WoWGMOnline());
    2121file_get_contents($Config['AddNewValueUrl'].'?MeasureId=11&Value='.round($NetworkState['eth1']['DownAverage']));
    22 file_get_contents($Config['AddNewValueUrl'].'?MeasureId=12&Value='.round($NetworkState['eth1']['UpAverage'])); 
     22file_get_contents($Config['AddNewValueUrl'].'?MeasureId=12&Value='.round($NetworkState['eth1']['UpAverage']));
    2323file_get_contents($Config['AddNewValueUrl'].'?MeasureId=13&Value='.WoWCharacterCount());
    2424file_get_contents($Config['AddNewValueUrl'].'?MeasureId=14&Value='.WoWGuildCount());
     
    3131file_put_contents('/tmp/LastNetworkState', serialize($LastNetworkState));
    3232file_put_contents('/tmp/LastCpuUsage', serialize($LastCpuUsage));
    33 
    34 ?>
  • trunk/measure_scripts/system.php

    r39 r47  
    55function ErrorHandler($errno,$errmsg,$filename,$linenum,$vars)
    66{
    7 } 
     7}
    88
    99function CheckPortStatus($Ip, $Port, $Timeout = 0.5)
     
    2424
    2525function Ping($Host = 'nix.cz')
    26 { 
     26{
    2727  exec('ping '.$Host.' -c 1 -W 1|grep time=', $Row);
    2828  // W - timeout in seconds
     
    8585{
    8686  global $LastNetworkState;
    87  
     87
    8888  if(!isset($LastNetworkState)) $LastNetworkState = array();
    8989  $NetworkState = array('Time' => time());
     
    9393  array_shift($Output); // Skip header
    9494  foreach($Output as $Item)
    95   { 
     95  {
    9696    while(strpos($Item, '  ') !== false) $Item = str_replace('  ', ' ', $Item);  // Rrmove multiple spaces
    9797    $Item = explode(':', $Item);
     
    164164  return($UptimeParts[0]);
    165165}
    166 
    167 
    168 ?>
Note: See TracChangeset for help on using the changeset viewer.