Psping 实例

PsPing v2.1

By Mark Russinovich

Published: June 29, 2016

Download Download PsTools (2.7 MB)

Introduction

PsPing implements Ping functionality, TCP ping, latency and bandwidth measurement. Use the following command-line options to show the usage for each test type:

Installation

Copy PsPing onto your executable path. Typing "psping" displays its usage syntax.

Using PsPing

PsPing implements Ping functionality, TCP ping, latency and bandwidth measurement. Use the following command-line options to show the usage for each test type:

Usage: psping -? [i|t|l|b]

ParameterDescription
-? IUsage for ICMP ping.
-? TUsage for TCP ping.
-? LUsage for latency test.
-? BUsage for bandwidth test.

ICMP ping usage:
psping [[-6]|[-4]] [-h [buckets | <val1>,<val2>,...]] [-i <interval>] [-l <requestsize>[k|m] [-q] [-t|-n <count>] [-w <count>] <destination>

ParameterDescription
-hPrint histogram (default bucket count is 20).
 If you specify a single argument, it's interpreted as a bucket count and the histogram will contain that number of buckets covering the entire time range of values. Specify a comma-separated list of times to create a custom histogram (e.g. "0.01,0.05,1,5,10").
-iInterval in seconds. Specify 0 for fast ping.
-lRequest size. Append 'k' for kilobytes and 'm' for megabytes.
-nNumber of pings or append 's' to specify seconds e.g. '10s'.
-qDon't output during pings.
-tPing until stopped with Ctrl+C and type Ctrl+Break for statistics.
-wWarmup with the specified number of iterations (default is 1).
-4Force using IPv4.
-6Force using IPv6.

For high-speed ping tests use -q and -i 0.

TCP ping usage:
** psping [[-6]|[-4]] [-h [buckets | <val1>,<val2>,...]] [-i <interval>] [-l <requestsize>[k|m] [-q] [-t|-n <count>] [-w <count>] <destination:destport>**

ParameterDescription
-hPrint histogram (default bucket count is 20).
 If you specify a single argument, it's interpreted as a bucket count and the histogram will contain that number of buckets covering the entire time range of values. Specify a comma-separated list of times to create a custom histogram (e.g. "0.01,0.05,1,5,10").
-iInterval in seconds. Specify 0 for fast ping.
-lRequest size. Append 'k' for kilobytes and 'm' for megabytes.
-nNumber of pings or append 's' to specify seconds e.g. '10s'.
-qDon't output during pings.
-tPing until stopped with Ctrl+C and type Ctrl+Break for statistics.
-wWarmup with the specified number of iterations (default is 1).
-4Force using IPv4.
-6Force using IPv6.

For high-speed ping tests use -q and -i 0.

TCP and UDP latency usage:

server: psping [[-6]|[-4]] [-f] <-s source:sourceport>

client: psping [[-6]|[-4]] [-f] [-u] [-h [buckets | <val1>,<val2>,...]] [-r] <-l requestsize>[k|m]] <-n count> [-w <count>] <destination:destport>

ParameterDescription
-fOpen source firewall port during the run.
-uUDP (default is TCP).
-hPrint histogram (default bucket count is 20).
 If you specify a single argument, it's interpreted as a bucket count and the histogram will contain that number of buckets covering the entire time range of values. Specify a comma-separated list of times to create a custom histogram (e.g. "0.01,0.05,1,5,10").
-lRequest size. Append 'k' for kilobytes and 'm' for megabytes.
-nNumber of sends/receives. Append 's' to specify seconds e.g. '10s'
-rReceive from the server instead of sending.
-wWarmup with the specified number of iterations (default is 5).
-4Force using IPv4.
-6Force using IPv6.
-sServer listening address and port.

The server can serve both latency and bandwidth tests and remains active until you terminate it with Control-C.

TCP and UDP bandwidth usage:

server: psping [[-6]|[-4]] [-f] <-s source:sourceport>

client: psping [[-6]|[-4]] [-f] [-u] [-h [buckets | <val1>,<val2>,...]] [-r] <-l requestsize>[k|m]] <-n count> [-i <outstanding>] [-w <count>] <destination:destport>

ParameterDescription
-fOpen source firewall port during the run.
-uUDP (default is TCP).
-bBandwidth test.
-hPrint histogram (default bucket count is 20).
 If you specify a single argument, it's interpreted as a bucket count and the histogram will contain that number of buckets covering the entire time range of values. Specify a comma-separated list of times to create a custom histogram (e.g. "0.01,0.05,1,5,10").
-iNumber of outstanding I/Os (default is min of 16 and 2x CPU cores).
-lRequest size. Append 'k' for kilobytes and 'm' for megabytes.
-nNumber of sends/receives. Append 's' to specify seconds e.g. '10s'
-rReceive from the server instead of sending.
-wWarmup for the specified iterations (default is 2x CPU cores).
-4Force using IPv4.
-6Force using IPv6.
-sServer listening address and port.

The server can serve both latency and bandwidth tests and remains active until you terminate it with Control-C.

Examples

This command executes an ICMP ping test for 10 iterations with 3 warmup iterations:
psping -n 10 -w 3 marklap

To execute a TCP connect test, specify the port number. The following command executes connect attempts against the target as quickly as possible, only printing a summary when finished with the 100 iterations and 1 warmup iteration:
psping -n 100 -i 0 -q marklap:80

To configure a server for latency and bandwidth tests, simply specify the -s option and the source address and port the server will bind to:
psping -s 192.168.2.2:5000

A buffer size is required to perform a TCP latency test. This example measures the round trip latency of sending an 8KB packet to the target server, printing a histogram with 100 buckets when completed:
psping -l 8k -n 10000 -h 100 192.168.2.2:5000

This command tests bandwidth to a PsPing server listening at the target IP address for 10 seconds and produces a histogram with 100 buckets. Note that the test must run for at least one second after warmup for a histogram to generate. Simply add -u to have PsPing perform a UDP bandwidth test.
psping -b -l 8k -n 10000 -h 100 192.168.2.2:5000

转载于:https://www.cnblogs.com/fatt/p/8359672.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值