Skip to main content

PsPing v1.0

By Mark Russinovich

Published: October 3, 2012

Download PsTools (1.6 MB)

Rate:  

Introduction


PsPing is a command-line utility for measuring network performance. In addition to standard ICMP ping functionality, it can report the latency of connecting to TCP ports, the latency of TCP round-trip communication between systems, and the TCP bandwidth available to a connection between systems. Besides obtaining min, max, and average values in 0.01ms resolution, you can also use PsPing to generate histograms of the results that are easy to import into spreadsheets.

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]

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

 

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

-hPrint histogram (default bucket count is 20).
-iInterval in seconds. Specify 0 for fast ping.
-lRequest size.
-nNumber of pings.
-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]] [-i <interval>] [-l <requestsize> [-q] [-t|-n <count>] [-w <count>] <destination:destport>

-hPrint histogram (default bucket count is 20).
-iInterval in seconds. Specify 0 for fast ping.
-lRequest size.
-nNumber of pings.
-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 latency usage:

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

client: psping [[-6]|[-4]] [-h [buckets]] [-r] <-l requestsize>] <-n count> [-w <count>] <destination:destport>

-hPrint histogram (default bucket count is 20).
-lRequest size.
-nNumber of sends/receives.
-rReceive from the server instead of sending.
-wWarmup with the specified number of iterations (default is 5).
-4Force using IPv4.
-6Force using IPv6.

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

TCP bandwidth usage:

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

client: psping [[-6]|[-4]] -b [-h [buckets]] [-r] <-l requestsize> <-n count> [-i <outstanding>] [-w <count>] <destination:destport>

-bBandwidth test.
-hPrint histogram (default bucket count is 20).
-iNumber of outstanding I/Os (default is min of 16 and 2x CPU cores).
-lRequest size.
-nNumber of sends/receives.
-rReceive from the server instead of sending.
-wWarmup for the specified iterations (default is 2x CPU cores).
-4Force using IPv4.
-6Force using IPv6.

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 8192 -n 10000 -h 100 192.168.2.2:5000

This is the same command except with a -b option, which executed against the same server performs a bandwidth test. Note that the test must run for at least one second after warmup for a histogram to generate:

psping -b -l 8192 -n 10000 -h 100 192.168.2.2:5000

 


Download PsTools
(1.6 MB)

Download


Download PsTools
(1.6 MB)

PsTools

PsPing is part of a growing kit of Sysinternals command-line tools that aid in the adminstration of local and remote systems named PsTools.

 

Runs on:

  • Client: Windows Vista and higher.
  • Server: Windows Server 2008 and higher.
Microsoft is conducting an online survey to understand your opinion of the MSDN Web site. If you choose to participate, the online survey will be presented to you when you leave the MSDN Web site.

Would you like to participate?