OpenPDC to OpenPDC communication

Stephen,

Yes the database is SQlite.

It’s a bit of work, but you don’t need to install any special tools to run the query. Here are the steps.

  1. Use a text editor to open openPDC.exe.config in the openPDC installation directory.
  2. Search for the ConnectionString setting under the <systemSettings> section.
  3. The value of the connection string setting contains the full path to your SQLite database (e.g. Data Source=C:\path\to\openPDC.db). Save that path as we will be using it later.
  4. Open the Windows command prompt.
  5. Type cd /d C:\Program Files\openPDC\Database Scripts\SQLite, replacing C:\Program Files\openPDC with the path to the openPDC installation directory, and press Enter.
  6. Type echo SELECT * FROM ActiveMeasurement WHERE Protocol = 'GatewayTransport'; | sqlite3 -header -column C:\path\to\openPDC.db > C:\path\to\MeasurementDump.txt. Replace C:\path\to\openPDC.db with the path obtained from step 3. Replace C:\path\to\MeasurementDump.txt with a path to a file where you would like the command to write the results. Once the paths are right, press enter.

The results should be written to the file you specified in step 6.

Hi Stephen,

When I do these steps I keep getting “Access is denied”

Tyler

This is the command I’ve given the system. And the resulting denial.

C:\Program Files\openPDC\Database Scripts\SQLite>echo SELECT * FROM ActiveMeasurement WHERE Protocol = ‘GatewayTransport’; | sqlite3 -header -column C:\Users\ePDC Operator\Desktop\OpenPDC Archive\openPDC.db > C:\Users\ePDC Operator\Desktop\MDump1.txt
Access is denied.

Does your user account have permissions to access the SQLite database file? You can try copying the file to another location and running the query against the copy.

Ok, so using the copied database worked. I now have the dump text, and it appears that the system is subscribed to STAT 133 to 146 and PPA 147 to 231.

The PPA measurements it is subscribed to seem to be all Phasor measurements available.

FYI, I figured out what happened. Since the path to your database file had spaces, it parsed everything up to the space as the filename. you just needed to wrap it in quotes.

C:\Program Files\openPDC\Database Scripts\SQLite>echo SELECT * FROM ActiveMeasurement WHERE Protocol = 'GatewayTransport'; | sqlite3 -header -column "C:\Users\ePDC Operator\Desktop\OpenPDC Archive\openPDC.db" > C:\Users\ePDC Operator\Desktop\MDump1.txt

That may be important for this next step because we’re going to run a query against the publisher’s database.

Before I get into it, though, I thought I should confirm with you. Did you follow the steps using the openPDC Console to see how the publisher reported the number of subscribed signals?

I have not been able to do that so far (PDC1 and PDC2 are in separate physical locations).

How do I initialize the subscriber on PDC2? I can try to work this out provided it is ok that I have about 5 minutes lag between each step that requires a change in PDC.

Tyler

I was thinking you had remote desktop access to both systems. Instead, let’s open up the openPDC Console on PDC1 and type the following command. Don’t worry if a message comes in while you’re typing - just keep typing.

list internal!datapublisher

This should dump a huge amount of info to the console. What you’re looking for is a section like the following. There may be more than one of these sections, but you should be able to tell by the Subscriber ID which one is the subscriber from PDC2.

Status of IActionAdapter component 2, UnsynchronizedClientSubscription:

             Subscriber ID: swills-desk.gpa.gridprotectionalliance.org ([::ffff:127.0.0.1]:52045)
           Subscriber name:
        Subscriber acronym:
  Publish channel protocol: Tcp
      Data packet security: unencrypted

       Data source defined: True
    Referenced data source: Iaon, 21 tables
    Initialization timeout: 15,000 milliseconds
       Adapter initialized: True
         Operational state: Running
         Connect on demand: False
    Processed measurements: 200,434
    Total adapter run time: 2 minutes 42.6 seconds
       Temporal processing: Unsupported
   Item reporting interval: Every 100,000 items
                Adapter ID: 0
         Connection string: 14 key/value pairs

  TrackLatestMeasurements = False
     InputMeasurementKeys = cd61500f-fca9-4a9d-b472-77f8d11b1f55;e54f1c2a-5...
              DataChannel =
              IncludeTime = True
                  LagTime = 10
                 LeadTime = 5
  UseLocalClockAsRealTime = False
      StartTimeConstraint =
       StopTimeConstraint =
 TimeConstraintParameters =
       ProcessingInterval = -1
 UseMillisecondResolution = False
    RequestNaNValueFilter = False
             AssemblyInfo = source=GSF.TimeSeries; version=2.1.275; buildDa...

        Input measurements: 138 defined measurements

                     PPA:123
                     PPA:124
                     PPA:125
                     PPA:126
                     PPA:127
                     PPA:128
                     PPA:129
                     PPA:130
                     PPA:131
                     PPA:132
                       ...

        Defined frame rate: 0 frames/sec
      Measurement tracking: Disabled
  Respecting input demands: False
 Respecting output demands: True

The important line is the one that lists the number of input measurements.

        Input measurements: 138 defined measurements

It appears that nothing is showing up other than the direct connected PMU and the PDC1 id.

    3      INTERNAL!DATAPUBLISHER
                              Publishing data to 4 clients.

              Server state: Running
            Server runtime: 5 days 3 hours 18 seconds
         Connected clients: 4
           Maximum clients: Infinite
            Receive buffer: 8192
        Transport protocol: Tcp
        Text encoding used: US-ASCII
           Queued payloads: 0 for client 1
           Queued payloads: 0 for client 2
           Queued payloads: 0 for client 3
           Queued payloads: 0 for client 4
  Total adapter components: 5
    Collection initialized: True
    Initialization timeout: 15000 milliseconds
 Current operational state: Enabled
       Temporal processing: Unsupported
       Data source defined: True
    Referenced data source: Iaon, 21 tables
    Data source table name: [internal]
         Connection string: 4 key/value pairs

             SecurityMode = None
AllowSynchronizedSubscrip = false
       UseBaseTimeOffsets = true
     CacheMeasurementKeys = FILTER ActiveMeasurements WHERE SignalType = 'S...


Status of each INTERNAL!DATAPUBLISHER component:
-------------------------------------------------------------------------------

Status of IActionAdapter component 1, LatestMeasurementCache:
       Data source defined: True
    Referenced data source: Iaon, 21 tables
    Initialization timeout: 15,000 milliseconds
       Adapter initialized: True
         Operational state: Running
         Connect on demand: False
    Processed measurements: 0
    Total adapter run time: 5 days 3 hours 17.93 seconds
       Temporal processing: Unsupported
   Item reporting interval: Every 100,000 items
                Adapter ID: 0
         Connection string: 4 key/value pairs

  TrackLatestMeasurements = true
                  LagTime = 60
                 LeadTime = 60
     InputMeasurementKeys = FILTER ActiveMeasurements WHERE SignalType = 'S...

        Input measurements: 175 defined measurements

                      STAT:1
                      STAT:2
                      STAT:3
                      STAT:4
                      STAT:5
                      STAT:6
                      STAT:7
                      STAT:8
                      STAT:9
                     STAT:10
                       ...

        Defined frame rate: 0 frames/sec
      Measurement tracking: Enabled
  Respecting input demands: False
 Respecting output demands: True

Status of IActionAdapter component 2, UnsynchronizedClientSubscription:

             Subscriber ID: ttupdc.ttu.edu ([::1]:63187)
           Subscriber name:
        Subscriber acronym:
  Publish channel protocol: Tcp
      Data packet security: unencrypted

       Data source defined: True
    Referenced data source: Iaon, 21 tables
    Initialization timeout: 15,000 milliseconds
       Adapter initialized: True
         Operational state: Running
         Connect on demand: False
    Processed measurements: 0
    Total adapter run time: 49.74 seconds
       Temporal processing: Unsupported
   Item reporting interval: Every 100,000 items
                Adapter ID: 0
         Connection string: 11 key/value pairs

  TrackLatestMeasurements = False
          PublishInterval = -1
              IncludeTime = True
                  LagTime = 10
                 LeadTime = 5
  UseLocalClockAsRealTime = False
       ProcessingInterval = -1
 UseMillisecondResolution = False
    RequestNaNValueFilter = False
             AssemblyInfo = source=GSF.TimeSeries;version=2.1.264;buildDate...
     InputMeasurementKeys = FILTER ActiveMeasurements WHERE SignalType='ALRM'

        Defined frame rate: 0 frames/sec
      Measurement tracking: Disabled
  Respecting input demands: False
 Respecting output demands: True

Status of IActionAdapter component 3, UnsynchronizedClientSubscription:

             Subscriber ID: ttupdc.ttu.edu ([::1]:63189)
           Subscriber name:
        Subscriber acronym:
  Publish channel protocol: Tcp
      Data packet security: unencrypted

       Data source defined: True
    Referenced data source: Iaon, 21 tables
    Initialization timeout: 15,000 milliseconds
       Adapter initialized: True
         Operational state: Running
         Connect on demand: False
    Processed measurements: 1,544
    Total adapter run time: 43.05 seconds
       Temporal processing: Unsupported
   Item reporting interval: Every 100,000 items
                Adapter ID: 0
         Connection string: 11 key/value pairs

  TrackLatestMeasurements = True
          PublishInterval = 2
              IncludeTime = True
                  LagTime = 60
                 LeadTime = 60
  UseLocalClockAsRealTime = False
       ProcessingInterval = -1
 UseMillisecondResolution = False
    RequestNaNValueFilter = False
             AssemblyInfo = source=GSF.TimeSeries;version=2.1.264;buildDate...
     InputMeasurementKeys = 624a9d1b-9857-4ed1-80f4-9e6e68dce9b4;70385e2c-9...

        Input measurements: 71 defined measurements

                     PPA:256
                     PPA:254
                     PPA:255
                     PPA:259
                     PPA:262
                     PPA:258
                     PPA:260
                     PPA:261
                     PPA:257
                     PPA:297
                       ...

        Defined frame rate: 0 frames/sec
      Measurement tracking: Enabled
  Respecting input demands: False
 Respecting output demands: True

Status of IActionAdapter component 4, UnsynchronizedClientSubscription:

             Subscriber ID: ttupdc.ttu.edu ([::1]:63190)
           Subscriber name:
        Subscriber acronym:
  Publish channel protocol: Tcp
      Data packet security: unencrypted

       Data source defined: True
    Referenced data source: Iaon, 21 tables
    Initialization timeout: 15,000 milliseconds
       Adapter initialized: True
         Operational state: Running
         Connect on demand: False
    Processed measurements: 850
    Total adapter run time: 42.95 seconds
       Temporal processing: Unsupported
   Item reporting interval: Every 100,000 items
                Adapter ID: 0
         Connection string: 11 key/value pairs

  TrackLatestMeasurements = False
          PublishInterval = 2
              IncludeTime = True
                  LagTime = 60
                 LeadTime = 60
  UseLocalClockAsRealTime = False
       ProcessingInterval = -1
 UseMillisecondResolution = False
    RequestNaNValueFilter = False
             AssemblyInfo = source=GSF.TimeSeries;version=2.1.264;buildDate...
     InputMeasurementKeys = a67be298-61b6-43c3-9a1a-f7685f34ba32;04f87055-e...

        Input measurements: 175 defined measurements

                     STAT:104
                     STAT:180
                     PPA:263
                     PPA:304
                     STAT:336
                     STAT:341
                     STAT:110
                     PPA:269
                     PPA:310
                      STAT:1
                       ...

        Defined frame rate: 0 frames/sec
      Measurement tracking: Disabled
  Respecting input demands: False
 Respecting output demands: True

Status of IActionAdapter component 5, UnsynchronizedClientSubscription:

             Subscriber ID: ttupdc.ttu.edu ([::1]:63192)
           Subscriber name:
        Subscriber acronym:
  Publish channel protocol: Tcp
      Data packet security: unencrypted

       Data source defined: True
    Referenced data source: Iaon, 21 tables
    Initialization timeout: 15,000 milliseconds
       Adapter initialized: True
         Operational state: Running
         Connect on demand: False
    Processed measurements: 2,086
    Total adapter run time: 34.76 seconds
       Temporal processing: Unsupported
   Item reporting interval: Every 100,000 items
                Adapter ID: 0
         Connection string: 14 key/value pairs

  TrackLatestMeasurements = False
     InputMeasurementKeys = 88645bca-775c-4e51-8577-00cfd5068510;c3d58cbd-c...
              DataChannel =
              IncludeTime = True
                  LagTime = 3
                 LeadTime = 1
  UseLocalClockAsRealTime = False
      StartTimeConstraint =
       StopTimeConstraint =
 TimeConstraintParameters =
       ProcessingInterval = -1
 UseMillisecondResolution = False
    RequestNaNValueFilter = False
             AssemblyInfo = source=GSF.TimeSeries; version=2.1.264; buildDa...

        Input measurements: 2 defined measurements

                     PPA:255
                     PPA:296

        Defined frame rate: 0 frames/sec
      Measurement tracking: Disabled
  Respecting input demands: False
 Respecting output demands: True

-------------------------------------------------------------------------------
  Respecting input demands: False
 Respecting output demands: False
  Buffer block retransmits: 0





[PPA] 1,103,600,006 measurements have been processed so far...

State of process "HealthMonitor" has changed to "Processing".

State of process "HealthMonitor" has changed to "Processed".


Counter                  Last         Average       Maximum         Units
-------------------- ------------- ------------- ------------- ----------------
     CPU Utilization     0.31          0.64          1.95      Average % / CPU
       I/O Data Rate     21.12         57.28        284.19     Kilobytes / sec
   I/O Activity Rate    2089.41       2090.07       2373.48    Operations / sec
Process Handle Count    1423.00       1390.18       1911.00    Total Handles
Process Thread Count     53.00         51.27         56.00     System Threads
    CLR Thread Count     97.00         92.88        189.00     Managed Threads
   Thread Queue Size     0.00          0.00          0.00      Waiting Threads
Lock Contention Rate     0.00          0.01          0.60      Attempts / sec
Process Memory Usage    195.20        191.59        195.20     Megabytes
    CLR Memory Usage     72.98         72.91         73.95     Megabytes
   Large Object Heap     3.61          3.48          3.61      Megabytes
     Exception Count  5411554.00    5411470.00    5411554.00   Total Exceptions
      Exception Rate     0.00          0.25          3.40      Exceptions / sec
  IPv4 Outgoing Rate     89.74         64.85        155.78     Datagrams / sec
  IPv4 Incoming Rate     84.16         68.68        208.78     Datagrams / sec
  IPv6 Outgoing Rate     0.00          0.93          12.60     Datagrams / sec
  IPv6 Incoming Rate     0.00          0.01          1.80      Datagrams / sec

Statistics calculated using last 120 counter values sampled every 5.0 seconds.

[NI_STATION] 856,200,001 measurements have been processed so far...

This is what is showing. I do not see any mention of the connection between PDC1 and PDC2

Yeah, I don’t see it either. Let’s try the openPDC Console on PDC2, then. Try running this command.

list TTU2NIRE

That should give us some info about whether it’s connected and what it thinks it’s connected to.

Stephen,

When running the command above I get the following:

Connecting to tcp://localhost:8500...

Connected to tcp://localhost:8500:

              Client state: Connected
           Connection time: less than 1 second
            Receive buffer: 8192
        Transport protocol: Tcp
        Text encoding used: US-ASCII

Remote client connected - Group_NIRE_ePDC\ePDC Operator from GROUP_NIRE_EPDC.

list TTU2NIRE

System Uptime: 11 days 11 hours 39 minutes 41 seconds

>> Selected adapter from Input Adapter Collection

    ID     Name
---------- --------------------------------------------------------------------
    11     TTU2NIRE
             Subscriber is connected and receiving unsynchronized data points

         Subscription mode: Unsynchronized
  Pending command requests: 2
             Authenticated: False
                Subscribed: True
      Data packet security: Unencrypted
      Data monitor enabled: False
              Logging path: C:\Program Files\openPDC\ConfigurationCache\
No data reconnect interval: 5.000 seconds
    Data gap recovery mode: Disabled

              Command Channel Status
              ----------------------
              Client state: Connected
           Connection time: 5 days 18 hours 46 minutes 18 seconds
            Receive buffer: 32768
        Transport protocol: Tcp
        Text encoding used: US-ASCII
           Queued payloads: 0
       Data source defined: True
    Referenced data source: Iaon, 21 tables
    Initialization timeout: 15,000 milliseconds
       Adapter initialized: True
         Operational state: Running
         Connect on demand: False
    Processed measurements: 0
    Total adapter run time: 5 days 18 hours 46 minutes 29.41 seconds
       Temporal processing: Unsupported
   Item reporting interval: Every 100,000 items
                Adapter ID: 11
         Connection string: 23 key/value pairs

                Interface = 0.0.0.0
              Compression = false
              AutoConnect = true
             SecurityMode = None
                   Server = <Correct IP and Port>
                 Internal = False
  ReceiveInternalMetadata = True
  ReceiveExternalMetadata = False
       OutputMeasurements = FILTER ActiveMeasurements WHERE Protocol = 'Gat...
           IsConcentrator = 1
                 AccessID = 100
                 TimeZone = Central Standard Time
      TimeAdjustmentTicks = 0
           PhasorProtocol = GatewayTransport
         DataLossInterval = 5.0
 AllowedParsingExceptions = 10
   ParsingExceptionWindow = 5.0
DelayedConnectionInterval = 5.0
AllowUseOfCachedConfigura = 1
AutoStartDataParsingSeque = 1
  SkipDisableRealTimeData = 0
MeasurementReportingInter = 100000
          ConnectOnDemand = 0

       Output measurements: 99 defined measurements

         GNI_TTU2NIRE!SUB:ST1 [STAT:133] f5e5b3a8-990e-4680-8d09-e02e9403f909
         GNI_TTU2NIRE!SUB:ST2 [STAT:134] 740bdd05-399b-41a4-821d-fa5f355cd325
         GNI_TTU2NIRE!SUB:ST3 [STAT:135] 408d33b3-6cc0-4950-9844-7bcdc071fefc
         GNI_TTU2NIRE!SUB:ST4 [STAT:136] b590206d-94bf-4cef-a4ca-97f53d70c102
         GNI_TTU2NIRE!SUB:ST5 [STAT:137] ea3e56a2-8611-4b98-ba81-b00bcf4a10e8
         GNI_TTU2NIRE!SUB:ST6 [STAT:138] f9a04c8b-8110-49aa-8430-b8f4a0e2e5be
         GNI_TTU2NIRE!SUB:ST7 [STAT:139] d6a27111-f77f-4bca-82f9-ff49fd777b83
         GNI_TTU2NIRE!SUB:ST8 [STAT:140] a5259665-9343-4c1e-8202-6a929925c078
         GNI_TTU2NIRE!SUB:ST9 [STAT:141] 2521137b-0ddb-43ef-b2f2-e2b8203d9197
        GNI_TTU2NIRE!SUB:ST10 [STAT:142] 1013d795-f499-4c16-a4fe-9524d5266719
                       ...

    Connection established: True
   Asynchronous connection: True





[Input Adapter Collection]
Process statistics for 11 days 11 hours 39 minutes 51 seconds total runtime:

Time span        Measurements    Per second
-------------- ----------------- ----------
Entire runtime    535,885,488       539
Last minute         32,400          539

[Output Adapter Collection]
Process statistics for 11 days 11 hours 39 minutes 51 seconds total runtime:

Time span        Measurements    Per second
-------------- ----------------- ----------
Entire runtime    548,136,592       552
Last minute         33,198          553

State of process "HealthMonitor" has changed to "Processing".

State of process "HealthMonitor" has changed to "Processed".


Counter                  Last         Average       Maximum         Units
-------------------- ------------- ------------- ------------- ----------------
     CPU Utilization     2.02          1.97          3.31      Average % / CPU
       I/O Data Rate     13.83         23.00        174.71     Kilobytes / sec
   I/O Activity Rate    597.44        592.18        735.30     Operations / sec
Process Handle Count    1630.00       1495.08       2064.00    Total Handles
Process Thread Count     67.00         65.33         70.00     System Threads
    CLR Thread Count 4294967000.00 4294967000.00 4294967000.00 Managed Threads
   Thread Queue Size     0.00          0.00          0.00      Waiting Threads
Lock Contention Rate     0.00          0.03          0.60      Attempts / sec
Process Memory Usage    398.10        396.97        401.24     Megabytes
    CLR Memory Usage     22.87         21.77         31.27     Megabytes
   Large Object Heap     10.91         9.77          18.85     Megabytes
     Exception Count   32507.00      32474.73      32507.00    Total Exceptions
      Exception Rate     0.00          0.10          1.20      Exceptions / sec
  IPv4 Outgoing Rate     28.30         26.58         30.95     Datagrams / sec
  IPv4 Incoming Rate     44.43         42.55         55.92     Datagrams / sec
  IPv6 Outgoing Rate     0.80          0.84          2.79      Datagrams / sec
  IPv6 Incoming Rate     1.39          0.03          1.39      Datagrams / sec

Statistics calculated using last 120 counter values sampled every 5.0 seconds.

It is worth noting that running this command on PDC1 yields the same result (number of subscribed inputs, IPs listed properly, etc.)

So PDC2 is apparently connected to PDC1 and subscribed to 99 measurements, and has been for over 5 days, but PDC1 is completely unaware of PDC2’s subscription. Furthermore, PDC2 has processed 0 measurements in 5 days, but its “No data reconnect interval” is set to 5 seconds. Seems to me there is likely something wrong with the subscriber on PDC2.

Have you ever tried initializing the subscriber device? I had assumed it would have been one of your earliest troubleshooting steps, but it occurs to me now that you may not have tried it. You can do so using the openPDC Manager by navigating to the device configuration through the “Browse Input Devices” page and clicking the Initialize button. You can also do so through the openPDC Console by typing initialize TTU2NIRE.

It does appear that this has fixed it. I am terribly sorry it was such a small issue that I neglected that cause all of this and for taking up so much of your time; I am still very new to OpenPDC. I really appreciate all of your help, I’ve learned quite a bit about troubleshooting the PDC systems.

It’s no problem. I also should have suggested it sooner. I’m glad it’s working now.

Thanks,
Stephen

HI stephen.

i have followed your instruction couple of times. but can not do any communication. i have added one screen shot with this.


here is the measurement page. can you point me out my problem.

Is PMU_OPAL an openPDC device? I believe you are using the wrong protocol to connect to PMU_OPAL. Try using the input device wizard instead. Or you can provide more detail about what you are trying to do, preferably in a new topic on this discussion board.