Giter Club home page Giter Club logo

gping's Introduction

gping

guessing ping - trying to guess what you want..

if the first ping fails, it will start beeping on successful pings (why? it guesses you're waiting for a system to restart, and want to be notified when it's up again)

if you're giving it a ssh command, it will parse out the ip/host and ping port 22 (if you're using a non-standard port, it will parse out the custom -p X or --port=X as well, and ping the custom port)

if you give it a https link, it will ping port 443, a http link is port 80, a ftp link is port 21, a url with a custom port like https://example.org:9999 will parse out the custom port and ping that, etc.

if it can't guess what port you want to ping, it will default to an ICMP ping.

if it fails to guess something, feel free to submit a bugreport

example usage:

root@x-foo-net:~#
root@x-foo-net:~# reboot now
Connection to foo.net closed by remote host.
Connection to foo.net closed.

hans@hans-lp17 ~
$ gping ssh [email protected]
will ping "foo.net" port 22. time between pings: 2s..first ping failed, will start beeping on success..
4: fail! "Connection timed out" 2.001s
6: fail! "Connection timed out" 2.001s
8: fail! "Connection timed out" 2.001s
(...)
252: success! 0.038s

installation:

# probably need to execute as root (unless you're on Cygwin)
rm -rfv /usr/local/bin/gping.php /usr/local/bin/gping;
wget -O /usr/local/bin/gping.php https://raw.githubusercontent.com/divinity76/gping/master/src/gping.php;
ln -s /usr/local/bin/gping.php /usr/local/bin/gping;
chmod 0555 /usr/local/bin/gping.php;
chmod 0555 /usr/local/bin/gping;

requirements

php-cli >= 7.0.0

gping's People

Contributors

divinity76 avatar

Watchers

 avatar  avatar  avatar

gping's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.