Skip to main content

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 details)

Uploaded Source

Built Distribution

traflog-1.12-py2-none-any.whl (6.1 kB view details)

Uploaded Python 2

File details

Details for the file traflog-1.12.tar.gz.

File metadata

  • Download URL: traflog-1.12.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for traflog-1.12.tar.gz
Algorithm Hash digest
SHA256 6cdd0bc9bd3f599097bc75f66c3f382140a5badc0edbb3a28a9da76efc537027
MD5 c4cf1bfc3b07b3d551d07d9d1cc84d53
BLAKE2b-256 1230b4a57a55ea8bbefae8f98ed119727b7ed45a0134973157656835cfab6041

See more details on using hashes here.

File details

Details for the file traflog-1.12-py2-none-any.whl.

File metadata

File hashes

Hashes for traflog-1.12-py2-none-any.whl
Algorithm Hash digest
SHA256 03bf537f26b56956c50f859bb70ea7ea1ad5f79e5d9efcddc7210f99e6ae2fcb
MD5 e1833f94adf7d5ccdb5448682f1d3a23
BLAKE2b-256 dde7616e4d92a6d34d84770847032ccdb91e84a97e5361a5e908152570abfa70

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page