Bandwidth - Traffic monitor

Discussion in 'Tomato Firmware' started by Daky, Oct 25, 2012.

  1. Daky

    Daky Network Guru Member


    Is it possible to save data \ backups for bandwdith\traffic monitor on mounted HDD?

    I have it on CIFS now, but i would like to have it on external mounted HDD.

    No idea how to accomplish this, please advise.

  2. Daky

    Daky Network Guru Member

    any1 please?

  3. leandroong

    leandroong LI Guru Member

    yes, Administration->Bandwith Monitoring
  4. Daky

    Daky Network Guru Member

    But how?

    Should i set it to custom path? what the path should be then?

  5. Monk E. Boy

    Monk E. Boy Network Guru Member

    Yes, set it to custom path, then choose a valid path to your external drive. Under USB & NAS, look in USB Support, and all the way down at the bottom it'll show you a list of volumes the router knows about and what path they're mounted to.

    For example:
    Partition 'Data' ext3 (3,305.19 MB / 3,237.70 MB free) is mounted on /tmp/mnt/Data

    So this USB device has a partition called "Data", the type is ext3, and it's mounted to /tmp/mnt/Data.

    So I would type /tmp/mnt/Data/ as a custom path.

    If you want to create a folder for bwmon (I would, since it can create a few files if you have it maintaining backups), you'll need to create it before typing the path into Tomato. So, in my example, I use /tmp/mnt/Data/bwmon/ for the path.
    Daky likes this.
  6. Daky

    Daky Network Guru Member

    Thank you for your time guys.

    I actually attached old micro usb i would like to use for statistics only.

    It is mounted like:

    so, i should use /tmp/mnt/sda1/bwstats ?

    This stick is formated as NTFS, will it work?

    Is there a way to access data on stick from tomato interface?

  7. Daky

    Daky Network Guru Member


    Should this be good?

    In case i remove stick and put it back (mount) all should be there?

  8. Monk E. Boy

    Monk E. Boy Network Guru Member

    If you are familiar with a Linux command shell, you can access the router over telnet or ssh. You could create the folders that way, although if you're unfamiliar with command line access then it'd probably be easier to just pull the flash drive and create the folders using your PC. Another alternative would be to enable file sharing and access the volume over SMB/CIFS from your PC.

    Remember to put a trailing /, otherwise Linux may treat it like a file instead of a folder. In one particular instance, under logging, you need to specify a file and not a folder if you want to write the generic system log to a custom path, but otherwise you should use a trailing slash.

    So long as you unmount the drive cleanly (through USB and NAS) or, at the very least, don't pull the drive while it's in the middle of writing data, it should mount back to the same spot and the system should (in theory) pick up where it left off.

    I'm not sure if bwmon, etc. will care about the drive being yanked while it's got an open handle on the drive, you may have to toggle bwmon, etc. off/on to re-establish that handle after re-mounting the drive... or maybe not, it all depends on how they're handling saving. With writes happening on a timed basis it may not maintain an open lock on the files in that directory. Normally I just leave drives attached 24/7 and copy files to/from the router itself without disconnecting them to avoid data corruption problems.

    I will say this, that because you don't have a volume label, if you unplug the drive and then plug it into a different USB port, it will get a different path. On routers with two ports, at least the ones I've used, one port is sda and the other port is sdb. So if you plugged the drive into the other port it would result in your path changing to /tmp/mnt/sdb1. If you label the drive then the path will change to /tmp/mnt/LabelName no matter which port you plug it into. I'm not sure if NTFS labels are recognized this way, I would expect they would be, but I know FAT32 labels are. And, of course, labels on Linux volumes like ext2 & ext3 are recognized as well, but it's not always easy to mount those on a Windows PC.
    Daky likes this.
  9. Daky

    Daky Network Guru Member

    Thank you very much!!!
  10. Daky

    Daky Network Guru Member

    I just noticed this:

    Oct 26 12:07:42 home-router sd-idle[396]: spinning up /dev/sda after 45 mins 2 secs
    Oct 26 12:22:43 home-router sd-idle[396]: spinning down /dev/sda after 15 mins 1 secs

    sda is my usb stick, it doesn't spin?:)

    root@home-router:/tmp/mnt# ls -l
    drwxrwxrwx 1 root root 4096 Oct 25 19:44 sda1

    Please advise
  11. Daky

    Daky Network Guru Member

    Never mind, i had option for spinning down enabled.

  12. Monk E. Boy

    Monk E. Boy Network Guru Member

    Yeah, I've always wondered what setting you're supposed to choose if you have both HDs and flash drives connected to the router. :)
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice