I too am using dd-wrt v24 and keep getting a 0 byte file copied to my FTP site. So long as my router stays up, WRTbwlog does seem to report the correct traffic bandwidth, but now all is lost if the router needs to be rebooted. With Comcast now monitoring "excessive usage", it would be good to know where I stand.
Has anybody resolved this issue? Any hints for me to fix this myself?
Has anybody resolved this issue? Any hints for me to fix this myself?
This thread is pretty dead, I'm thinking. I never did find a way to make bwlog work on v24. A slightly less powerful version is already built in to v24 tough -- Status Tab, then WAN tab. What you get on this tab is daily and monthly inbound usage and outbound usage, all stored in NVRam (so no need for crazy ftp setups). It's lacking a few things that I liked from BWlog - it doesn't do threshold alerts, and it doesn't have a 'combined' bandwidth used, but you can easily add the in and out together to get your total used. This seems to be working for me.
There appears to be a problem with tar (among other COMMON linux utilities) in V24 that results in files not being archived properly. The scripts in WRTbwlog are properly invoking all commands properly, but the utilities are not working. Checkout this example:
Code:
root@mercury:/tmp/bwlog# ls -l traffic.cgi; tar -czf blah.tgz traffic.cgi; ls -l blah.tgz
-rwxr-xr-x 1 root root 6331 Jun 17 2006 traffic.cgi
-rw-r--r-- 1 root root 0 Dec 1 00:49 blah.tgz
As you can see the file traffic.cgi clearly has SIZE as reported by ls, but when I attempt to archive it with tar the resulting file has ZERO size. I wish someone from the DD-WRT would help us fix this problem.
Now it works great, except I'm getting the BWData.tgz as a 0byte file for backups -- verified it's -0b on the router as well, not just on the FTP, so it's not the FTP's fault... Can't figure out why it's 0b - it's logging BW usage data, so it seems that /something/ should be in there.
Alright guys... I got backups and everything working as it relates to WRTbwlog and V24 (mega) on a Linksys WRT54GS. I have not tested this package on anything but the aforementioned device. The problem with the package provided previously in this thread (when it comes to V24 (mega)) is that tar compression is broken. For some odd reason you're not able to tar something and gzip it all on the same command line. I went ahead and modified the backup.sh so that the file would first be archived (tar'd) and then compressed (gzip'd) and then renamed properly. It may not be elegant, but it now works properly. Also while fixing this I also fixed a "2 >" towards the bottom that shouldn't have had the space.. so now if you manually execute backup.sh there is no "2: not found" output. Anyhow, I credit all these findings to a user on IRC that goes by the nick of trees*, if it wasn't for him I'd still be slightly lost.
I'm attaching a fully working copy of WRTbwlog to this post, enjoy!
wrtbwlog_fixed.tgz
Description:
Completely working WRTbwlog fixed for V24 (mega) on a Linksys WRT54GS.
Joined: 21 Dec 2008 Posts: 18 Location: Montreal, QC, Canada
Posted: Sun Dec 21, 2008 21:39 Post subject: some updates for bwlog on v24 (should be OK for v23 too!)
pcmike wrote:
Alright guys... I got backups and everything working as it relates to WRTbwlog and V24 (mega) on a Linksys WRT54GS. ... The problem with the package provided previously in this thread (when it comes to V24 (mega)) is that tar compression is broken. For some odd reason you're not able to tar something and gzip it all on the same command line. I went ahead and modified the backup.sh so that the file would first be archived (tar'd) and then compressed (gzip'd) and then renamed properly. It may not be elegant, but it now works properly. ... Anyhow, I credit all these findings to a user on IRC that goes by the nick of trees*, if it wasn't for him I'd still be slightly lost.
I'm attaching a fully working copy of WRTbwlog to this post, enjoy!
Thanks for the tip about Tar + Gzip!
I added to your mods those I already cooked up for other issues I had.
I had modified the custom.sh so the site password configured and saved in .htaccess would survive a reboot of the router.
Also, some files like bwdata.tgz where not cleaned up after use and where bloating the /tmp/bwlog folder (so, router RAM) and where uselessly backed up in a wrtbwlog_cust.tgz when made. Now, those files are removed after copying to their final destinations.
Trying to get this working on dd-wrt.v24-11650_NEWD_std-nokaid_usb.bin. Did everything as wiki page advises. Http demon starts ok and log jobs are running as far as I can tell. But when I go to 192.168.1.1:8000 I see empty page. Literally - the source for webpage is empty. Any suggestions?
Hi guys, sorry to bring up and old subject. I've installed these last two versions one v24 mega and they both are asking for a password when I go to any of the bwlog status screens . It's not the password for the router or other common default passwords I know, so what is it?
Hi guys, sorry to bring up and old subject. I've installed these last two versions one v24 mega and they both are asking for a password when I go to any of the bwlog status screens . It's not the password for the router or other common default passwords I know, so what is it?
Hi kenR. I was trying to find this same thing today. It looks like the root passwd is stored (encrypted) in /tmp/bwlog/.htpasswd. If you replace it with the routers root passwd (also encrypted) from /.htpasswd you should be able to log in.
Anyone know how to make port 8000 accessible from off site? I tried a port 8000 forward to 192.168.1.1, but no dice.
Joined: 07 Jun 2006 Posts: 88 Location: Reston, VA
Posted: Wed Sep 01, 2010 11:00 Post subject:
I'm trying to run bwlog on a WRT160NL. When I try to run mini_httpd, I get the following error:
Code:
./mini_httpd: line 1: syntax error: "(" unexpected
I receive this error using either of the two bwlog packages referenced in the DD-WRT wiki, or with the latest package provided above.
I assume this error is related to the binary version of mini_httpd being compiled for different linux kernel versions (e.g. 2.4 instead of 2.6)?
Does anyone know where I could get a binary of mini_httpd that runs on the WRT160NL?
Also, I notice on the WRL160NL that wl is wl_atheros. Will this throw off any of the data collection scripts? _________________ WZR-HP-AG300H (VA - USA)
2*DIR-825 & 2*WZR-HP-AG600H (VA - USA)
WL500W & WZR-HP-AG600H (MD - USA)
WZR-HP-AG300H & DIR-412 (Nairobi - Kenya)
WRT54GS v3 (Bunia - DRC)