bandwidth logger version 1.1.6
Note: Linux Only
bandwidth logger (1.1.6)
*
* Cater for transmit limit set in error at 0 bytes in bandwidth.cfg file
*
* Fix for bwreport division by zero calculating average on day 1 or 2 of the billing period
*
* Addition of RUNAWAY_BYTES configuration value
* Allows you to define a number of bytes in a Sample Window that you think might be excessive
* Issues a warning that something is using more than that in a minute (Sample Window).
*
* Display Bandwidth log in browser http:127.0.0.1:5006
* now automatically refreshes the page once a minute and has a manual refresh button
*
* Fix for utf-8 characters to display correctly in the Status web report
*
* Change wording in Web interface about Help
* To give a workaround for local file:/// access new browsers have introduced
*
bandwidth logger (1.1.5)
*
* Added Emergency Handbrake
* The emergency handbrake accepts a factor of the daily allowance i.e. 2.5
* If the traffic through the nominated interface exceeds daily allowance times the factor
* the interface is disabled, disconnecting the internet.
* This allows you to prevent excessive downloads by mistake
* Please read the manual about this manually configured function
*
* The emergency_handbrake can also be applied at a given hour.
* If for example your Free network Hours end at 6am, rather than setting your machine to shutdown
* to prevent excessive network traffic, or setting your alarm clock, you can set the handbrake
* to disable the network interface. You can re-enable it at a more civilised hour, after your
* first coffee.
*
* Added a dynamic list of available network interfaces to the help text of the
* configuration html file - Uses the /etc/iftab file
* Added a dynamic list of available local ip addresses/machine names to the help text
* of the configuration html file - Uses the /etc/hosts file
*
* Added a view Log file option to browser based bandwidth control.
* Simply displays upto the last 1000 lines of the /var/opt/bandwith.log file in a web page
*
* Added a view status option to browser based bandwidth control.
* Simply displays status of the bandwidth.service in a web page
* The CLI command would be "systemctl status bandwidth.service"
*
* Browser based Edit Configuration now returns a log page that confirms what has been
* updated in the /etc/bandwidth.cfg file
* Note: Bandwidth still needs to be re-started before these new settings are made live
*
* Bug fix to prevent issuing warning about Monthly limits exceeded which include
* Free time rx and tx values rather than just Billable rx and tx values
*
* Bug fix in bwedit.py, the command line configuration program called by bwcontrol
* This ignored the COMBINED_LIMIT parameter, always reporting it as Off
*
* Contact email changed in man pages to rolfofsaxony@gmx.com
*
bandwidth logger (1.1.4)
* Requirement for python-configparser removed as this requires
* python2.7 to be loaded.
* configparser is included in python 3.8
*
bandwidth logger (1.1.3)
* Program falls over on startup around 1:00 a.m. with
* an error from dbus. Try not calling notify2 when
* The time moves from contracted time slot to a free time slot
* principally because I can't think of anything else
* which occurs at this time.
*
* bwrep and bwrep2 include a Combined bandwidth limit estimate
* e.g. a 30Gb Tx and Rx limit rather than
* 25Gb Rx and a 5Gb Tx limit
*
Version 1.1.2
* Fix for bwfree and bdfree2 which excluded the first
* day in the period when report on un-metered usage
*
* Contact email changed to rolfofsaxony@gmx.com
*
Version 1.1.1
* Fix for bug when reporting that you have passed
* your Received or Transmitted limit for the month
* using the wrong variable crashed bandwidth
*
* Fix for bug when reporting that you have passed
* your Received or Transmitted limit for the month
* The same indicator was used to prevent multiple warnings
* of daily limit exceeded and total limit exceeded.
* Result: If the daily limit was exceeded before the
* monthly limit was exceeded, there was no warning of
* the monthly limit being exceeded
*
Version 1.1.0
- Updated to use python3
- Permits reports as Mb/Gb or Mib/Gib
Officially a Kb is 1000 bytes, a Mb is 1000 x a Kb and a Gb is 1000 x a Mb
a Kib is 1024 bytes, a Mib is 1024 x a Kib and a Gib is 1024 x a Mib
Over the years, unscrupulous vendors, especially of disk drives have taken
advantage of the confusion, as have ISP's.
ISP's still quote line speeds in bits for heavens sake i.e. 20Mbps
(250,000 bytes) so there is no real excuse for them to fudge the issue
but they do, they are selling less for more.
You can now, define whether your ISP uses a 1000 byte Kb or a 1024 Kib.
It doesn't sound like much of a difference but once you are playing with
Gigabytes the difference mounts up quite quickly.
- Gathers data from other machines for reporting purposes
- Allows input of a list of other machines to be included
in bandwidth's reports
- Reports and charts account for multiple machines
- loss_factor percentage added to attempt to compensate
for unknown or non measurable bandwidth use on your network
- Minor bug fixes
- Fix for January date bug which causes bandwidth to fail
Description:
Allows Linux users to monitor their Transmit and Receive bandwidth usage.
Some of us are unable to get "unlimited", "all that you can eat", internet
packages and are left trying to stay within our Download/Upload limits, whilst
paying dearly for the "privilege".
Equally, we didn't have the foresight or the money to purchase an snmp managed
router, so we are unable to strip the traffic information from the router
itself, rather we have to rely on the logging into our ISP, to discover if we
are approaching the bandwidth limit.
Bandwidth logger, runs a daemon that notes how much traffic is passing through
your network interface. From this data it stores:
Live data for a 1 week period;
Daily, Monthly and billing period data.
Bandwidth logger was written to install on a system using 'systemd' but can
be configured to run under 'upstart'.
An upstart script "/usr/share/bandwidth/bandwidth.upstart.conf" is included
but will have to installed manually for those using 'upstart' systems
(The daemon will fork for 'upstart' systems)
Or sort out your method by passing the bandwidth logger program
/usr/sbin/bandwidth_logd the parameter --daemon
It will load as a daemon running in the background
The reports that come with bandwidth_logger allow you to see on the command
line, graphically or via your browser, how much of your "bandwidth" you have
consumed in the current billing period.
It will also issue a "live" warning when you are approaching a limit.
Automatic installation of dependencies require that you use the Gdebi package
to install the program.
Please read the accompanying document: bandwidth.pdf
Installation:
The package installs itself to run under systemd and will start automatically on system reboot, at that point of the boot sequence when the network becomes available.
Install with debian GDebi package installer 'gdebi'
if you don't have that run
sudo apt-get install gdebi (before trying to install bandwidth)
The reason for this is that by default the dpkg and apt packages do not automatically
install packages dependencies, unless they have been configured to use "Smart Updates"
Dependencies: python3, python-configparser, sqlite3, python3-notify2, python3-numpy, python3-matplotlib, xterm
Features:
The following items are configurable:
How often to sample the traffic;
Which interfaces to watch;
The day of the month your billing period starts;
Your Received data limit in Gb or Mb;
Your Transmitted data limit in Gb or Mb;
Whether you require a warning when a limit is approached;
Whether you have "Free" days;
What your "free days" are;
Whether you have "free" hours;
What your "free" hours are;
Whether "free" days and "free" hours should work together, i.e.
You can have "free" downloads on Saturdays and Sundays, or
you can have "free" downloads between midnight and dawn every day, or
you can have "free" downloads between midnight and dawn but only on
weekdays for example.
Tcp port number to communicate via your browser
more information into the log file.
Bandwidth logger comes with several reporting programs:
bwrep - A terminal based report detailing daily figures for the current
billing period, with average usage, warnings and estimates.
bwreport - a graphical barchart of daily usage within the current billing
period
bwpie - A graphical double pie chart with Receive and Transmit usage
within the current billing period
bwrx - A graphical pie chart, as above, showing only receive data
bwtx - A graphical pie chart, as above, showing only transmit data
bwcombine - A program that will combine multiple bandwidth databases, into
a single consolidated database. This is if you have more than 1 Pc
on your network and wish to consolidate reporting.
bwextract - A program to extract the daily and billing period information
in a bandwidth database file into csv format. This allows you to
import data directly into LibreOffice Calc for example, for
calculations and/or graphical representaions.
bwremote - A program to import rx/tx data from other machines on your
network for consolidated reporting.
Somewhat removes the need for bwcombine.
All of the above allow a parameter to be passed that will override the
default database name, so reporting can be performed on database files
from other Pc's or on a combined database i.e.
$bwrep combinedbw.db
will report based on the data in a database called combinedbw.db
Whereas:
$bwrep
will report on the default database
End: