Coder Social home page Coder Social logo

hello's Introduction

Tools for check server:port available, write by golang (test go1.0.2), python (test python2.6, require gevent)

Install:

$ git clone https://github.com/smallfish/hello.git
$ cd hello
$ go build hello.go

or use "go get":
$ go get github.com/smallfish/hello
$ ls $GOPATH/bin/hello

Usage:

$ ./hello
  -file="": host:port file
  -limit=10: limit concurrency, default: 10
  -timeout=5: connect timeout, default: 5

$ python hello.py 
  Usage: hello.py --file=urlfile --limit=1000 --timeout=5

  Options:
    -h, --help         show this help message and exit
    --file=FILE        host:port file
    --limit=LIMIT      limit concurrency, default: 10
    --timeout=TIMEOUT  connect timeout, default: 5

Example:

$ cat urlfile
twitter.com:80
youtube.com:80
qq.com:80
dev.twitter.com:80
163.com:80
google.com:80
sohu.com:80

$ ./hello -file=urlfile 
163.com:80      OK
dev.twitter.com:80      OK
google.com:80   OK
qq.com:80       OK
sohu.com:80     OK
twitter.com:80  ERROR
youtube.com:80  ERROR

$ python hello.py --file=urlfile --limit=1000 --timeout=2
twitter.com:80  ERROR
youtube.com:80  ERROR
qq.com:80       OK
dev.twitter.com:80      ERROR
163.com:80      OK
google.com:80   OK
sohu.com:80     OK

hello's People

Watchers

 avatar  avatar

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.