Overview

More Admin tools

Articles

Downloads

 

 

TCP Ping with timestamp to file

PingTool includes the worldwide popular command line tool PortCheck, with which you can write permanent TCP port checks to a file.


Write to log file with PortCheck

The command line tool PortCheck can be used to write the TCP port check results to a file with the following command:

PortCheck -t -st Terminal-Server1 3389 1000 c:\temp\Port3389.txt

Parameter -st ensures that each line is provided with a timestamp.


Convenient with PingTool

As of version 4.0, PingTool offers the option of creating user-defined actions that can then be applied to one or more devices (objects) via the context menu (right mouse button).

Proceed as follows to create a user-defined action that executes a permanent "TCP Ping" on port 3389 for an object and writes the results to a log file:

  1. Click on the 3-dot menu in PingTool and on "User-defined actions"
  2. For Display text, enter "TCP port check with logging", switch on the action on the left and activate "Bold".
  3. Enter the following as the command:

    cmd.exe /c "<Path to PortCheck.exe>\PortCheck.exe" -t -st %hostname% 3389 1000 %pingtoolpath%\User\%hostname%.log

Replace <Path to PortCheck.exe> with the file path in which the PortCheck.exe file is located. This is the path in which your PingTool.exe is also located. The complete command line could look like this, for example: cmd.exe /c "C:\Program Files (x86)\PingTool\PortCheck.exe" -t -st %hostname% 3389 1000 %pingtoolpath%\User\%hostname%.log

 

Save the action with OK and apply it to one or more objects using the right mouse button (context menu):

 

The PortCheck window appears on the screen with the command output.

 

In addition, the results are logged in the file %localappdata%\PingTool\User\<hostname>.log.

 

Attention: Do not close the PortCheck window while logging is active.

Instead of TCP port 3389 (Remote Desktop), you can of course use any other TCP port: Here is a list of frequently used standard ports:

TCP Port 21 - FTP
TCP Port 22 - SSH
TCP Port 23 - Telnet
TCP Port 25 - SMTP --> go to article TCP Port Check SMTP 25
TCP Port 80 - HTTP
TCP Port 110 - POP3
TCP Port 135 - DCE / WMI
TCP Port 139 - NetBIOS
TCP Port 143 - IMAP4
TCP Port 443 - HTTPS
TCP Port 445 - SMB
TCP Port 1433 - MS SQL
TCP Port 1494 - ICA (Citrix)
TCP Port 1521 - Oracle
TCP Port 3389 - RDP
TCP Port 5060 - SIP
TCP Port 8080 - HTTP alternative
TCP Port 8443 - HTTPS alternative

Continue to  >>> PingTool: User-defined actions

Software: PingTool
Category: : PingTool Help / PingTool Tutorial / PingTool Manual / TCP Ping with logging and timestamp

 

Go to Ping Tool homepage