Simple traffic accounter, based on pcap.
Project description
Counts network traffic to and from local addresses using pcap. Stores data in an SQLite database for 60 seconds periods. Generates simple reports. Reports can have IP address labelled. Other reports can be generated using SQL and custom scripts. Labels traffic during 1:00 AM and 7:00 AM as free (that’s how my ISP works).
This package install only one script named traflog.
Start collecting data:
$ sudo traflog --net 192.168.1.0 --mask 255.255.255.0 /var/lib/traffic.sqlite
(You probably want to run this as a service.)
Generate report:
$ traflog --report --hours=24 /var/lib/traffic.sqlite addr nonfree free ----------------------------------- 192.168.1.5 0.00 0.00 router.tplink 192.168.1.103 318.00 1.00 julia.samsung 192.168.1.104 81.00 0.00 rebekka 192.168.1.105 0.00 0.00 ? 192.168.1.108 17.00 0.00 ? 192.168.1.125 259.00 15.00 umonkey.dell
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
traflog-1.12.tar.gz
(4.3 kB
view hashes)
Built Distribution
traflog-1.12-py2-none-any.whl
(6.1 kB
view hashes)