Skip to content

Python version #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 68 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
c2a663a
Uploader v0.1
jedie Dec 15, 2005
711fdab
add ping.py
jedie Nov 7, 2007
a6fbbb8
change back from time.clock() to time.time()
jedie Jun 24, 2010
9446b98
chmod +x
jedie Jul 7, 2010
06d85e3
add changes by George Notaras: http://www.g-loaded.eu/2009/10/30/pyth…
jedie Sep 12, 2011
1a7b636
Add enhancements by Martin Falatic: http://www.falatic.com/index.php/…
jedie Sep 12, 2011
72883fb
cleanup
jedie Sep 12, 2011
f422573
Bugfixes + cleanup, tests with Ubuntu + Windows 7
jedie Sep 12, 2011
e85c260
merge changes by Samuel Stauffer
jedie Oct 12, 2011
1b59665
Add eclipse config
jedie Oct 12, 2011
4c24a78
change README
jedie Oct 12, 2011
c43597d
* move Stuff from DocString into seperate files
jedie Oct 12, 2011
0485d31
add some information into README
jedie Oct 12, 2011
a876bac
create a setup.py
jedie Oct 12, 2011
cf3c716
put HISTORY into README
jedie Oct 12, 2011
11fc9f7
remove
jedie Oct 12, 2011
40a509e
actually use defined default_timer() instead of time.time()
Oct 12, 2011
8edef0c
Merge pull request #2 from zed/patch-1
jedie Oct 12, 2011
a100a2d
add \"zed\" see: https://github.com/jedie/python-ping/pull/2
jedie Oct 12, 2011
4d17054
add FIXME: Don't use global
jedie Oct 12, 2011
51f5b32
IMHO not needed.
jedie Oct 12, 2011
dbf7d09
print() -> print("")
jedie Oct 12, 2011
5fae12d
Bugfix in stupid CLI solution. -> https://github.com/jedie/python-pin…
jedie Oct 12, 2011
7aa3e9c
add .gitignore
jedie Oct 12, 2011
1db163b
add contribute
jedie Oct 12, 2011
bf82e93
* refactor variable names
jedie Oct 12, 2011
55833fd
move into a class
jedie Oct 12, 2011
6e9cf37
* rename print callback methods
jedie Oct 12, 2011
f4e191f
* Bugfix: calculate packet lost count
jedie Oct 12, 2011
1d8e600
Update example output
jedie Oct 12, 2011
12050a5
install \"ping.py\" as script
jedie Oct 13, 2011
e8036e1
Fixed a typo in a method name threw a "Has no Attribute exception"
Oct 15, 2011
4c3d096
Merge pull request #6 from incidence/master
jedie Oct 17, 2011
9e1ca0f
Update AUTHORS
jedie Oct 17, 2011
376a019
Update history
jedie Oct 17, 2011
a601512
Update README.creole
jedie Oct 17, 2011
bca063c
fix indent
jedie Oct 17, 2011
86e8c1c
Merge branch 'master' of github.com:jedie/python-ping
jedie Oct 17, 2011
bd9d558
Changed platform checking code to use the startswith idiom
techwizrd Oct 27, 2011
9566503
Merge pull request #7 from techwizrd/master
jedie Oct 28, 2011
58d7cad
add Sarkhel, Kunal -- https://github.com/techwizrd -- https://github.…
jedie Oct 28, 2011
05a434b
add setup.py keywords
jedie Nov 15, 2011
3f01bf8
refactor imports
jedie Nov 15, 2011
120d46d
change HeaderInformation from class to a function. (Thanks jcborras f…
jedie Nov 15, 2011
ba987c9
add: jcborras -- https://github.com/jcborras
jedie Nov 15, 2011
32bed5d
add the idea from https://github.com/jedie/python-ping/pull/8/files#L…
jedie Nov 15, 2011
24a6a03
Add unittests with some ideas from https://github.com/jedie/python-pi…
jedie Nov 15, 2011
cc40000
first commit. cleaning out stuff. fixing setup.py
Jul 10, 2012
743b4e2
adding readme
Jul 10, 2012
517440b
changed __main__ action. fixed id overflow issue
Jul 12, 2012
3583670
forgot to add the main file :D
Jul 17, 2012
09ec175
removing this shit
btoews Aug 2, 2012
cadffc8
fixed setup.py deps
Aug 21, 2012
b4b6077
adding install instructions to README
Aug 21, 2012
25984bf
Prepare version 0.2
amotl Nov 4, 2016
2c604cf
Add TODO.rst and CHANGES.rst. Update AUTHORS. Fix spaces.
amotl Nov 4, 2016
40fc7e9
Be graceful to hostname resolution failures
amotl Nov 4, 2016
d0ecb86
Improve console output formatting
amotl Nov 4, 2016
83243ef
Add entrypoint “gping” and argument parsing
amotl Nov 4, 2016
a14f946
Update documentation
amotl Nov 4, 2016
0b014b5
Address minor issues requested from the discussion of PR #2
amotl Nov 21, 2016
07372d3
Merge pull request #2 from zerotired/master
mastahyeti Nov 21, 2016
1c417a1
Incorporate "Allow binding to an interface" by Dan Harvey
amotl Nov 10, 2016
969ff25
Make verbose output optional
amotl Nov 20, 2016
fa565e5
Add “--bind” commandline argument for binding to a specific ip address
amotl Nov 21, 2016
8b1c745
Update documentation
amotl Nov 21, 2016
45faad3
Bump version
amotl Nov 21, 2016
3e2fdd1
Merge pull request #3 from fastd-monitor/integrations
mastahyeti Jul 28, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.py[co]
*~
*.egg-info
/dist
/build
.pydevproject
/.settings
/.venv*
/.idea
18 changes: 18 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
AUTHORS / CONTRIBUTORS (alphabetic order):

* Cowles, Matthew Dixon -- ftp://ftp.visi.com/users/mdc/ping.py
* Diemer, Jens -- http://www.jensdiemer.de
* Falatic, Martin -- http://www.falatic.com
* Hallman, Chris -- http://cdhallman.blogspot.com
* Harvey, Dan -- https://github.com/danharvey
* incidence -- https://github.com/incidence
* jcborras -- https://github.com/jcborras
* Motl, Andreas -- https://github.com/amotl
* Notaras, George -- http://www.g-loaded.eu
* Poincheval, Jerome
* Sarkhel, Kunal -- https://github.com/techwizrd
* Stauffer, Samuel
* Tibold, Marko -- https://github.com/markotibold
* Toews, Ben --- http://btoe.ws
* Zach Ware
* zed -- https://github.com/zed
39 changes: 39 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
***************
gping changelog
***************

In progress
===========

2016-11-21 0.2
==============
- Be graceful to hostname resolution failures
- Record all failures (hostname resolution and timeouts) in ``self.failures``
- Improve console output formatting
- Add shell command entrypoint ``gping`` to ``setup.py``
- Add argument parsing for interactive use, e.g. ``--hostnames=www.example.net,mail.example.net``
- Incorporate "Make it possible to ping without root access" using ``socket.SOCK_DGRAM`` instead of ``socket.SOCK_RAW``
by Marko Tibold: https://github.com/markotibold/gping/commit/b75fa2d4
- Incorporate "Allow binding to an interface", e.g. ``--bind=192.168.111.2``
by Dan Harvey: https://github.com/danharvey/pyping/commit/cb848976
- Non-interactive mode: Record all results in ``self.results``
- Non-interactive mode: Make verbose output optional

2012-08-21 0.1
==============
- Fix setup.py deps
- Add install instructions to README
- Tag release ``gping-0.1``

2012-07-17 0.0
==============
- Add main gping.py

2012-07-12 0.0
==============
- Change __main__ action. Fix id overflow issue.

2012-07-10 0.0
==============
- First commit. Clean out stuff. Fix setup.py.
- Add README.md
11 changes: 11 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
The original code derived from ping.c distributed in Linux's netkit.
That code is copyright (c) 1989 by The Regents of the University of California.
That code is in turn derived from code written by Mike Muuss of the
US Army Ballistic Research Laboratory in December, 1983 and
placed in the public domain. They have my thanks.

Copyright (c) Matthew Dixon Cowles, <http://www.visi.com/~mdc/>.
Distributable under the terms of the GNU General Public License
version 2. Provided with no warranties of any sort.

See AUTHORS for complete list of authors and contributors.
2 changes: 0 additions & 2 deletions README

This file was deleted.

59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# GPing #

An asynchronous, event-driven, pure-python ping implementation using raw sockets based on gevent.
This is a fork of the python-ping project replacing its internal machinery with gevent.
The point is to have an event driven ping utility for doing a huge number of concurrent pings efficiently.


## Usage ##

### Run on the commandline ###

# Ping some hostnames
gping --hostnames=gnu.org,fsf.org,google.com,microsoft.com,googleusercontent.com,live.com,stackoverflow.com,141.1.1.1,8.8.8.8,192.168.123.1,192.168.999.1

# Bind to a specific IP address
gping --bind=192.168.111.2 --hostnames=google.com,stackoverflow.com,8.8.8.8

### Demo with 100 concurrent pings ###

# Ping the top 100 domains
time python gping.py

### Use as library ###

from gping import GPing

gp = GPing()
gp.send("127.0.0.1", test_callback)
gp.join()

## Install ##

### From Python Package Index ###
This *should* be easy on your average \*nix box, just type:

sudo pip install gping


### From GitHub ###
This way of installing gping is suitable for hacking on it:

git clone https://github.com/mastahyeti/gping.git
cd gping
virtualenv .venv27
source .venv27/bin/activate
python setup.py develop

## License and Credits ##

The python-ping project was started by Matthew Dixon Cowles.

- copyleft 1989-2016 by the python-ping team, see AUTHORS for more details.
- license: GNU GPL v2, see LICENSE for more details.

It was forked and ported to `gevent` by Ben Toews. Since then, this program is now called appropriately *GPing*.

He says:
> I have left the license and authors information intact, but this project seems to have a long history or forks and such
> so I am probably somehow pissing someone off or violating some license. Let me know if this is the case and I will be better.
24 changes: 24 additions & 0 deletions TODO.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
**********
gping todo
**********

Tasks
=====
- [x] Add entrypoint ``gping`` and argument parsing
- [o] Add reading from stdin
- [o] Add collectd metrics gathering: https://pythonhosted.org/collectd/

Upstream changes
================
- [x] Add "Make it possible to ping without root access.": https://github.com/markotibold/gping/commit/b75fa2d41ec10073f894676fc3f3ec6b46693c05
- [o] Add "Allow binding to an interface": https://github.com/danharvey/pyping/commit/cb8489762d3171fb0b69c0fb9aaa8968d5e439b4
- [o] Add statsd support: https://github.com/ChristianKniep/python-ping/commit/a3653526e5857f346e2a244988df3849574ba385
- [o] Check "fix packet numbering bug": https://github.com/matesito/gping/commit/498c93500e35c8f5ad9c682df1e6c66fb5c5998a
- [o] Check improvements from Vijayananda Reddy: https://github.com/VijayanandaReddy/gping/commit/25ac7c8efb6cf394b6c36ed2ed5b6712116b6c53
- [o] Check "For some reason, die was not working": https://github.com/biplav/gping/commit/377f0f4e85535fd3b6f812eb29d49ad8bf9a24fa
- [o] Check "Changes to harden gping.py for usecases like die, ping of devices, timeouts": https://github.com/biplav/gping/commit/6fb9008d4ae63f954f6d59cfbf4bb445964c1351
- [o] Check features of leading non-gevent repositories (IPv6, etc.):

- https://github.com/l4m3rx/python-ping
- https://github.com/tomwilkie/pyping

Loading