请选择 进入手机版 | 继续访问电脑版

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 67|回复: 0

tcping不是windows默认命令, tcping怎么安装?附软件包

[复制链接]
5 金钱 回复本帖可获得 1 金钱奖励! 每人限 1 次

8

主题

0

回帖

20万

积分

管理员

积分
200043
发表于 2024-8-9 14:40:30 | 显示全部楼层 |阅读模式
                                大家都知道,测试网络延迟的命令是 ping,它是基于icmp协议测试两个主机之间的延迟,但是在实际应用中,发现很多服务器正常运行的情况下ping超时,这种情况我们通常会认为是服务器禁止了 icmp,禁止了ping,那么在这种情况下,我们想知道与目标服务器网络延迟该怎么办呢?有一个现成的方法,就是使用tcping,这是一个第三方开发的控制台程序,可以通过测试目标服务器开放的端口来获取tcp延迟。

【第一步】

https://elifulkerson.com/projects/tcping.php 下载 tcping.exe【点击附件即可在线下载】

【第二步】

将下载来的 tcping.exe 放到 C:\Windows\System32 目录;
之后你就可以在 CMD 命令模式下,输入:tcping www.baidu.com 80 来获取本地与目标服务器的网络延迟了。



参数设置(以下来自官方文档):

   
  1. NAME
  2.     tcping - simulate "ping" over tcp by establishing a connection to network hosts.
  3.     Measures the time for your system to [SYN], receive the target's [SYN][ACK] and send [ACK].  Note that the travel time for
  4.     the last ACK is not included - only the time it takes to be put on the wire a tthe sending end.

  5. SYNOPSIS
  6.     tcping [-tdsvf46] [-i interval] [-n times] [-w interval] [-b n] [-r times][-j depth] [--tee filename] [-f] destination [port]

  7. DESCRIPTION
  8.     tcping measures the time it takes to perform a TCP 3-way handshake (SYN, SYN/ACK, ACK) between itself and a remote host.
  9.     The travel time of the outgoing final ACK is not included, only the (minimal) amount of time it has taken to drop it on
  10.     the wire at the near end.  This allows the travel time of the (SYN, SYN/ACK) to approximate the travel time of the
  11.     ICMP (request, response) equivalent.
  12.    
  13. OPTIONS
  14.     -4      Prefer using IPv4

  15.     -6      Prefer using IPv6

  16.     -t      ping continuously until stopped via control-c

  17.     -n count
  18.             send _count_ pings and then stop.  Default 4.
  19.    
  20.     -i interval
  21.             Wait _interval_ seconds between pings.  Default 1.  Decimals permitted.
  22.    
  23.     -w interval
  24.             Wait _interval_ seconds for a response.  Default 2.  Decimals permitted.

  25.     -d      include date and time on every output line
  26.    
  27.     -f      Force sending at least one byte in addition to making the connection.

  28.     -g count
  29.             Give up after _count_ failed pings.
  30.    
  31.     -b type
  32.             Enable audible beeps.
  33.             '-b 1' will beep "on down".  If a host was up, but now its not, beep.
  34.             '-b 2' will beep "on up".  If a host was down, but now its up, beep.
  35.             '-b 3' will beep "on change".  If a host was one way, but now its the other, beep.
  36.             '-b 4' will beep "always".

  37.     -c      only show output on a changed state
  38.    
  39.     -r count
  40.             Every _count_ pings, we will perform a new DNS lookup for the host in case it changed.

  41.     -s      Exit immediately upon a success.        

  42.     -v      Print version and exit.

  43.     -j      Calculate jitter.  Jitter is defined as the difference between the last response time and the historical average.

  44.     -js depth
  45.             Calculate jitter, as with -j but with an optional _depth_ argument specified. If _depth_ is specified tcping will
  46.             use the prior _depth_ values to calculate a rolling average.

  47.     --tee _filename_
  48.             Duplicate output to the _filename_ specified.  Windows can still not be depended upon to have a useful command line
  49.             environment. Don't tease me, *nix guys.

  50.     --append
  51.             When using --tee, append to rather than overwrite the output file.
  52.             
  53.     --file
  54.             Treat the "destination" option as a filename.  That file becomes a source of destinations, looped through on a
  55.             line by line basis.  Some options don't work in this mode and statistics will not be kept.


  56.     destination
  57.             A DNS name, an IP address, or (in "http" mode) a URL.
  58.             Do not specify the protocol ("http://") in "http" mode.  Also do not specify server port via ":port" syntax.
  59.             For instance:   "tcping http://www.elifulkerson.com:8080/index.html" would fail
  60.             Use the style:  "tcping www.elifulkerson.com/index.html 8080" instead.
  61.                                 
  62.     port
  63.             A numeric TCP port, 1-65535.  If not specified, defaults to 80.

  64.     --header
  65.             include a header with the command line arguments and timestamp.  Header is implied if using --tee.
  66.             
  67. HTTP MODE OPTIONS   
  68.     -h      Use "http" mode.  In http mode we will attempt to GET the specified document and return additional values including
  69.             the document's size, http response code, kbit/s.
  70.     -u      In "http" mode, include the target URL on each output line.
  71.    
  72.     --post  Use POST instead of GET in http mode.
  73.     --head  Use HEAD instead of GET in http mode.
  74.     --get   Shorthand to invoke "http" mode for consistency's sake.

  75.     --proxy-server _proxyserver_
  76.             Connect to _proxyserver_ to request the url rather than the server indicated in the url itself.
  77.     --proxy-port _port_
  78.             Specify the numeric TCP port of the proxy server.  Defaults to 3128.
  79.     --proxy-credentials username:password
  80.             Specify a username:password pair which is sent as a 'Proxy-Authorization: Basic' header.


  81. RETURN VALUE
  82.     tcping returns 0 if all pings are successful, 1 if zero pings are successful and 2 for mixed outcome.

  83. BUGS/REQUESTS
  84.     Please report bugs and feature requests to the author via contact information on http://www.elifulkerson.com
  85.    
  86. AVAILABILITY
  87.     tcping is available at http://www.elifulkerson.com/projects/tcping.php
复制代码


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|Mr.Yan的技术博客 ( 鲁ICP备2023017294号-1 )

GMT+8, 2024-9-21 08:52 , Processed in 0.014599 second(s), 20 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表