Changeset 30 for measure_scripts


Ignore:
Timestamp:
Feb 13, 2008, 2:24:11 PM (17 years ago)
Author:
george
Message:

Oprava měřících skriptů

Location:
measure_scripts
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • measure_scripts/monitor_sample.php

    r27 r30  
    77include('wow.php');
    88
    9 GetNetworkStat();
     9//GetNetworkState();
    1010while(1)
    1111{
    12   $NetworkStat = GetNetworkState();
     12  $NetworkState = GetNetworkState();
    1313  file_get_contents($Config['AddNewValueUrl'].'?MeasureId=3&Value='.MemoryUsage());
    1414  file_get_contents($Config['AddNewValueUrl'].'?MeasureId=4&Value='.CpuUsage());
     
    1818  file_get_contents($Config['AddNewValueUrl'].'?MeasureId=8&Value='.WoWAccountCount());
    1919  file_get_contents($Config['AddNewValueUrl'].'?MeasureId=10&Value='.WoWGMOnline());
    20   file_get_contents($Config['AddNewValueUrl'].'?MeasureId=11&Value='.round($NetworkStat['eth1']['down_avg']));
    21   file_get_contents($Config['AddNewValueUrl'].'?MeasureId=12&Value='.round($NetworkStat['eth1']['up_avg']));
     20  file_get_contents($Config['AddNewValueUrl'].'?MeasureId=11&Value='.round($NetworkState['eth1']['down_avg']));
     21  file_get_contents($Config['AddNewValueUrl'].'?MeasureId=12&Value='.round($NetworkState['eth1']['up_avg']));
    2222  file_get_contents($Config['AddNewValueUrl'].'?MeasureId=13&Value='.WoWCharacterCount());
    2323  file_get_contents($Config['AddNewValueUrl'].'?MeasureId=14&Value='.WoWGuildCount());
  • measure_scripts/system.php

    r27 r30  
    120120{
    121121  $Output = array();
    122   exec('cat /proc/net/nf_conntrack|grep "dst=192.168.0.14 "|grep "dport=8767 "', $Output);
     122  exec('cat /proc/net/nf_conntrack|grep "dst=192.168.0.14 "|grep "dport=8767 "|grep "ASSURED"', $Output);
    123123  return(count($Output));
    124124}
  • measure_scripts/wow.php

    r27 r30  
    1010  global $Database;
    1111
     12  $Database->select_db('realmd');
    1213  $DbResult = $Database->query('SELECT COUNT(*) FROM account WHERE online=1');
    1314  $Row = $DbResult->fetch_array();
     
    2930  global $Database;
    3031
     32  $Database->select_db('realmd');
    3133  $DbResult = $Database->query('SELECT COUNT(*) FROM account');
    3234  $Row = $DbResult->fetch_array();
     
    3436}
    3537
    36 function WoWGuild()
     38function WoWGuildCount()
    3739{
    3840  global $Database;
    3941 
     42  $Database->select_db('characters');
    4043  $DbResult = $Database->query('SELECT COUNT(*) FROM guild');
    4144  $Row = $DbResult->fetch_array();
     
    4346}
    4447
    45 function WoWCharacter()
     48function WoWCharacterCount()
    4649{
    4750  global $Database;
Note: See TracChangeset for help on using the changeset viewer.