User Tools

Site Tools


myapps:pynetcheck

PyNetCheck

What it is?

PyNetCheck is a small and nifty python utility, designed to run in background and automatically check for the internet status, issuing a ping to a specified time interval.
It's not so complex, but it's helpful for me to check my ADSL connection status, and record the statistics about how many down/up(s) are during a day.

The PyNetCheck saves the data either in files, or a sqlite database or both. Check the pynetcheck.cfg for details.

Requirements

Python (preferably > 2.6)
Sqlite3 for python (if python 2.4)
Linux based distro

How to use

Pretty straightforward. ;)

$ python pynetcheck.py 
usage: pynetcheck.py start|stop|restart

You can put it in a startup script to load it every time you start the computer.

To see the statistics (only if you're using sqlite db also):

python pynetstat.py -h
Usage: pynetstat.py --day|-d DD-MM-YYYY

Displays statistics about the network data saved by pynetcheck

Options:
  --version          show program's version number and exit
  -h, --help         show this help message and exit
  -d DAY, --day=DAY  Displays the statistics for the specified day
  --header=HEADER    Prints table header each X times
  -a, --days         Prints a list with available days

Note: Instead of python pynetstat.py you just can chmod +x pynetstat.py, for example and then run it as ./pynetstat.py

Download

02.10.2009 Version 0.1

Screenshots

Because it's a daemon, no screenshots are available. But I still have for you some nice pictures with statistics module :)

 PyNetstat Help  PyNetstat in action

Credits

Many thanks to the guy (Sander Marechal) and all the opensource community who made possible this. :)

License
myapps/pynetcheck.txt · Last modified: 2013/03/16 17:40 (external edit)