Changeset 30 for measure_scripts
- Timestamp:
- Feb 13, 2008, 2:24:11 PM (17 years ago)
- Location:
- measure_scripts
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
measure_scripts/monitor_sample.php
r27 r30 7 7 include('wow.php'); 8 8 9 GetNetworkStat();9 //GetNetworkState(); 10 10 while(1) 11 11 { 12 $NetworkStat = GetNetworkState();12 $NetworkState = GetNetworkState(); 13 13 file_get_contents($Config['AddNewValueUrl'].'?MeasureId=3&Value='.MemoryUsage()); 14 14 file_get_contents($Config['AddNewValueUrl'].'?MeasureId=4&Value='.CpuUsage()); … … 18 18 file_get_contents($Config['AddNewValueUrl'].'?MeasureId=8&Value='.WoWAccountCount()); 19 19 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'])); 22 22 file_get_contents($Config['AddNewValueUrl'].'?MeasureId=13&Value='.WoWCharacterCount()); 23 23 file_get_contents($Config['AddNewValueUrl'].'?MeasureId=14&Value='.WoWGuildCount()); -
measure_scripts/system.php
r27 r30 120 120 { 121 121 $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); 123 123 return(count($Output)); 124 124 } -
measure_scripts/wow.php
r27 r30 10 10 global $Database; 11 11 12 $Database->select_db('realmd'); 12 13 $DbResult = $Database->query('SELECT COUNT(*) FROM account WHERE online=1'); 13 14 $Row = $DbResult->fetch_array(); … … 29 30 global $Database; 30 31 32 $Database->select_db('realmd'); 31 33 $DbResult = $Database->query('SELECT COUNT(*) FROM account'); 32 34 $Row = $DbResult->fetch_array(); … … 34 36 } 35 37 36 function WoWGuild ()38 function WoWGuildCount() 37 39 { 38 40 global $Database; 39 41 42 $Database->select_db('characters'); 40 43 $DbResult = $Database->query('SELECT COUNT(*) FROM guild'); 41 44 $Row = $DbResult->fetch_array(); … … 43 46 } 44 47 45 function WoWCharacter ()48 function WoWCharacterCount() 46 49 { 47 50 global $Database;
Note:
See TracChangeset
for help on using the changeset viewer.