Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Data Archive Reference

Connection history information

  • Last UpdatedJun 29, 2023
  • 4 minute read

Data Archive stores the history of connections from clients, interfaces, and other applications. You can retrieve connection history information, by using the connectionhistory option of the pidiag command.

You can configure how connection history information is gathered by using the piconfig utility.

pidiag -connectionhistory required parameters

  • -u

    Lists all unique products in the connection history database, each with a list of associated nodes.

  • -n

    Lists all nodes in the connection history database, each with a list of associated products.

  • -i

    Lists all products associated with a specific client IP address, and shows the number of connections for that product.

  • -p

    Lists all nodes associated with a specific product, and shows the number of connections for each node.

  • -r

    Generates the raw view of the data, which is used by Data Archive to generate the other output formats. The raw data contains the following information in CSV format:

    • Start time of each connection

    • End time of each connection

    • Shutdown state

    • IP address

    • The connection ID as recorded by pinetmgr (can be associated with distinct connections)

    • A globally unique connection ID (cannot be associated with distinct connections)

    • The executable name

    • The executable name resolved through the license manager.

pidiag -connectionhistory optional parameters

  • -s

    Specifies a start time for the query. Anything before the start time is excluded from the results.

  • -e

    Specifies an end time for the query. Anything after the end time is excluded from the results.

  • -f

    Writes the connection history information to a file at the specified path.

    Note: If a file of the same name already exists, it is overwritten.

Examples of using pidiag -connectionhistory

To run the pidiag command, at a command prompt go to the PI\adm directory.

The following example shows all unique products, the number of clients associated with them, and the IP addresses of those clients.

pidiag -connectionhistory -u
Start time: no time specified
End time: no time specified

Product Number of node IPs Node IP address[es]
pibackup 4 107.222.204.184 236.155.38.128 251.117.240.45
39.2.24.144

pisqlss 2 236.155.38.128 251.117.240.45

SMTHost 1 251.117.240.45

Number of unique products: 3

The following example shows all nodes and the products associated with each of them

pidiag -connectionhistory -n
Start time: no time specified
End time: no time specified

Node IP Number of products Product(s)
127.0.0.1 20 pibackup pisqlss pibatch
PI-IN-UNIINT pipeschd piupdmgr
piarchss SMTHost pibasess
PI-IN-OS-RMP pialarm pilicmgr
PIPC Log Server pisnapss PI-IN-OS-RAND
pimsgss piaflink piconfig
pitotal pishutev

10.8.23.159 1 SMTHost

Number of unique nodes: 2

The following example shows all connections from the IP address 127.0.0.1.

pidiag -connectionhistory -i 127.0.0.1
Start time: no time specified
End time: no time specified

Product Number of connections with product
pibackup 2
pisqlss 2
pibatch 2
SMTHost 4

Total number of products: 4
Total number of connections with 127.0.0.1: 10

The following example shows all connections from the product called SMTHost.

pidiag -connectionhistory -p SMTHost
Start time: no time specified
End time: no time specified

Node IP Number of connections with Node IP
127.0.0.1 4
10.8.23.159 4

Total number of node IPs: 2
Total number of connections with SMTHost: 8

The following example shows all nodes associated with the SMTHost product, for which the connection ended before February 14, 2017, at 1:42 PM.

pidiag -connectionhistory -p SMTHost -e "14-Feb-17 13:42:00"
Start time: no time specified
End time: 14-Feb-17 13:42:00
Node IP Number of connections with Node IP
127.0.0.1 4
Total number of node IPs: 1
Total number of connections with SMTHost: 4

The following example shows all raw data for connections that ended before February 14, 2017, at 1:42 PM.

pidiag -connectionhistory -r -e "14-Feb-17 13:42:00"
Start Time, End Time, Ungracefully Shutdown, IP Address, Connection ID, Connection Guid, Executable Name, License 14-Feb-17 13:06:10,14-Feb-17 13:10:28,No,127.0.0.1,8,9,"SMTHost.exe","SMTHost"
14-Feb-17 13:39:22,14-Feb-17 13:41:08,Yes,127.0.0.1,0,1,"pisqlss","pisqlss"
14-Feb-17 13:04:59,14-Feb-17 13:05:08,Yes,127.0.0.1,4,5,"pibatch","pibatch"
14-Feb-17 13:05:59,14-Feb-17 13:06:11,No,10.8.23.159,27,28,"SMTHost.exe(7132):remote","SMTHost"

The following example shows all unique products that connected between March 30, 2017, at 10:50 AM and March 31, 2017, at 10:50 AM.

pidiag -connectionhistory -u -s "30-Mar-17 10:50:00" -e "31-Mar-17 10:50:00"
Start time: 30-Mar-17 10:50:00
End time: 31-Mar-17 10:50:00
Product Number of node IPs Node IP address[es]
PI-IN-OS-RMP 1 127.0.0.1
pibasess 1 127.0.0.1
pimsgss 1 127.0.0.1
piarchss 1 127.0.0.1
PIPC Log Server 1 127.0.0.1
Number of unique products: 5

The following example writes all instances to the file history.txt and sorts based on the node IP address.

pidiag -connectionhistory -n -f history.txt

The contents of history.txt might look like the following example:

type history.txt
Start time: no time specified
End time: no time specified

Node IP Number of products Product(s)
127.0.0.1 20 pibackup pisqlss pibatch
PI-IN-UNIINT pipeschd piupdmgr
piarchss SMTHost pibasess
PI-IN-OS-RMP pialarm pilicmgr
PIPC Log Server pisnapss PI-IN-OS-RAND
pimsgss piaflink piconfig
pitotal pishutev

10.8.23.159 1 SMTHost

Number of unique products: 2

TitleResults for “How to create a CRG?”Also Available in