Mac 使用tcping命令测延时

首先前往Github下载该项目最新的release

值得一提的是,该项目的tcping比brew 安装的那个功能更全面,多了测速功能,brew 安装的只能用于检测端口是否打开,根本没啥作用。。

解压之后,安装一下:

➜  mv tcping /usr/local/bin/

然后看一下使用说明:

➜ tcping
tcping is a ping over tcp connection.

Examples:
    1. ping over tcp with custom port 10 times
       > tcping www.baidu.com 80
    2. ping over tcp with custom port 5 times
       > tcping -c 5 www.baidu.com 443

USAGE: tcping [--count <count>] <ip> <port>

ARGUMENTS:
  <ip>                    The IP or Domain to tcping.
  <port>                  The port to tcping.

OPTIONS:
  -c, --count <count>     The number of times to repeat 'tcping'. Default value is 10, Max value is 65535
  -h, --help              Show help information.

日常淦百度:

➜ tcping -c 5 baidu.com 443
baidu.com:443 has address: 220.181.38.148:443 - Connected - 32.682ms
baidu.com:443 has address: 220.181.38.148:443 - Connected - 29.372ms
baidu.com:443 has address: 39.156.69.79:443 - Connected - 52.232ms
baidu.com:443 has address: 220.181.38.148:443 - Connected - 28.922ms
baidu.com:443 has address: 220.181.38.148:443 - Connected - 28.975ms
Ping statistics baidu.com:443
    5 probes sent.
    5 successful, 0 failed.
Approximate trip times:
    Minimum = 28.922ms, Maximum = 52.232ms, Average = 34.437ms

不仅可以淦他的域名,还能淦他的IP:

➜  bin tcping -c 5 220.181.38.148 443
220.181.38.148:443 - Connected - 30.635ms
220.181.38.148:443 - Connected - 30.816ms
220.181.38.148:443 - Connected - 28.708ms
220.181.38.148:443 - Connected - 30.713ms
220.181.38.148:443 - Connected - 34.641ms
Ping statistics 220.181.38.148:443
    5 probes sent.
    5 successful, 0 failed.
Approximate trip times:
    Minimum = 28.708ms, Maximum = 34.641ms, Average = 31.103ms
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容