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');
51 if (fom
.f_nr_igmprt
.checked
) a
.push('igmprt');
52 fom
.debug_norestart
.value
= a
.join(',');
60 <form id='_fom' method='post' action='tomato.cgi'
>
61 <table id='container' cellspacing=
0>
62 <tr><td colspan=
2 id='header'
>
63 <div class='title'
>Tomato
</div>
64 <div class='version'
>Version <%
version(); %></div>
66 <tr id='body'
><td id='navi'
><script type='text/javascript'
>navi()</script></td>
68 <div id='ident'
><%
ident(); %></div>
72 <input type='hidden' name='_nextpage' value='admin-misc.asp'
>
74 <input type='hidden' name='debug_nocommit'
>
75 <input type='hidden' name='debug_cprintf'
>
76 <input type='hidden' name='debug_cprintf_file'
>
77 <input type='hidden' name='debug_ddns'
>
78 <input type='hidden' name='debug_norestart'
>
79 <input type='hidden' name='t_cafree'
>
80 <input type='hidden' name='t_hidelr'
>
82 <div class='section-title'
>Debugging
</div>
84 <script type='text/javascript'
>
86 for (i
= 1; i
<= 8; ++i
) a
.push([i
, i
]);
87 createFieldTable('', [
88 { title
: 'Avoid performing an NVRAM commit', name
: 'f_debug_nocommit', type
: 'checkbox', value
: nvram
.debug_nocommit
!= '0' },
89 { title
: 'Enable cprintf output to console', name
: 'f_debug_cprintf', type
: 'checkbox', value
: nvram
.debug_cprintf
!= '0' },
90 { title
: 'Enable cprintf output to /tmp/cprintf', name
: 'f_debug_cprintf_file', type
: 'checkbox', value
: nvram
.debug_cprintf_file
!= '0' },
91 { title
: 'Enable DDNS output to /tmp/mdu-*', name
: 'f_debug_ddns', type
: 'checkbox', value
: nvram
.debug_ddns
!= '0' },
92 { title
: 'Count cache memory as free memory', name
: 'f_cafree', type
: 'checkbox', value
: nvram
.t_cafree
== '1' },
93 { title
: 'Avoid displaying LAN to router connections', name
: 'f_hidelr', type
: 'checkbox', value
: nvram
.t_hidelr
== '1' },
94 { title
: 'Console log level', name
: 'console_loglevel', type
: 'select', options
: a
, value
: fixInt(nvram
.console_loglevel
, 1, 8, 1) },
95 { title
: 'Do not restart the following process if they die', multi
: [
96 { name
: 'f_nr_crond', type
: 'checkbox', suffix
: ' crond<br>', value
: (nvram
.debug_norestart
.indexOf('crond') != -1) },
97 { name
: 'f_nr_dnsmasq', type
: 'checkbox', suffix
: ' dnsmasq<br>', value
: (nvram
.debug_norestart
.indexOf('dnsmasq') != -1) },
98 { name
: 'f_nr_igmprt', type
: 'checkbox', suffix
: ' igmprt<br>', value
: (nvram
.debug_norestart
.indexOf('igmprt') != -1) }
104 » <a href='clearcookies.asp?_http_id=<%
nv(http_id
); %>'
>Clear Cookies
</a><br>
105 » <a href='javascript:nvramCommit()'
>NVRAM Commit
</a><br>
106 » <a href='javascript:reboot()'
>Reboot
</a><br>
107 » <a href='javascript:shutdown()'
>Shutdown
</a><br>
110 » <a href='/cfe/cfe.bin?_http_id=<%
nv(http_id
); %>'
>Download CFE
</a><br>
111 » <a href='/ipt/iptables.txt?_http_id=<%
nv(http_id
); %>'
>Download Iptables Dump
</a><br>
112 » <a href='/logs/syslog.txt?_http_id=<%
nv(http_id
); %>'
>Download Logs
</a><br>
113 » <a href='/nvram/nvram.txt?_http_id=<%
nv(http_id
); %>'
>Download NVRAM Dump
</a><br>
116 <div style='width:
80%'
>
117 <b>Warning
</b>: The NVRAM Dump text file may contain information like wireless
118 encryption keys and usernames/passwords for the router, ISP and DDNS. Please
119 review
& edit this file before sharing it with
128 <tr><td id='footer' colspan=
2>
129 <span id='footer-msg'
></span>
130 <input type='button' value='Save' id='save-button' onclick='save()'
>
131 <input type='button' value='Cancel' id='cancel-button' onclick='reloadPage();'
>