Joined: 31 Aug 2009 Posts: 2448 Location: Third Rock from the Sun
Posted: Sun Nov 06, 2011 2:54 Post subject:
Dark_Shadow wrote:
FezJay wrote:
Mmmmm
Try version 1.1's monitor.html.
A
nope, same problem. Try FF and IE
Just re-downloaded the monitor.html from 1.1 and 1.2 they are exactly the same. Did they get posted wrong? _________________ Peacock Thread-FAQ -- dd-wrt Wiki
Joined: 31 Aug 2009 Posts: 2448 Location: Third Rock from the Sun
Posted: Fri Nov 11, 2011 1:40 Post subject:
Dark_Shadow wrote:
Dark_Shadow wrote:
FezJay wrote:
Try version 1.2 (actually get the file, dont try and copy and paste segments of code into an existing file).
Got the files downloaded, will give it a shot after work.
A little lost...
Quote:
sed -e 's/src=.*>/src="http:\/\/192.168.xxx.xxx\/user\/user_details.js"><\/script>/' -e 's/[USAGE_CAP]/50/' -e 's/[RESET_DAY]/05/' /opt/bwm/monitor.html > /www/user/monitor.html
1. [USAGE_CAP] = GB MB? And what for no cap, 0?
2. /50/ - Whats this do?
3. [RESET_DAY] = I would assume 1 for the 1st 2 for the 2nd etc..
4. /05/ - Whats this do?
Any help FezJay?
Edit: I found out [RESET_DAY] has to be a 2 digit number. ex.. 01, not 1. Anyway here is a screenshot.
I notice that "Monthly Usage - Daily Breakdown is messed up. the days show below the totals. _________________ Peacock Thread-FAQ -- dd-wrt Wiki
Joined: 31 Aug 2009 Posts: 2448 Location: Third Rock from the Sun
Posted: Mon Nov 14, 2011 3:11 Post subject:
I have messed around with the numbers to no avail. I have also tried to narrow the space between columns as well as get rid of the "Total" lines under each user.
I am just not advanced enough to figure out the code or which part does what.
I would still like to know what those numbers do in the command line.
Hi, a definite linux / WW-DRT programming noob here.
I have been playing around with this monitor for a couple of days and have run into the same problem as Dark_Shadow with the very large display of the monitor page.
For the time being I have worked around this by getting the monitor up and running, then deleting /tmp/www/monitor.html and replacing it with the original. This works fine but does not show the usage cap or reset day. I got around that by hard coding it into the original monitor.html. Not a good approach but it works.
I too would be interested in an explanation od the sed line in the start-up script. In the mean time I'll carry on playing
Posted: Sat Nov 19, 2011 15:18 Post subject: Decoded????
I may have got a handle on the sed line
Firstly, this line of code is only run if there is not a copy of monitor.html in the users directory, in my case /tmp/www
Going to the end of the line:
/[DIR]/monitor.html > /[WWW DIR]/monitor.html
This is the source file and destination file, not sure whether the [DIR] and [WWW DIR] are anything magic that should work automatically so I just changed [DIR] for the location of the original monitor.html file and [WWW DIR] for the destination
In the following, sed will look for an expression in the source file and change it in the destination file.
sed -e 's/src=.*>/src="http:\/\/192.168.1.1\/user\/user_details.js"><\/script>/'
In this case sed looks for a line containing "src=" and replaces it with "src=http:.....etc." In this case just replace 192.168.1.1 with the appropriate address for your setup.
In the next case sed looks for [USAGE_CAP] within the source file and replaces it with what follows, in this case "50" so change "50" for what your cap is.
-e 's/[USAGE_CAP]/50/' -e
Finally, in the source file [RESET_DAY] is replaced with "05" or what ever you replace it with.
's/[RESET_DAY]/05/'
So far all this is theory from reading the sed info I found and hasn't been put to the test.
What still confuses me is what appears to be the inconsistent use of text in square brackets. Sometimes, I believe, it needs to be modified as in the case of [DIR] and [WWW DIR] and at other times it needs to be left as is [RESET_DAY]
Hope the above helps and is not too far off the mark
Posted: Mon Nov 21, 2011 20:26 Post subject: Help guide...
Hello everyone .. I wanted some advice ... I want to integrate this gorgeous monitor in my dd-wrt where I can find a step by step how to do? Thank you all for the help ... _________________ Buffalo WZR-HP-AG300H DD-WRT v24-sp2 (03/19/12) std - build 18777 + modem Digicom combo cx + Nas Synology DS-209 da 2 T + LG DP1W+ APC Back-UPS RS-Power Saving Back-UPS Pro 550 + switch Zyxel Gs105B + http://forum.emulesecurity.net/topic.asp?TOPIC_ID=3441