1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

saving rstats to CIFS volume

Discussion in 'Tomato Firmware' started by luckman212, Dec 15, 2006.

  1. luckman212

    luckman212 LI Guru Member

    hi I have enabled a CIFS share on my Tomato 1.01 and it mounts my NAS volume to store rstats. I wish to collect as much history as possible so I can go back and review bandwidth usage days, weeks, months later etc. I have enabled the CIFS share and configured Tomato to save the rstats every 4hrs to the CIFS 1 share. I do see that there is a file there like "tomato_rstats_001601115784.gz".

    this file is only ever 1kb in size, even after several days. It seems the file is being overwritten instead of appended to, or adding new files. There is plenty of space on my NAS (1.4 Terabytes free) so I am wondering why its not saving cumulative stats.

    Here are some screenshots of my settings.....
    [​IMG] [​IMG] [​IMG]

    am I doing something wrong?
     
  2. _splat_

    _splat_ Network Guru Member

    Your file is not 1kb in size, its 63 Bytes.
    It just needs 1kb (1024bytes) on your HDD because of cluster size.

    I`am saving the stats of my router to a CIFS too. My file is at 192bytes.

    The Windows explorer shows "1kb" until the file will get bigger than 1kb. Iam using Directory-Opus as File explorer and it shows me the real size in bytes.

    So i think its all working :)
     
  3. wycf

    wycf Network Guru Member

    Could you open this file to see what's inside? How do you use the data saved to show history? Do you need some special program to view the data or shows as graphic?

    I havn't done this and I am planing to so soon.

    :)
     
  4. GeeTek

    GeeTek Guest

    Were your screen shots taken at the same time ? Your second Tomato shot indicates that the temp directory contains 187.84 Gb of data, but your computer screen shot lists only the 1 tiny gz file.
     
  5. _splat_

    _splat_ Network Guru Member

    @GeeTek
    Maybe Tomato shows the total and Free space of the entire Harddisk, not just of the Temp directory ;)
     
  6. luckman212

    luckman212 LI Guru Member

    the 180+ gb is taken by other directories in the NAS. the /temp dir is empty but there are other dirs that have lots of stuff in them.

    as far as the contents of the .gz file, I opened it in WinRAR... inside I found 1 file, "tomato_rstats_001601115784". I tried opening in Notepad, and it was jibberish.

    I opened it next in my HEX editor. I found mostly 0000's with an occasional sprinkle of data.... like this:

    [​IMG]

    not sure what it means... I guess I will wait more days and see if the file builds. Not sure what to do with these files either.. I guess I assumed that Tomato will "read" them as needed when clicking on the "Daily" or "Monthly" bandwidth links from the GUI. Is that not what it does?? :confused:
     
  7. GeeTek

    GeeTek Guest


    That is not possible. It considers the shared directory to be the entire drive. It is not aware of what is outside of the shared folder.

    Edit - Maybe I need to stop running my mouth about something I have not yet tried. Sorry ! I need to do long term logging as well. I'll get mine configured and post back If I find something relevant.
     
  8. _splat_

    _splat_ Network Guru Member

    @GeeTek
    I have created a windows share named \\192.168.0.3\Router-stats.
    This directory has the original location at S:\Router\stats\ on the HDD of my PC.

    Windows shows me the total/free space of my entire harddisk too if i browse from another PC to this shared directory.

    Edit: By using Directory-Opus as file explorer...
     
  9. lboregard

    lboregard LI Guru Member

    i have found that when saving to a cifs share, bandwidth data may get lost.
    this has happened to me upon power failures and my level zero analysis is that since the router boots much faster than the box where my share lives, when the firmware is up and running, it goes to look for it rstat file on the share, doesn't find it because the machine is still booting, so it decides to start from zero ... if this is the cause, it seems pretty reasonable why it's happening, but then again ... i've never had reliable stats .. the only downside for me right now.
     
  10. turbo53

    turbo53 Network Guru Member

    You should upgrade to the latest version of Tomato. There is now an option NOT to create a new file if it doesn't find an old one. This should solve your problem.
     
  11. luckman212

    luckman212 LI Guru Member

    where is that option??
     
  12. bokh

    bokh Network Guru Member

    Here is the option

    I found this option under

    Administration --> Bandwidth Monitoring --> Create New File / Reset Data

    So you have to enable this explicitly for the creation of a new file.

    I experienced the same as mentioned before when I had a complete power-failure in my home (self-inflicted while fixing my DVD-player, 220V feels funny indeed, heh-heh). While my FreeBSD-system was still busy fsck-ing the partitions, the WRT54 / Tomato was already up-and-running, but was unable to mount the Samba-share for the rstats...
    This is how I lost all my rstats dating back to Sept. 2006 and I wrote some words about this in the forum. So my guess is Jon read these same words and made up his mind about this issue.
     
  13. luckman212

    luckman212 LI Guru Member

    so in case you leave that option UNchecked--- what would happen in the event where CIFS volume could not be mounted? does the Tomato store the stats temporarily in its memory and continue to try and mount the CIFS, and if it eventually mounts it can save the data? or does it just discard the stats? i would like to know this too--- occasionally my NAS might be offline for maintenance etc and I dont want to lose the stats if I can avoid it.
     
  14. wycf

    wycf Network Guru Member

    I am also confuesd here. Could someone explan how to use/open/view the logfile?
     
  15. tomatensauce

    tomatensauce LI Guru Member

    I second that - it's really important for me to know that because the box with the CIFS share is not on 24/7. So if it will loose data this way i'd like to avoid that. Thanks for any hints...
     

Share This Page