Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kofiasare/send-me-my-internet-usage-stats
simple utility to send internet usage statistics using vnstat and vnstati linux utilities
https://github.com/kofiasare/send-me-my-internet-usage-stats
Last synced: 26 days ago
JSON representation
simple utility to send internet usage statistics using vnstat and vnstati linux utilities
- Host: GitHub
- URL: https://github.com/kofiasare/send-me-my-internet-usage-stats
- Owner: kofiasare
- Created: 2020-03-19T09:42:47.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-19T12:02:20.000Z (almost 5 years ago)
- Last Synced: 2024-10-30T00:27:50.893Z (2 months ago)
- Language: Python
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Send Me My Internet Usage Statistics
Simple utility to send internet usage statistics using vnstat and vnstati linux utilities.
### Daily Stats
![Daily Summary](img/daily_summary.png)t
### Monthly Stats
![Monthly Summary](img/monthly_summary.png)
# Install
$ sudo apt install vnstat && sudo apt install vnstati
$ echo 'export GMAIL_SMTP_ID="your-gmail-id"' >> ~/.
$ echo 'export GMAIL_SMTP_PASSWORD="your-gmail-passwrod"' >> ~/.
$ echo 'export MY_EMAIL_ADDRESS="your-gmail-email"' >> ~/.With pip3 installed
$ pip3 install email-to
# Run script
$ python daily.py && $ python monthly.py
# Schedule with Crontab
Add the following to crontab -e
# at the top of crontab -e
SHELL=
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin# at the bottom of crontab -e
# send daily internet usage stats at 11:59 PM every day
59 23 * * * source ~/. && cd && python daily.py# send monthly internet usage stats at the last day of the month
59 23 28-31 * * source ~/. && cd && python monthly.py