BWM and static ARP optimizations
[tomato.git] / release / src / router / www / admin-debug.asp
blob30c9c2feca76d342b1b98bacc5e4924a7622cb3c
1 <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0//EN'>
2 <!--
3 Tomato GUI
4 Copyright (C) 2006-2010 Jonathan Zarate
5 http://www.polarcloud.com/tomato/
7 For use with Tomato Firmware only.
8 No part of this file may be used without permission.
9 -->
10 <html>
11 <head>
12 <meta http-equiv='content-type' content='text/html;charset=utf-8'>
13 <meta name='robots' content='noindex,nofollow'>
14 <title>[<% ident(); %>] Admin: Debugging</title>
15 <link rel='stylesheet' type='text/css' href='tomato.css'>
16 <link rel='stylesheet' type='text/css' href='color.css'>
17 <script type='text/javascript' src='tomato.js'></script>
19 <!-- / / / -->
21 <script type='text/javascript' src='debug.js'></script>
23 <script type='text/javascript'>
25 // <% nvram("debug_nocommit,debug_cprintf,debug_cprintf_file,console_loglevel,t_cafree,t_hidelr,debug_ddns,debug_norestart"); %>
27 function nvramCommit()
29 fields.disableAll('_fom', 1);
30 form.submitHidden('nvcommit.cgi', { '_nextpage': myName() });
33 function verifyFields(focused, quiet)
35 return 1;
38 function save()
40 var fom = E('_fom');
41 fom.debug_nocommit.value = fom.f_debug_nocommit.checked ? 1 : 0;
42 fom.debug_cprintf.value = fom.f_debug_cprintf.checked ? 1 : 0;
43 fom.debug_cprintf_file.value = fom.f_debug_cprintf_file.checked ? 1 : 0;
44 fom.t_cafree.value = fom.f_cafree.checked ? 1 : 0;
45 fom.t_hidelr.value = fom.f_hidelr.checked ? 1 : 0;
46 fom.debug_ddns.value = fom.f_debug_ddns.checked ? 1 : 0;
48 var a = [];
49 if (fom.f_nr_crond.checked) a.push('crond');
50 if (fom.f_nr_dnsmasq.checked) a.push('dnsmasq');
51 /* LINUX26-BEGIN */
52 if (fom.f_nr_hotplug2.checked) a.push('hotplug2');
53 /* LINUX26-END */
54 /* IPV6-BEGIN */
55 if (fom.f_nr_radvd.checked) a.push('radvd');
56 /* IPV6-END */
57 if (fom.f_nr_igmprt.checked) a.push('igmprt');
58 fom.debug_norestart.value = a.join(',');
60 form.submit(fom, 1);
62 </script>
64 </head>
65 <body>
66 <form id='_fom' method='post' action='tomato.cgi'>
67 <table id='container' cellspacing=0>
68 <tr><td colspan=2 id='header'>
69 <div class='title'>Tomato</div>
70 <div class='version'>Version <% version(); %></div>
71 </td></tr>
72 <tr id='body'><td id='navi'><script type='text/javascript'>navi()</script></td>
73 <td id='content'>
74 <div id='ident'><% ident(); %></div>
76 <!-- / / / -->
78 <input type='hidden' name='_nextpage' value='admin-misc.asp'>
80 <input type='hidden' name='debug_nocommit'>
81 <input type='hidden' name='debug_cprintf'>
82 <input type='hidden' name='debug_cprintf_file'>
83 <input type='hidden' name='debug_ddns'>
84 <input type='hidden' name='debug_norestart'>
85 <input type='hidden' name='t_cafree'>
86 <input type='hidden' name='t_hidelr'>
88 <div class='section-title'>Debugging</div>
89 <div class='section'>
90 <script type='text/javascript'>
91 a = [];
92 for (i = 1; i <= 8; ++i) a.push([i, i]);
93 createFieldTable('', [
94 { title: 'Avoid performing an NVRAM commit', name: 'f_debug_nocommit', type: 'checkbox', value: nvram.debug_nocommit != '0' },
95 { title: 'Enable cprintf output to console', name: 'f_debug_cprintf', type: 'checkbox', value: nvram.debug_cprintf != '0' },
96 { title: 'Enable cprintf output to /tmp/cprintf', name: 'f_debug_cprintf_file', type: 'checkbox', value: nvram.debug_cprintf_file != '0' },
97 { title: 'Enable DDNS output to /tmp/mdu-*', name: 'f_debug_ddns', type: 'checkbox', value: nvram.debug_ddns != '0' },
98 { title: 'Count cache memory and buffers as free memory', name: 'f_cafree', type: 'checkbox', value: nvram.t_cafree == '1' },
99 { title: 'Avoid displaying LAN to router connections', name: 'f_hidelr', type: 'checkbox', value: nvram.t_hidelr == '1' },
100 { title: 'Console log level', name: 'console_loglevel', type: 'select', options: a, value: fixInt(nvram.console_loglevel, 1, 8, 1) },
101 { title: 'Do not restart the following process if they die', multi: [
102 { name: 'f_nr_crond', type: 'checkbox', suffix: ' crond<br>', value: (nvram.debug_norestart.indexOf('crond') != -1) },
103 { name: 'f_nr_dnsmasq', type: 'checkbox', suffix: ' dnsmasq<br>', value: (nvram.debug_norestart.indexOf('dnsmasq') != -1) },
104 /* LINUX26-BEGIN */
105 { name: 'f_nr_hotplug2', type: 'checkbox', suffix: ' hotplug2<br>', value: (nvram.debug_norestart.indexOf('hotplug2') != -1) },
106 /* LINUX26-END */
107 /* IPV6-BEGIN */
108 { name: 'f_nr_radvd', type: 'checkbox', suffix: ' radvd<br>', value: (nvram.debug_norestart.indexOf('radvd') != -1) },
109 /* IPV6-END */
110 { name: 'f_nr_igmprt', type: 'checkbox', suffix: ' igmprt<br>', value: (nvram.debug_norestart.indexOf('igmprt') != -1) }
113 </script>
114 <br><br>
116 &raquo; <a href='clearcookies.asp?_http_id=<% nv(http_id); %>'>Clear Cookies</a><br>
117 &raquo; <a href='javascript:nvramCommit()'>NVRAM Commit</a><br>
118 &raquo; <a href='javascript:reboot()'>Reboot</a><br>
119 &raquo; <a href='javascript:shutdown()'>Shutdown</a><br>
120 <br><br>
122 &raquo; <a href='/cfe/cfe.bin?_http_id=<% nv(http_id); %>'>Download CFE</a><br>
123 &raquo; <a href='/ipt/iptables.txt?_http_id=<% nv(http_id); %>'>Download Iptables Dump</a><br>
124 <!-- IPV6-BEGIN -->
125 &raquo; <a href='/ip6t/ip6tables.txt?_http_id=<% nv(http_id); %>'>Download Ip6tables Dump</a><br>
126 <!-- IPV6-END -->
127 &raquo; <a href='/logs/syslog.txt?_http_id=<% nv(http_id); %>'>Download Logs</a><br>
128 &raquo; <a href='/nvram/nvram.txt?_http_id=<% nv(http_id); %>'>Download NVRAM Dump</a><br>
129 <br>
131 <div style='width:80%'>
132 <b>Warning</b>: The NVRAM Dump text file may contain information like wireless
133 encryption keys and usernames/passwords for the router, ISP and DDNS. Please
134 review &amp; edit this file before sharing it with
135 anyone.<br>
136 </div>
138 </div>
140 <!-- / / / -->
142 </td></tr>
143 <tr><td id='footer' colspan=2>
144 <span id='footer-msg'></span>
145 <input type='button' value='Save' id='save-button' onclick='save()'>
146 <input type='button' value='Cancel' id='cancel-button' onclick='reloadPage();'>
147 </td></tr>
148 </table>
149 </form>
150 </body>
151 </html>