ping程序发送icmp包,用于检测网络连通性,如果主机禁ping,就没办法判断连通性了。
tcping程序基于tcp协议,可以通过对指定端口发送协议包,查看网络延迟及开放的端口信息。
tcping的官网为:https://elifulkerson.com/projects/tcping.php,可以根据自身系统选择32位/64位。
本站下载中心也提供有此工具的下载,转到下载中心。
安装方法:
将下载的exe文件放到 c:\windows\system32\ 目录下面(如果下载的是64位的要把文件名改为tcping.exe 反之使用的时候要输入 tcping64 )
tcping命令使用:
可以直接运行tcping命令,和用ping命令一样,在机房禁PING或服务器禁PING的情况下来监控服务器的端口的状态,默认是检测80端口,也可以检测其他端口(需要在IP后空格端口号)。
格式:
tcping IP地址 端口号
示例:
tcping baidu.com tcping -t baidu.com tcping 12.3.4.5 tcping -t 12.3.4.5 8080
默认tcping的指令包含以下信息:
-------------------------------------------------------------- tcping.exe by Eli Fulkerson Please see http://www.elifulkerson.com/projects/ for updates. -------------------------------------------------------------- Usage: C:\Users\Administrator\tcping.exe [-flags] server-address [server-port] Usage (full): C:\Users\Administrator\tcping.exe [-t] [-d] [-i interval] [-n times] [-w ms] [-b n] [-r times] [-s] [-v] [-j] [-js size] [-4] [-6] [-c] [-g count] [-S source_address] [--file] [--tee filename] [-h] [-u] [--post] [--head] [--proxy-port port] [--proxy-server server] [--proxy-credentials username:password] [-f] server-address [server-port] -t : ping continuously until stopped via control-c -n 5 : for instance, send 5 pings -i 5 : for instance, ping every 5 seconds -w 0.5 : for instance, wait 0.5 seconds for a response -d : include date and time on each line -b 1 : enable beeps (1 for on-down, 2 for on-up, 3 for on-change, 4 for always) -r 5 : for instance, relookup the hostname every 5 pings -s : automatically exit on a successful ping -v : print version and exit -j : include jitter, using default rolling average -js 5 : include jitter, with a rolling average size of (for instance) 5. --tee : mirror output to a filename specified after '--tee' --append : Append to the --tee filename rather than overwriting it -4 : prefer ipv4 -6 : prefer ipv6 -c : only show an output line on changed state --file : treat the "server-address" as a filename instead, loop through file line by line Note: --file is incompatible with options such as -j and -c as it is looping through different targets Optionally accepts server-port. For example, "example.org 443" is valid. Alternately, use -p to force a port at command line for everything in the file. -g 5 : for instance, give up if we fail 5 times in a row -S _X_ : Specify source address _X_. Source must be a valid IP for the client computer. -p _X_ : Alternate method to specify port --fqdn : Print domain name on each line if available --ansi : Use ANSI color sequences (cygwin) --color: Use Windows color sequences HTTP Options: -h : HTTP mode (use url without http:// for server-address) -u : include target URL on each line --post : use POST rather than GET (may avoid caching) --head : use HEAD rather than GET --proxy-server : specify a proxy server --proxy-port : specify a proxy port --proxy-credentials : specify 'Proxy-Authorization: Basic' header in format username:password Debug Options: -f : force tcping to send at least one byte --header : include a header with original args and date. Implied if using --tee. --block : use a 'blocking' socket to connect. This prevents -w from working and uses the default timeout (as long as 20 seconds in my case). However it can detect an actively refused connection vs a timeout. If you don't pass server-port, it defaults to 80.
原创文章,转载请注明出处:http://jilys.cn/blogs/details/143