- Timestamp:
- Nov 3, 2008, 7:48:12 PM (16 years ago)
- Location:
- system
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
system/bandwidth2.php
r103 r111 17 17 { 18 18 $Output = array(); 19 exec(' iptables -t mangle -L '.$Table.' -v -x -n', $Output);19 exec('/sbin/iptables -t mangle -L '.$Table.' -v -x -n', $Output); 20 20 array_shift($Output); 21 21 array_shift($Output); … … 61 61 //$Hosts[$HostIp]['ports'] = array(); 62 62 $Output2 = array(); 63 exec(' iptables -t mangle -L '.$SubTable.' -v -x -n', $Output2);63 exec('/sbin/iptables -t mangle -L '.$SubTable.' -v -x -n', $Output2); 64 64 array_shift($Output2); 65 65 array_shift($Output2); -
system/generators/dhcp_routerboard.php
r103 r111 24 24 $Commands = array(); 25 25 //$MaxSubnet = 1; 26 for($i = 1; $i <= 4; $i++) 26 $Commands[] = '/ip dhcp-server lease { remove [find]}'; 27 for($i = 0; $i <= 5; $i++) 27 28 { 28 29 /* … … 35 36 while($Row = $DbResult->fetch_array()) 36 37 { 37 $Data = $Row['name'];38 if(strlen($Data) < 9) $Data .= "\t";38 // $Data = $Row['name']; 39 // if(strlen($Data) < 9) $Data .= "\t"; 39 40 // fputs($File, " host ".$Data."\t{ fixed-address ".$Row['IP'].";\thardware ethernet ".$Row['MAC']."; }\n"); 40 $Commands[] = '/ip dhcp-server lease remove [/ip dhcp-server lease find mac-address='.$Row['MAC'].']';41 41 $Commands[] = '/ip dhcp-server lease add mac-address='.$Row['MAC'].' address='.$Row['IP'].' server=dhcp'.$i.' comment='.$Row['name']; 42 42 } … … 46 46 //fclose($File); 47 47 $Commands = implode(';', $Commands); 48 $Command = '/usr/bin/ssh -l admin-ssh -i /root/.ssh/id_dsa rt-hajda- 5"'.$Commands.'"';48 $Command = '/usr/bin/ssh -l admin-ssh -i /root/.ssh/id_dsa rt-hajda-0 "'.$Commands.'"'; 49 49 echo($Command); 50 50 exec($Command, $Output); -
system/generators/netwatch.php
r103 r111 5 5 //$MaxSubnet = 1; 6 6 $Commands[] = '/tool netwatch remove [/tool netwatch find]'; 7 for($i = 0; $i <= 4; $i++)8 {9 $DbResult = $Database->select('hosts', '*', "IP LIKE '192.168.".$i."%' ORDER BY IP");7 //for($i = 0; $i <= 4; $i++) 8 //{ 9 $DbResult = $Database->select('hosts', '*', 'IP != "" ORDER BY IP'); 10 10 while($Row = $DbResult->fetch_array()) 11 11 { 12 12 $Commands[] = '/tool netwatch add host='.$Row['IP'].' interval=1m comment='.$Row['name']; 13 13 } 14 }14 //} 15 15 $Commands = implode(';', $Commands); 16 $Command = '/usr/bin/ssh -l admin-ssh -i /root/.ssh/id_dsa rt-hajda- 5"'.$Commands.'"';16 $Command = '/usr/bin/ssh -l admin-ssh -i /root/.ssh/id_dsa rt-hajda-0 "'.$Commands.'"'; 17 17 echo($Command); 18 18 exec($Command, $Output); -
system/generators/traffic_shaping.php
r103 r111 23 23 $VoipSpeedIn = 100; //$SpeedReserve; 24 24 $VoipSpeedOut = 100; //$SpeedReserve; 25 $FreeInetSpeed = 64; 25 26 26 27 … … 50 51 fputs($File, "/sbin/tc class add dev imq0 parent 1:0 classid 1:1 htb rate ".$TotalMaxSpeedIn."kbit quantum 1500\n"); 51 52 fputs($FileClassInfo, "1:2 Internet zdarma\n"); 52 fputs($File, "/sbin/tc class add dev imq0 parent 1:1 classid 1:".$FreeInetClass." htb rate 32kbit prio 3 quantum 1500\n");53 fputs($File, "/sbin/tc class add dev imq0 parent 1:1 classid 1:".$FreeInetClass." htb rate ".$FreeInetSpeed."kbit prio 3 quantum 1500\n"); 53 54 fputs($File, "/sbin/tc qdisc add dev imq0 parent 1:".$FreeInetClass." handle ".$FreeInetClass.": sfq perturb 10\n"); 54 55 } … … 59 60 fputs($File, "/sbin/tc qdisc add dev imq1 root handle 1:0 htb default 2\n"); 60 61 fputs($File, "/sbin/tc class add dev imq1 parent 1:0 classid 1:1 htb rate ".$TotalMaxSpeedOut."kbit quantum 1500\n"); 61 fputs($File, "/sbin/tc class add dev imq1 parent 1:1 classid 1:".$FreeInetClass." htb rate 32kbit prio 3 quantum 1500\n");62 fputs($File, "/sbin/tc class add dev imq1 parent 1:1 classid 1:".$FreeInetClass." htb rate ".$FreeInetSpeed."kbit prio 3 quantum 1500\n"); 62 63 fputs($File, "/sbin/tc qdisc add dev imq1 parent 1:".$FreeInetClass." handle ".$FreeInetClass.": sfq perturb 10\n"); 63 64 } -
system/netwatch_import.php
r103 r111 8 8 $Commands[] = '/tool netwatch print terse'; 9 9 $Commands = implode(';', $Commands); 10 $Command = '/usr/bin/ssh -l admin-ssh -i /root/.ssh/id_dsa rt-hajda- 5"'.$Commands.'"';10 $Command = '/usr/bin/ssh -l admin-ssh -i /root/.ssh/id_dsa rt-hajda-0 "'.$Commands.'"'; 11 11 //echo($Command."\n"); 12 12 exec($Command, $Output); -
system/statistic/traffic.php
r37 r111 186 186 'inet_down' => $NetworkStat['eth1']['down_avg'], 'inet_up' => $NetworkStat['eth1']['up_avg'], 187 187 'eth0_down' => $NetworkStat['eth0']['down_avg'], 'eth0_up' => $NetworkStat['eth0']['up_avg'], 188 'wlan0_down' => $NetworkStat['wlan0']['down_avg'], 'wlan0_up' => $NetworkStat['wlan0']['up_avg'],189 'wlan1_down' => $NetworkStat['wlan1']['down_avg'], 'wlan1_up' => $NetworkStat['wlan1']['up_avg'],190 'wlan2_down' => $NetworkStat['wlan2']['down_avg'], 'wlan2_up' => $NetworkStat['wlan2']['up_avg'],188 // 'wlan0_down' => $NetworkStat['wlan0']['down_avg'], 'wlan0_up' => $NetworkStat['wlan0']['up_avg'], 189 // 'wlan1_down' => $NetworkStat['wlan1']['down_avg'], 'wlan1_up' => $NetworkStat['wlan1']['up_avg'], 190 // 'wlan2_down' => $NetworkStat['wlan2']['down_avg'], 'wlan2_up' => $NetworkStat['wlan2']['up_avg'], 191 191 'eth2_down' => $NetworkStat['eth2']['down_avg'], 'eth2_up' => $NetworkStat['eth2']['up_avg']); 192 192 $Database->insert('traffic', $NewItem);
Note:
See TracChangeset
for help on using the changeset viewer.