Results 1 to 6 of 6

Thread: Resetting Network History at Midnight

  1. #1
    Join Date
    Jan 2012
    Beans
    250

    Resetting Network History at Midnight

    Hi all

    Is there a way that I can, either manually, or by cron, reset my network history at midnight each day. I can see my network history on system monitor, but if I disconnect from the network and then reconnect, system monitors history doesnt change.

    Obviously I am needing more than just disconnecting and reconnecting. I mean I could shutdown the computer, or perhaps logout then login, but thats a pain.

    Any thoughts?
    Glenn.

  2. #2
    Join Date
    Feb 2009
    Location
    Dallas
    Beans
    1,493
    Distro
    Ubuntu Gnome 14.04 Trusty Tahr

    Re: Resetting Network History at Midnight

    Maybe use a different network monitor that has more intelligent history, like Cacti or something else that relies on RRDtool.

  3. #3
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: Resetting Network History at Midnight

    It can be done by unloading and reloading the kernel module for your network card but this will take down your network connection.

    Why are you trying to do this? If you just want to keep daily network usage stats then it would be far better to use something like vnstat.
    Cheesemill

  4. #4
    Join Date
    Feb 2009
    Location
    Dallas
    Beans
    1,493
    Distro
    Ubuntu Gnome 14.04 Trusty Tahr

    Re: Resetting Network History at Midnight

    Quote Originally Posted by Cheesemill View Post
    Why are you trying to do this? If you just want to keep daily network usage stats then it would be far better to use something like vnstat.
    Nice, that looks less cumbersome than Cacti for just one machine.

  5. #5
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    6,574
    Distro
    Ubuntu

    Re: Resetting Network History at Midnight

    Quote Originally Posted by Cheesemill View Post
    It can be done by unloading and reloading the kernel module for your network card but this will take down your network connection.

    Why are you trying to do this? If you just want to keep daily network usage stats then it would be far better to use something like vnstat.
    +1 to using vnstat to do this.
    it has a reset option.
    personally, I'd make a small conky script just for vnstat/maybe other network activity and then learn how to make a script to have vnstat reset itself every midnight.
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  6. #6
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: Resetting Network History at Midnight

    Quote Originally Posted by deadflowr View Post
    +1 to using vnstat to do this.
    it has a reset option.
    personally, I'd make a small conky script just for vnstat/maybe other network activity and then learn how to make a script to have vnstat reset itself every midnight.
    The reason I mentioned vnstat was that it keeps daily totals, negating the need for any sort of resetting at all.
    Cheesemill

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •