Pping Instructions
Introduction
Pping is a multi-threaded console utility for Win32 (NT and Win9x). It is similar to the ping program that comes with OS's that have TCP/IP. Ping sends an ICMP message to the remote machine and waits for a response. The output of ping is verbose and needs some explanation to a lay-person. Pping, on the other hand, gives a simple go/no-go type of response that is more suitable for checking if the remote machine is responding. Further, Pping accepts multiple remote machine names as well as 'wild-cards' for IP addresses.
Pping has been tested with NT 3.5x, 4.0 and Win9x. The current version is 0.4 dated 21-May-1996.
A zip file containing the distribution may be downloaded from my Web servers (check http://www.intsoft.com/products/ for details).
Usage
The basic BNF syntax for invoking pping is: "pping {control_arg} {address}"
This says that any number of control arguments may be followed by any number of addresses. Control arguments start with a "/" or "-" character. Permitted control arguments are
- /include:<filename> makes pping read further arguments from the specified file. Each argument must be on a separate line. Leading and trailing blanks will be trimmed. Empty lines as well as lines that start with a # will be ignored. Include files may be nested to a maximum depth of 10.
- /report:["all" | "ok" | "error"] Indicates what pping should report. "All" causes successful and timed out messages to be reported. "Ok" says that only successful replies should be reported. "Error" indicates that only time-out and errors are to be reported.
- /size:<buffer_size_in_bytes>. By default a small message of 20 bytes is sent to each machine being pinged. This control argument allows the buffer size to be specified. The maximum size is 300 bytes; it silently sets it to 300 if the number you specify exceeds it.
- /timeout:< number_of_seconds>. By default pping waits up to 5 seconds for a response. This control argument allows you to specify a more appropriate number for your network.
- /times:< number_of_messages_per_machine> By default only one message will be sent to each machine that is being pinged. This control argument allows any number to be specified.
- /verbose This control argument will cause pping to display additional information to be shown. Currently, the alternate address (dotted IP address or hostname) and the round trip time (in milliseconds) are displayed. Note that round trip times have an accuracy of a few milliseconds (~3 milliseconds on Win95, 10 on NT 3.51) and hence a value of 0 does not mean that it was instantaneous.
Addresses may be a hostname (with or without domains) or an IP address in dotted decimal format. IP addresses can also have wild-cards for specifying multiple machine with a comma or a dash for a range. The syntax for the IP address is: numseq "." numseq "." numseq "." numseq where numseq is num ["-" num] ["," numseq] and num is a decimal number between 0 and 255.
For those who embed pping in a batch file, the following ERRORLEVEL is returned on termination:
- 0 = all specified machines responded
- 1 = some - not all - specified machines responded
- 2 = none of the machines responded
- 255 = miscellaneous error
Examples
To check if the machine NTBOX is running type: pping ntbox in a console window. It will display a line indicating if that machine has responded. Multiple machines can be checked by putting their names on the command line as in pping ntbox1 ntbox2 ntbox3. Instead of names one can also specify IP addresses in the dotted decimal format. Thus pping 195.234.67.89 will try to reach the machine with that IP address. One could check if all machines in that subnet are ok by giving 195.234.67.1-255. This will check all machines 195.234.67.1, 195.234.67.2 and so on till 195.234.67.255. Hostnames cannot have wild-cards.
Contacting the author
I would welcome any constructive criticism regarding the program, its usefulness to you and any assorted ideas you have which might improve it. However, I cannot guarantee a response and, further, I cannot guarantee that I will fix bugs and/or incorporate your ideas into a future version.
Please the feedback form.
Revisions
| 0.0 to 0.1 | First public version of Pping. |
| 0.1 to 0.2 | added control arguments /times & /verbose. |
| 0.2 to 0.3 | added include file capability |
| 0.3 to 0.4 | return exit code for querying with ERRORLEVEL |
Legalese
Please read the license before using Pping.
Miscellaneous
I have not tested Pping on a Win32s system hence I have no idea if it will run on it. It uses ICMP.DLL that comes with the TCP/IP software for Win95 and NT. The executable pping.exe and this documentation file that you are reading are the only files that are supplied by me.
Note that one thread is created for each address that it is to ping. If you ask it to scan 5000 addresses it can bring NT to its knees. Your paging file might not be big enough to handle it and the machine may feel like molasses. Win95 is weaker in this respect: the mouse cursor may not be redrawn if pping is busy doing its job. Caveat emptor.
