Is there a way to lower the font size or make the page narrower? I have it embedded in my page, but its a little wide for the theme.
I have unfortuantly fixed the widths on tables. Mainly to get that horizontal scroll bar working.
So the only way to get the page to be narrower would be to do some custom alterations to the page.
The reason why I created the page based on a javascript file is so people can make adjustments to the monitor.html page to meet there needs.
If you take out that 'daily' section then narrowing the widths and font sizes would be easier. _________________ dd-wrt eko/V24-K26 15508
Belkin F7D4301
8MB Flash
64MB RAM
Joined: 31 Aug 2009 Posts: 2448 Location: Third Rock from the Sun
Posted: Sun Oct 30, 2011 23:21 Post subject:
When I got everything working it was the 29th, but the usage started on the 1st. It also has not flipped to the 2nd day yet and has been over 24 hours. is this a problem in my config? _________________ Peacock Thread-FAQ -- dd-wrt Wiki
When I got everything working it was the 29th, but the usage started on the 1st. It also has not flipped to the 2nd day yet and has been over 24 hours. is this a problem in my config?
Okay, I looked at previous posts by you and I think I found your config (on the last page)
1. Are you referring to the 'reset' period? Do you expect the data to reset? If this is the case, looking at your config, you have indicated a reset day of 4. If you want this to change on the 1st of each month, then you will need to change it to 1.
NOTE: There is an issue with the current reset method where the next day command is not supported by all routers. I have made a fix to the trunk version ONLY which is still being tested.
2. Daily DATA is not being recorded (All data is being recorded against one day only). You may have accidentally specified this in you config. There is an option to have NO daily data (this was to limit the usage file size etc). If you have this flag set, then the daily data display is not relevant
In you below config, you have indicated NO daily usage (parameter 13 should be 1)
I am using an Asus RT-N16 running 17670 kingkong with OTRW and 2x 2TB USBHDD.
is what i have and is still only doing one day data. The code you have there for me was when i just started and pretty much copied and pasted without knowing what it was. I soon changed it after reading the wiki.
I have also changed my bw_monitor.sh to reflect the trunk, not sure if i got it right.
Code:
#Checks if a reset should occur
#checkReset()
#{
# currentSecond=`expr $(date +%S) + 10`
# currentMinuteSeconds=`expr $(date +%M) '*' 60`
# currentHour=`date +%H`
# currentDay=`date +%d`
#
# currentHourPassedSeconds=`expr $currentSecond + $currentMinuteSeconds`
# nextDay=`date --date='next day' +"%d"`
# nextDay=`expr $nextDay * 1`
# hoursToMidnight=`expr $currentHour - 23`
# if [ $nextDay -eq $_resetDay ] && [ $hoursToMidnight -eq 0 ]; then
# remainingSecondsToReset=`expr $(expr $currentHourPassedSeconds + $_intervalUpdate) - 3600`
# if [ $remainingSecondsToReset -ge 0 ]; then
# sleepInterval=`expr $remainingSecondsToReset - 20`
# if [ $sleepInterval -ge 0 ]; then
# sleep $sleepInterval
# updateUsage
# publishUsage
# fi
# sleepInterval=`expr 62 - $(date +%e)`
# currentDay=`date +%d`
# if [ $currentDay -ne $_resetDay ] && [ $sleepInterval -ge 0 ]; then
# sleep $sleepInterval
# fi
# resetUsage
# fi
# fi
#}
checkReset()
{
#(24 Hours * 60 * 60)-1 = 86400
#(Hour * 60 * 60) + (Minute * 60) + Seconds
secondsUntilNextDay=`expr $(expr $(date +%H) '*' 60 '*' 60) + $(expr $(date +%M) '*' 60) + $(expr $(date +%S))`
secondsUntilNextDay=`expr 86400 - $secondsUntilNextDay`
#Determine next day number and force to numeric
nextDay=`expr $(date --date='next day' +"%d") '*' 1`
if [ $? -ne 0 ]; then
#Attempt another way to determine the next day
nextDay=`expr $(TZ=MST-24 date +%d) '*' 1`
fi
#Determine if next day will be reached before or after update (allow 20 second buffer)
secondsWithUpdateUntilNextDay=`expr $(expr $secondsUntilNextDay - $_intervalUpdate) - 20`
#force reset day to numeric
resetDay=`expr $_resetDay '*' 1`
if [ $nextDay -eq $resetDay ] && [ $secondsWithUpdateUntilNextDay -le 0 ]; then
#wait until next day
currentDay=`expr $(date +%d) '*' 1`
while [ $currentDay -ne $_resetDay ]; do
sleep 1
currentDay=`expr $(date +%d) '*' 1`
done
sleep 5
resetUsage
fi
}
Posted: Thu Nov 03, 2011 0:58 Post subject: How is this installed?
Hello, is this the best software for monitoring user bandwidth consumed per month? Is there documentation on how to install it? There are now 27 pages of posts about the software which is intimidating to try to track down how to begin with it. I found the code on google but I am not certain how to implement it.
So far I have managed to get USB support added to my router, a 32Gb small disk formatted per the Optware package install document and have successfully installed Optware and it is working. I wrongly assumed that the Zabbix option of Optware meant that it would run on the dd-wrt box but I see it is only an agent of Zabbix that is provided.
I currently don't have any Linux servers running nor any hardware that is robust enough to run VMWare so a Zabbix server would not be easy to poof up. That's my situation, a little knowledge with a badge to be dangerous
Joined: 17 Feb 2008 Posts: 46 Location: Anchorage, AK
Posted: Thu Nov 03, 2011 7:34 Post subject: Re: How is this installed?
donphillipe wrote:
Hello, is this the best software for monitoring user bandwidth consumed per month? Is there documentation on how to install it? There are now 27 pages of posts about the software which is intimidating to try to track down how to begin with it. I found the code on google but I am not certain how to implement it.
I also wish someone would create a comprehensive guide including how to integrate bwmon with mypage. I've been wanting to use this great tool for a long time now. _________________ E3000
Firmware: DD-WRT v24-sp2 (02/17/11) big - build 16214
Optware installed
USB powered hub
2TB WD external HDD
4GB Flash Drive
1GB OPT, 2.5GB swap, 2TB data
I have tested a new version 1.2 which covers the next day issue.
I have created a new major version 1.2, and all changes have been checked in (trunk as well) _________________ dd-wrt eko/V24-K26 15508
Belkin F7D4301
8MB Flash
64MB RAM
Now my counter has stopped. All bandwidth stats stuck, and no advance to next day.
I deleted all the files and started over. All works with v1.1
Depending on how you closed it down, there may have been cleanup files still in your tmp folder.
Files called monitor-stop or monitor-stopped will prevent the script from running. Just a matter of checking the tmp folder to make sure they are not there.
Try version 1.2 (actually get the file, dont try and copy and paste segments of code into an existing file). _________________ dd-wrt eko/V24-K26 15508
Belkin F7D4301
8MB Flash
64MB RAM
Joined: 31 Aug 2009 Posts: 2448 Location: Third Rock from the Sun
Posted: Fri Nov 04, 2011 3:54 Post subject:
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? _________________ Peacock Thread-FAQ -- dd-wrt Wiki
Joined: 31 Aug 2009 Posts: 2448 Location: Third Rock from the Sun
Posted: Fri Nov 04, 2011 23:54 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?
Ok I went ahead and inputed 0 for cap and 1 for reset to give it a go. The page displays really big. So I redownloaded everything to make sure i didn't mess anything up and it's the same.
I am only gonna put the url to the image as it is extremely large