random findings by wt8008
RSS icon Home icon
  • Tomato CIFS Bandwidth Logs Backup

    Posted on August 4th, 2009 wt8008 No comments

    As seen from my previous post, I have moved to Tomato firmware for my router. A feature that caught my eye was the ability to save bandwidth logs to CIFS (Samba shares). My ISP does not have any monthly bandwidth limitations, but I know some others in my area does, and this feature would be a must have for them. By default the bandwidth history is saved in RAM, and if the power goes out, then all the logs will be lost.

    On my Linux server, I created a new user (adduser(1)) with a default shell of /bin/false (/etc/passwd), and also a corresponding samba user (smbpasswd(1)). I configured the Samba share for that user with

    [tomato]
    path = /home/tomato
    public = no
    writeable = yes
    also, the server's global setting requires a security level of user
    [global]
    ...
    security = user

    On the router in Administration->CIFS Client, enable cifs1, for the UNC enter in the IP address, and share name. Do not use the hostname of the system.

    \\192.168.1.5\shared_example

    also enter in the username and password of the samba account that was created above. Hit save to mount the share, and after the 10 second countdown, you’ll see the total size of the mount, and the free space left.

    Now to enable the remote log saving. In Administration->Bandwidth Monitoring, change the save location to CIFS. I used the Create New File for the first time running it, but I am not sure if that option is necessary. Hit Save, and go to your share and see the backup log. The monthly start date can also be adjusted, for those who need to monitor monthly usage based upon an arbitrary day.

    Reference: http://www.wi-fiplanet.com/tutorials/article.php/3794171