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

How To ...

Discussion in 'Tomato Firmware' started by Fr_rene, Oct 29, 2006.

  1. Fr_rene

    Fr_rene Network Guru Member

    Bandwith monitoring

    Saving the bandwith monitoring, what's the procedure because saving to user directory doesn't work. There no file on my directory and when i procede to firmware upgrade i lose all.

    Thanx for help !!!

  2. hbkh

    hbkh LI Guru Member

    I was actually wondering that myself. I was also curious how you control the stored data so that the memory doesn't full up?
  3. turbo53

    turbo53 Network Guru Member

    The way I do it is to set up a CIFS share in the "Administration --> CIFS Client" menu. CIFS is nothing more than a Windows or Samba share, which can be a directory on your workstation. The router will then mount your workstation share at boot time.

    For example, I shared a folder called "Router" from my WinXP PC, which is at I specify the UNC as "\\\Router", and enter the userid and password used to log into my PC.

    Then from the "Administration --> Bandwidth Monitoring" menu, just point it at either CIFS1 or CIFS2, whichever you set up, and have Tomato store the data there. That way it is not lost across a reboot.
  4. PsychoD

    PsychoD Network Guru Member

    What if the workstation is not running 24/7? Is there some kind of buffer?
  5. der_Kief

    der_Kief Super Moderator Staff Member Member

    How can i manually start the save process to the cifs client ? Or do i have to wait till the "save history interval" is over.

  6. der_Kief

    der_Kief Super Moderator Staff Member Member

    I got answer to this from Jon by mail !
    ... You can force it to save using "killall -sighup rstats" ....

    I tried this in a telnet session and it works :thumbup:


    BTW @Fr_rene
    Can you edit Thread title ? "How to" is a bit general and so its harder to find the information about bandwith monitoring
    Or maybe an admin can do this !?
  7. turbo53

    turbo53 Network Guru Member

    Not sure. I use this particular PC as a server so it is normally up 24/7.
  8. scsb

    scsb LI Guru Member

    How could I post bandwidth monitor logs from a router's directory to my pc? My problem is that I don't have a 24/7 workstation, so I can't use cifs client, so I chose user directory and save logs locally to a directory on the router.
  9. der_Kief

    der_Kief Super Moderator Staff Member Member

    Thats the way i do it when i have to reboot or shutdown the router :

    1) create a share (e.g. Router) on a PC with proper privileges
    2) on the router go to administration->cifs client and connect to the PC share
    3) on the router go to administration->Bandwidth Monitoring and switch the
    location to cifs client
    4) log on to the router via telnet and type the following command:
    killall -sighup rstats

    When you then look in your share on the pc you should see something like this tomato_rstats_0016b6b745f3.gz
    So then you can reboot/shutdown the router. Thats all. For me that way works.

  10. scsb

    scsb LI Guru Member

    der_Kief: is there always just one log file, and it contains just the last 5 hour, the daily and monthly traffic? and it's always getting overwritten?
  11. scsb

    scsb LI Guru Member

    der_Kief: is there always just one log file? And it contains the last 5 hours, the daily and the monthly traffic? And is it always getting overwritten?
  12. der_Kief

    der_Kief Super Moderator Staff Member Member

    Yes it saves one file to the share when you run the command i posted
    This file contains the daily and monthly statistic.The statistics for the last 5 hours are started at 0
    Before you execute the command you can make a backup of the old log file. Thats the way i do it.

  13. scsb

    scsb LI Guru Member

    thanks for your answers :)
  14. redcow

    redcow LI Guru Member

    to use jffs2/user directoy you have to mount manually your jffs2 directory because the tomato-support seems to be broken since the beginning, i do it with the following "init script" startup code:

    insmod zlib_deflate
    insmod zlib_inflate
    insmod jffs2
    mount -t jffs2 /dev/mtdblock/3 /jffs2/

    after that you can enable jffs2 in the jffs2 section and ignore the "Error unlocking JFFS2. Check the logs to see if they contain more details about this error." error.

    I think the tomato jffs2 problem has to do with the "mtd-unlock" binary because the mtd package seems to be broken. With the openwrt mtd unlocking works without problems, so maybe replacing the mtd packing will solve the issue.
  15. vibe666

    vibe666 Network Guru Member

    i wonder if a future version would have support for an online storage solution like dropbox to save the log onto the internet instead of a local machine?

    I'm using a cifs myself just pointing to a samba share on my linux server and it works fine.

    had some problems when i had a long path to the save location rather than a direct share, but with \\server\share and my user/pass it works fine.

    if your PC is not on 24/7 then maybe you could set it to only back up only once per day at a time when your pc is likely to be turned on? or just save it manually whenever you want to reboot the router for whatever reason?

    maybe that command would work as a shutdown script to always save the config first when you reboot the router?
  16. arthurtoo

    arthurtoo Addicted to LI Member

    i've configured my cifs client to point to my share directory, and configured the save file to be at cifs1 but it doesn't seem to be saving it there. my share directory which ic reated specifically for it seems to be empty all the time.
  17. arthurtoo

    arthurtoo Addicted to LI Member

    when the router reboots, will the saved data gets restored automatically? or the restoring is a manual process?

Share This Page