emjelde / rstats

Read rstats backup file for Tomato firmware
Apache License 2.0
11 stars 6 forks source link

RStats History

Read rstats backup bandwidth usage file created by Tomato (wireless router firmware).

Why?

Tomato provides statistics in the form of an "rstats" file. After reading the source provided in the Tomato project for creating the rstats file these scripts were created to help parse and format the bandwidth statistics.

See forum for discussion.

Usage

$ python RStatsHistory.py --help
Usage: RStatsHistory.py [options] <filename>
Options:
  -h, --help            show this help message and exit
  -u UNIT, --unit=UNIT  Units b (bytes),k (KiB),m (MiB),g (GiB) default is b
$ python RStatsHistory.py tomato_rstats.gz

Or

$ python RStatsOutput.py --help
Usage: RStatsOutput.py [options] <filename>
Options:
  -h, --help            show this help message and exit
  -i INDENT, --indent=INDENT
                        Indent JSON
  -d DAILY, --daily=DAILY
                        Daily units b (bytes),k (KiB),m (MiB),g (GiB) default
                        is b
  -m MONTHLY, --monthly=MONTHLY
                        Monthly units b (bytes),k (KiB),m (MiB),g (GiB)
                        default is b
$ python RStatsOutput.py -dm -mg -i3 tomato_rstats.gz