Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mozillazg/justping
找出 ping 值最小的 IP/域名
https://github.com/mozillazg/justping
Last synced: 22 days ago
JSON representation
找出 ping 值最小的 IP/域名
- Host: GitHub
- URL: https://github.com/mozillazg/justping
- Owner: mozillazg
- License: mit
- Created: 2012-10-12T09:27:05.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-02-28T11:55:59.000Z (almost 12 years ago)
- Last Synced: 2024-10-03T15:39:59.503Z (3 months ago)
- Language: Python
- Size: 119 KB
- Stars: 14
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: readme.markdown
- License: LICENSE.txt
Awesome Lists containing this project
README
# justping
通过解析 ping 命令执行结果,查找 ping 值最小的 ip/域名## 用法
**justping.py** [ *filename* ] [ **+** ] [ *ip/host* ]...### 参数
*filename* ------ 内容为一行一个 ip/域名的文件,参考 hosts.txt
**+** ---------------- 同时比较文件内及后面输入的 ip/域名
*ip/host* -------- ip/域名### 示例
*
>python justping.py
######################################################
host(ip) time lost
baidu.com(123.125.114.144): 170ms 0%
qq.com(119.147.15.13): 66ms 0%
######################################################
qq.com has the min ping time: 66 ms
>*
>python justping.py baidu.com 8.8.8.8
######################################################
host(ip) time lost
baidu.com(123.125.114.144): 170ms 0%
8.8.8.8(8.8.8.8): 124ms 0%
######################################################
8.8.8.8 has the min ping time: 124 ms
>*
>python justping.py hosts.txt
######################################################
host(ip) time lost
baidu.com(220.181.111.86): 81ms 0%
qq.com(119.147.15.13): 63ms 0%
######################################################
qq.com has the min ping time: 63 ms
>*
>python justping.py hosts.txt + 8.8.8.8
######################################################
host(ip) time lost
baidu.com(220.181.111.86): 81ms 0%
qq.com(119.147.15.13): 63ms 0%
8.8.8.8(8.8.8.8): 124ms 0%
######################################################
qq.com has the min ping time: 63 ms
>