1 <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML
4.0//EN'
>
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.
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>
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
)
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;
49 if (fom
.f_nr_crond
.checked
) a
.push('crond');
50 if (fom
.f_nr_dnsmasq
.checked
) a
.push('dnsmasq');
52 if (fom
.f_nr_hotplug2
.checked
) a
.push('hotplug2');
55 if (fom
.f_nr_radvd
.checked
) a
.push('radvd');
57 if (fom
.f_nr_igmprt
.checked
) a
.push('igmprt');
58 fom
.debug_norestart
.value
= a
.join(',');
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>
72 <tr id='body'
><td id='navi'
><script type='text/javascript'
>navi()</script></td>
74 <div id='ident'
><%
ident(); %></div>
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>
90 <script type='text/javascript'
>
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) },
105 { name
: 'f_nr_hotplug2', type
: 'checkbox', suffix
: ' hotplug2<br>', value
: (nvram
.debug_norestart
.indexOf('hotplug2') != -1) },
108 { name
: 'f_nr_radvd', type
: 'checkbox', suffix
: ' radvd<br>', value
: (nvram
.debug_norestart
.indexOf('radvd') != -1) },
110 { name
: 'f_nr_igmprt', type
: 'checkbox', suffix
: ' igmprt<br>', value
: (nvram
.debug_norestart
.indexOf('igmprt') != -1) }
116 » <a href='clearcookies.asp?_http_id=<%
nv(http_id
); %>'
>Clear Cookies
</a><br>
117 » <a href='javascript:nvramCommit()'
>NVRAM Commit
</a><br>
118 » <a href='javascript:reboot()'
>Reboot
</a><br>
119 » <a href='javascript:shutdown()'
>Shutdown
</a><br>
122 » <a href='/cfe/cfe.bin?_http_id=<%
nv(http_id
); %>'
>Download CFE
</a><br>
123 » <a href='/ipt/iptables.txt?_http_id=<%
nv(http_id
); %>'
>Download Iptables Dump
</a><br>
125 » <a href='/ip6t/ip6tables.txt?_http_id=<%
nv(http_id
); %>'
>Download Ip6tables Dump
</a><br>
127 » <a href='/logs/syslog.txt?_http_id=<%
nv(http_id
); %>'
>Download Logs
</a><br>
128 » <a href='/nvram/nvram.txt?_http_id=<%
nv(http_id
); %>'
>Download NVRAM Dump
</a><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
& edit this file before sharing it with
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();'
>