MyPage

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 12:54, 23 December 2009 (edit)
Gi-minni (Talk | contribs)
(Changelog)
← Previous diff
Revision as of 12:57, 23 December 2009 (edit) (undo)
Gi-minni (Talk | contribs)
(Changelog)
Next diff →
Line 68: Line 68:
== Changelog == == Changelog ==
-v0.8-20091223-00047+v0.8-20091223-00047<br>
-|ADD] Added date to the info header - gi-minni+|ADD] Added date to the info header - gi-minni<br>
-[ADD] Add ARP Table to network page - gi-minni+[ADD] Add ARP Table to network page - gi-minni<br>
-[ADD] Router database link added - gi-minni+[ADD] Router database link added - gi-minni<br>
-[ADD] Hostname added to the info header - gi-minni+[ADD] Hostname added to the info header - gi-minni<br>
-[ADD] started to add language support to the refresh button - gi-minni+[ADD] started to add language support to the refresh button - gi-minni<br>
-[ADD] Autorefresh WAN IP enabled in the header - gi-minni+[ADD] Autorefresh WAN IP enabled in the header - gi-minni<br>
-[ADD] Autorefresh uptime enabled in the header - gi-minni+[ADD] Autorefresh uptime enabled in the header - gi-minni<br>
-[ADD] dd-wrt about page added in the header - gi-minni+[ADD] dd-wrt about page added in the header - gi-minni<br>
-[CHG] corrected various typos & bugs - gi-minni+[CHG] corrected various typos & bugs - gi-minni<br>
-v0.7-20091222-00037+v0.7-20091222-00037<br>
-[ADD] Added relevant dd-wrt and svn links - gi-minni+[ADD] Added relevant dd-wrt and svn links - gi-minni<br>
-[CHG] Help information can display multiple links - gi-minni+[CHG] Help information can display multiple links - gi-minni<br>
-[ADD] Version information is showed on each page - gi-minni+[ADD] Version information is showed on each page - gi-minni<br>
-[ADD] inline stylesheet version added - gi-minni+[ADD] inline stylesheet version added - gi-minni<br>
-[ADD] New OPT page shows the installed and available opt packages - gi-minni+[ADD] New OPT page shows the installed and available opt packages - gi-minni<br>
-v0.6-20091221-00033+v0.6-20091221-00033<br>
-[ADD] Help information provided with notes and links - gi-minni+[ADD] Help information provided with notes and links - gi-minni<br>
-[ADD] inline stylesheet added with note and also style - gi-minni+[ADD] inline stylesheet added with note and also style - gi-minni<br>
-v0.5-20091221-00021+v0.5-20091221-00021<br>
-[CHG] Pages are rendered in standard compliance mode (no quirks mode) - gi-minni+[CHG] Pages are rendered in standard compliance mode (no quirks mode) - gi-minni<br>
-[CHG] Page suffix changed to asp - gi-minni+[CHG] Page suffix changed to asp - gi-minni<br>
-[ADD] Driver capabilities is wrapped as token for correct alignment - gi-minni+[ADD] Driver capabilities is wrapped as token for correct alignment - gi-minni<br>
-[CHG] Wireless info depends now on interface read from nvram variable - gi-minni+[CHG] Wireless info depends now on interface read from nvram variable - gi-minni<br>
-[ADD] Help information is showed on each page - gi-minni+[ADD] Help information is showed on each page - gi-minni<br>
-[ADD] Flash information on storage page - gi-minni+[ADD] Flash information on storage page - gi-minni<br>
-[CHG] Every wrapped lines is marked with the raquo symbol - gi-minni+[CHG] Every wrapped lines is marked with the raquo symbol - gi-minni<br>
-v0.4-20091220-00015+v0.4-20091220-00015<br>
-[DEL] Uptime information removed from every page - gi-minni+[DEL] Uptime information removed from every page - gi-minni<br>
-[ADD] Header info reflect actual design - gi-minni+[ADD] Header info reflect actual design - gi-minni<br>
-[ADD] HTML pagetitle reflect actual design - gi-minni+[ADD] HTML pagetitle reflect actual design - gi-minni<br>
-[ADD] Routing table added to network page - gi-minni+[ADD] Routing table added to network page - gi-minni<br>
-[ADD] Domain name server added to network page - gi-minni+[ADD] Domain name server added to network page - gi-minni<br>
-[ADD] Kernel page added and wrapped at pos 75 for correct alignment - gi-minni+[ADD] Kernel page added and wrapped at pos 75 for correct alignment - gi-minni<br>
-[ADD] NVRAM page added and wrapped at pos 75 for correct alignment - gi-minni+[ADD] NVRAM page added and wrapped at pos 75 for correct alignment - gi-minni<br>
-v0.3-20091220-00010+v0.3-20091220-00010<br>
-[ADD] netstat is cutted at pos 75 for correct alignment - gi-minni+[ADD] netstat is cutted at pos 75 for correct alignment - gi-minni<br>
-[ADD] process list is wrapped at pos 75 for correct alignment - gi-minni+[ADD] process list is wrapped at pos 75 for correct alignment - gi-minni<br>
-[NEW] initial version - gi-minni+[NEW] initial version - gi-minni<br>

Revision as of 12:57, 23 December 2009

Contents

Introduction

The main advantage to expand the DD-WRT web interface with your own scripts is the ability to quickly see what happens with your router without opening an ssh or telnet shell and thinking around which command must be executed to see some useful results.

Many of us that use DD-WRT aren't linux aware, so it is great to have the most useful linux command executed inside a web page, just clicking a tab away.

This is possible by using the NVRAM variable mypage_scripts. Usually this variable is empty and normally you don't care about it. In this case you must set this variable to be able to see the scripts inside the web interface.

Please read carefully the next sections to understand what are the prerequisite needed and how to install and configure this pages.

Prerequisite

Look at the syntax of some useful linux commands. (See Useful Scripts)

Look how to use telnet or ssh client. (See Telnet/SSH)

Look how to setup the NVRAM variable. (See Hardware)

Requirements

The scheme of mypage_scripts is:

mypage_scripts="</storage/www/page[1]> </storage/www/page[2]> ... </storage/www/page[n-1]> </storage/www/page[n]>"

Exchange storage with your underlying filesystem /jffs, /mmc, /mnt, ...

Currently there are seven scripts names MyPage1.asp, ..., MyPage7.asp.

MyPage1.asp is named Main. This script displays different information about your device like device name, firmware, kernel version, memory, running processes, CPU and loaded drivers.

MyPage2.asp is named WLAN. This script displays some wireless info like driver core, interface, status, version and capabilities.

MyPage3.asp is named Storage. This script displays all information about the partition/disk in use like internal/external disks and flash.

MyPage4.asp is named Network. This script displays network related stuff like open ports, interfaces, routing table, arp table and domain name server

MyPage5.asp is named Kernel. This scripts shows all the kernel messages emitted during the booting time of your device.

MyPage6.asp is named NVRAM. This scripts shows all the variables stored inside the NVRAM space.

MyPage7.asp is named OPT. This scripts shows all the installed and available software packages from OPTware.

Installation

Download the tgz file from the download section and find a useful place where to store it. In my case I store the file under /opt/www. This directory is a symlink to /jffs/opt/www.

You can choose another place, depending which filesystem you own. (SD,MMC,USB,CIFS)

Extract the file with:

tar -xvzf mypage-files-v0.8-20091223-00047.tgz

Set the executable flags with:

chmod 755 MyPage*

Root must own the files with:

chown root.root MyPage*

In your target directory there must be one logfile and seven aspfiles.

Configuration

To set the nvram variable login into your device using telnet or ssh and at the command line execute:

nvram set mypage-scripts="/jffs/opt/www/MyPage1.asp /jffs/opt/www/MyPage2.asp /jffs/opt/www/MyPage3.asp /jffs/opt/www/MyPage4.asp /jffs/opt/www/MyPage5.asp /jffs/opt/www/MyPage6.asp /jffs/opt/www/MyPage7.asp"

Don't forget to make the changes persistent with:

nvram commit

Download

Screenshots

Changelog

v0.8-20091223-00047
|ADD] Added date to the info header - gi-minni
[ADD] Add ARP Table to network page - gi-minni
[ADD] Router database link added - gi-minni
[ADD] Hostname added to the info header - gi-minni
[ADD] started to add language support to the refresh button - gi-minni
[ADD] Autorefresh WAN IP enabled in the header - gi-minni
[ADD] Autorefresh uptime enabled in the header - gi-minni
[ADD] dd-wrt about page added in the header - gi-minni
[CHG] corrected various typos & bugs - gi-minni

v0.7-20091222-00037
[ADD] Added relevant dd-wrt and svn links - gi-minni
[CHG] Help information can display multiple links - gi-minni
[ADD] Version information is showed on each page - gi-minni
[ADD] inline stylesheet version added - gi-minni
[ADD] New OPT page shows the installed and available opt packages - gi-minni

v0.6-20091221-00033
[ADD] Help information provided with notes and links - gi-minni
[ADD] inline stylesheet added with note and also style - gi-minni

v0.5-20091221-00021
[CHG] Pages are rendered in standard compliance mode (no quirks mode) - gi-minni
[CHG] Page suffix changed to asp - gi-minni
[ADD] Driver capabilities is wrapped as token for correct alignment - gi-minni
[CHG] Wireless info depends now on interface read from nvram variable - gi-minni
[ADD] Help information is showed on each page - gi-minni
[ADD] Flash information on storage page - gi-minni
[CHG] Every wrapped lines is marked with the raquo symbol - gi-minni

v0.4-20091220-00015
[DEL] Uptime information removed from every page - gi-minni
[ADD] Header info reflect actual design - gi-minni
[ADD] HTML pagetitle reflect actual design - gi-minni
[ADD] Routing table added to network page - gi-minni
[ADD] Domain name server added to network page - gi-minni
[ADD] Kernel page added and wrapped at pos 75 for correct alignment - gi-minni
[ADD] NVRAM page added and wrapped at pos 75 for correct alignment - gi-minni

v0.3-20091220-00010
[ADD] netstat is cutted at pos 75 for correct alignment - gi-minni
[ADD] process list is wrapped at pos 75 for correct alignment - gi-minni
[NEW] initial version - gi-minni