PI Server Reference Guide

PI Server Reference Guide Published November 2009 OSIsoft, LLC 777 Davis St., Suite 250 San Leandro, CA 94577 USA Addi

Views 208 Downloads 1 File size 1MB

Report DMCA / Copyright

DOWNLOAD FILE

Recommend stories

Citation preview

PI Server Reference Guide Published November 2009

OSIsoft, LLC 777 Davis St., Suite 250 San Leandro, CA 94577 USA Additional Offices Houston, TX Johnson City, TN Longview, TX Mayfield Heights, OH Philadelphia, PA Phoenix, AZ Savannah, GA Sales Outlets/Distributors Middle East/North Africa Republic of South Africa Russia/Central Asia South America/Caribbean Southeast Asia South Korea Taiwan

International Offices OSIsoft Australia Perth, Australia OSIsoft Germany GmbH Altenstadt, Germany OSIsoft Asia Pte Ltd. Singapore OSIsoft Canada ULC Montreal, Canada Calgary, Canada OSIsoft, LLC Representative Office Shanghai, People’s Republic of China OSIsoft Japan KK Tokyo, Japan OSIsoft Mexico S. De R.L. De C.V. Mexico City, Mexico OSIsoft do Brasil Sistemas Ltda. Sao Paulo, Brazil

Contact and Support: Main phone: Fax: Support phone:

(01) 510-297-5800 (01) 510-357-8136 (01) 510-297-5828

Web site: Support web site:

http://www.osisoft.com http://techsupport.osisoft.com

Support email:

[email protected]

Copyright: © 1998-2009 OSIsoft, LLC. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, mechanical, photocopying, recording, or otherwise, without the prior written permission of OSIsoft, LLC. OSIsoft, the OSIsoft logo and logotype, PI Analytics, PI ProcessBook, PI DataLink, ProcessPoint, Sigmafine, Analysis Framework, IT Monitor, MCN Health Monitor, PI System, PI ActiveView, PI ACE, PI AlarmView, PI BatchView, PI Data Services, PI Manual Logger, PI ProfileView, PI WebParts, ProTRAQ, RLINK, RtAnalytics, RtBaseline, RtPortal, RtPM, RtReports and RtWebParts are all trademarks of OSIsoft, LLC. All other trademarks or trade names used herein are the property of their respective owners. U.S. GOVERNMENT RIGHTS Use, duplication or disclosure by the U.S. Government is subject to restrictions set forth in the OSIsoft, LLC license agreement and as provided in DFARS 227.7202, DFARS 252.227-7013, FAR 12.212, FAR 52.227, as applicable. OSIsoft, LLC. Published: 11/10/2009

Table of Contents Command-Line Utility Reference .................................................................................................. 1 Use PI Server Utilities Remotely ........................................................................................ 2 apisnap and pisnap.bat ...................................................................................................... 3 ipisql ................................................................................................................................... 3 piarchss (the Offline Archive Utility) Reference ................................................................. 5 piartool Reference ............................................................................................................ 11 piconfig Reference ........................................................................................................... 35 pidiag Reference .............................................................................................................. 93 pigetmsg Reference ....................................................................................................... 114 pilistupd Reference......................................................................................................... 118 pipetest ........................................................................................................................... 122 pisetpass ........................................................................................................................ 122 piversion ......................................................................................................................... 123 PI Server Database Files ............................................................................................................ 125 Dump PIFileBase Files ................................................................................................... 126 piarcmem.dat.................................................................................................................. 127 piarstat.dat ...................................................................................................................... 127 pidignam.dat ................................................................................................................... 127 pidigst.dat ....................................................................................................................... 127 pilastsnap.dat ................................................................................................................. 127 pimapevq.dat and pimaNNNN.dat ................................................................................. 128 pimsgtxt.dat .................................................................................................................... 128 pipoints.dat ..................................................................................................................... 128 piptalia.dat ...................................................................................................................... 128 piptattr.dat ...................................................................................................................... 128 piptclss.dat ..................................................................................................................... 128 piptunit.dat ...................................................................................................................... 129 piusr.dat .......................................................................................................................... 129 piusrctx.dat ..................................................................................................................... 129 piusrgrp.dat .................................................................................................................... 129 shutdown.dat .................................................................................................................. 129 PI Performance Counters .......................................................................................................... 131 PI Archive Subsystem Statistics ..................................................................................... 131 PI Base Subsystem Statistics ........................................................................................ 133 PI Base Subsystem Statistics ........................................................................................ 134 PI Buffer Subsystem Statistics ....................................................................................... 135 PI Collective Statistics .................................................................................................... 135 PI Server Reference Guide

iii

Table of Contents

PI License Entry Statistics .............................................................................................. 136 PI License Manager Statistics ........................................................................................ 136 PI License User Statistics .............................................................................................. 136 PI Message Subsystem Statistics .................................................................................. 136 PI Network Manager Statistics ....................................................................................... 136 PI Performance Equations Statistics .............................................................................. 137 PI Server LocalHost Statistics ........................................................................................ 138 PI Server Statistics ......................................................................................................... 140 PI Session Statistics ....................................................................................................... 140 PI Snapshot Subsystem Statistics ................................................................................. 141 PI SQL Subsystem Statistics ......................................................................................... 141 PI Subsystem Statistics .................................................................................................. 142 PI Totalizer Subsystem Statistics ................................................................................... 144 PI Update Consumer Statistics ...................................................................................... 144 PI Update Manager Statistics ......................................................................................... 144 PI Update Producer Statistics ........................................................................................ 145 PI Messages Reference: Example Messages .......................................................................... 147 Normal Startup Messages .............................................................................................. 147 Client Connection Messages ......................................................................................... 157 Subsystem Connection Messages ................................................................................. 158 Disconnect Messages .................................................................................................... 159 RPC Resolver Messages ............................................................................................... 161 Dead Process Timed Out ............................................................................................... 161 PI Error Code Reference ............................................................................................................ 163 Error Codes 1-99, With Messages ................................................................................. 163 Error Codes 100-199, With Messages ........................................................................... 166 Error Codes 200-299, With Messages ........................................................................... 166 Error Codes 300-399, With Messages ........................................................................... 167 Error Codes 500-599, With Messages ........................................................................... 167 Error Codes 800-899, With Messages ........................................................................... 168 Error Codes 900-999, With Messages ........................................................................... 169 Error Codes 1000-1099, With Messages ....................................................................... 170 Error Codes 10000-10999, With Messages ................................................................... 170 Error Codes 11000-11999, With Messages ................................................................... 178 Error Codes 12000-12999, With Messages ................................................................... 185 Error Codes 13000-13999, With Messages ................................................................... 189 Error Codes 15000-15999, With Messages ................................................................... 191 Error Codes 16000-16999, With Messages ................................................................... 192 Error Codes 17000-17999, With Messages ................................................................... 199 Error Codes 18000-18999, With Messages ................................................................... 199 Error Codes 19000-19999, With Messages ................................................................... 202 Error Codes 30000-30999, With Messages ................................................................... 202 Technical Support and Resources ........................................................................................... 205

iv

About this Document The PI Server Reference Guide provides a reference to the PI Server command-line utilities. It also lists PI Server error codes, messages, performance counters, and database files. This guide assumes that you have a basic knowledge of the PI Server and how to perform typical system administration tasks. See the Introduction to PI System Management guide for this information. For more in-depth information about managing the PI Server, see the PI Server System Management Guide. For information on configuring security (authentication and access permissions) on a PI Server, see Configuring PI Server Security.

PI Server Reference Guide

v

Chapter 1

Command-Line Utility Reference The PI Server includes several command-line utilities that you can use to configure points, monitor data flow, manage Archives, and configure security settings. Utility

Location

Purpose

apisnap.exe

PI\adm

Check snapshot values.

piarchss.exe

PI\bin

PI Offline Archive Utility; Use command-line options to run this Archive Subsystem executable as a utility.

piarcreate.exe

PI\adm

Archive creation utility; Create Archive files.

piartool.exe

PI\adm

PI Archive Tool; Use to mount Archive files, and monitor, inspect, or modify the state of a running PI Server.

piconfig.exe

PI\adm

Configure PI Server databases and tables, such as the Point Database and the Digital State Table.

pidiag.exe

PI\adm

Use for diagnostics and offline repair of the PI Server.

pigetmsg.exe

PI\adm

View messages from the PI Server message log.

pilistupd.exe

PI\adm

Monitor the Update Manager, update producers, update consumers, and update queues.

pipetest.exe

PI\adm

Test PI Performance Equation syntax.

pisetpass.exe

PI\adm

Change user passwords.

pisnap.bat

PI\adm

Start apisnap.exe against the local PI Server.

ipisql.exe

PI\adm

An interactive program that executes SQL statements directed at the PI Server. It uses the PI API to connect to the PI Server.

PI Server Reference Guide

1

Command-Line Utility Reference

Utility

Location

Purpose

piversion.exe

PI\adm

Use piversion -v to get the version and build numbers of the PI Server.

See the Help menus in PI SMT, PI Tag Configurator, and Collective Manager, for more information about these administrative tools. Use the -? argument to view details about any PI Server command-line utility. For example: pilistupd -?

Use PI Server Utilities Remotely To run the PI administration utilities remotely, enter the option -node with these parameters when you start piconfig, piartool, pigetmsg, and pilistupd: •

PI Server home node host name or IP address



Port ID (defaults to 5450)



Authentication Method (choose one): ο Windows ο Trust ο Explicit Note: If you authenticate with an explicit login, enter –username PI_username and -password password.



Utility argument

For example, to use Windows authentication: piartool -node pi380tst -Windows –al

To authenticate with an explicit login: piartool –node pi380tst –explicit –username piuser –password march380 -al

You can also use the option -remote to run utilities remotely. For example: pilistupd -remote

Enter these connection parameters when prompted: ο ο ο ο

PI Server home node host name or IP address Port ID (defaults to 5450) PI User account name PI User account password

To enter the connection parameters when you start the utility: piconfig -remote pi380tst -port 5450 -username piuser -password march380

2

apisnap and pisnap.bat

apisnap and pisnap.bat You can use the apisnap utility to check Snapshot values. When you run apisnap on the PI Server, it prompts you for a point name. Alternatively, you can enter a point ID, prefixed by the \ character. For instance, \1 will look up the point with a point ID of one (if the default points are installed, this is will be sinusoid). To quit the utility, simply press Enter. The apisnap utility accepts the network name as a parameter, and optionally, a TCP/IP port number, of a computer running a PI Server. For example, to connect to a PI Server running on the same computer, enter: apisnap localhost:5450 Note: There is also a script in the PI\adm directory called pisnap.bat. This script runs the apisnap utility and connects to PI Server on the same computer.

ipisql This utility is an interactive program that executes SQL statements directed at the PI Server. It uses the PI API to connect to the PI Server. The ipisql utility is in the PI\adm\ directory. To start the utility, enter its name at a command prompt. The utility connects to the default PI Server, writes version information to the screen, and then prompts for input: D:\pi\adm\ipisql Connecting to default PI System...Done iPISQL Copyright (c) 1993-2000, OSI Software, Inc. All rights reserved. PI API Version 1.3.4 PINet Protocol Version 00011101 Connected to PI 3.3 Build 361.43 on node "figaro" PISQL>

To exit ipisql, enter exit followed by a semicolon. The error code from the processing of the last SQL statement is the return code of the ipisql utility. This allows error detection if ipisql is used in a script.

ipisql Options The ipisql utility supports several options that can be specified on the command line. Most of the options are exactly the same as the command-line options for the PI SQL Subsystem itself, specifically timeout (-t), timestep (-ts) and options (-o). ipisql supports the option tokens AGGRTIMESTART, EXECSAFE, QEP, SUBSET, and ANSISQLVAL. The options argument supports the same option tokens as pisqlss, except LOG and TRACE. In addition, ipisql supports the option token ANSISQLVAL, which is not supported as a command-line option for pisqlss. When the option ANSISQLVAL is set, the values for the integer points are returned in the VALUE column. If this option is not set, the values for the integer points are returned in the STATUS column. PI Server Reference Guide

3

Command-Line Utility Reference

The command-line arguments supported by ipisql are: Argument

Description

-csv

Write results to standard output in comma-separated variable format suitable for importing into a spreadsheet. The query text, column headings, row count and error information are written to standard error, also in comma-separated variable format. No command prompts are displayed.

-f

Identifies a query file. If this argument is used, ipisql executes the query in the specified file and exits. A command prompt is not displayed.

-node

Identifies the PI Server node to connect to. The name to use is the PI Server computer's network name. If the PI server node uses a port number other than 5450, you must specify the port number using either suffix port_number to this name (for example, -node mynode:545), or specify -port port_number (for example, -node mynode –port 545). If the port number is not specified, for Windows, the default is 5450.

-o

Options. The options are specified in a comma-separated list of tokens with no space between tokens. The interpretation of the tokens is not case-sensitive. The supported options are AGGRTIMESTART, EXECSAFE, QEP, SUBSET, and ANSISQLVAL.

-p0...-pn

SQL parameter values. The first parameter is -p0 (zero), the second is -p1, and so on. You may specify as many SQL parameters as you like, and need not specify all of them; ipisql prompts for any additional parameter values needed. The SQL parameter values are in effect throughout the entire ipisql session.

-password

Password. This argument is interpreted only if the -username argument is supplied. If -username is provided, but -password is not, ipisql prompts you for a password.

-port

TCP\IP port number. This argument is interpreted only if the -node argument is supplied. For Windows, the default value is 5450. You may choose to add :portnum to the end of the node name when providing the node argument.

-t

SQL query timeout, in seconds. If this time expires, pisqlss will cause the query to return either a timeout error, or a subset of the actual results, depending on the SUBSET option in effect for pisqlss.

-ts

Default value of the timestep column in the piinterp table. This value can be overridden for any query by specifying a timestep constraint in your SELECT statement.

-username

Username. If this argument is not present, ipisql does not attempt to validate your identity; default access rights apply.

For example, to execute query in the file myquery.txt against the PI 3.4 System larry with port number 5450 using a default timestep of two minutes, enter: ipisql -ts 120 -f myquery.txt -node larry:5450

If the file myquery.txt contains the statement:

select * from picomp where tag = ? and time >= ?

you might avoid the prompt for SQL parameter values by entering: ipisql -f myquery.txt -p0 sinusoid -p1 "today"

4

piarchss (the Offline Archive Utility) Reference

Submitting Queries SQL statements can be typed at the prompt and terminated with a semicolon ( ; ). This causes the query to be sent to PI. The query can Span multiple lines. The prompt for subsequent lines looks like: _PISQL>

You can use as many lines as you like. You can also process queries stored in a text file using the FILE command: PISQL>file myquery.txt;

A query in a file need not be terminated with a semi-colon; the query is processed when the end of the file is reached. A query file may contain more than one query. If this is the case, a semi-colon must be used to separate the queries. Query files may contain the FILE command.

piarchss (the Offline Archive Utility) Reference piarchss, (the Offline Archive Utility) is actually the same Archive Subsystem executable, piarchss that is a part of a running PI system. To use the archive utility functions of piarchss, you run it in console mode using special command-line arguments. The offline archive utility can be used even while PI is running. You typically use the piarchss utility to work with archive files outside the context of a running PI Server. This enables you to continue archiving current data on your PI Server, while manipulating other archives offline. Typical applications of the offline tool include: •

Combine a number of archives together



Divide a large archive file into smaller archives



Extract a specific time period from an archive



Recover a corrupted archive



Recover events from an Event Queue file



Convert a PI2 archive file to the PI3.x format.

Note: The archives that are created by the Offline Archive Utility may be either fixed or dynamic. Their format is not different from any other archives created by piartool -ac.

About piarchss During processing, piarchss makes two passes through the input archive file. On the first pass, the utility checks all records in the input archive file. Every record that contains valid data, and is within the specified time range, is added to a list. The list is sorted by time and PI Server Reference Guide

5

Command-Line Utility Reference

point ID to assure data is loaded in chronological order. The point ID of the input record is verified. Any required point ID conversion is performed using the specified conversion table. For example, conversion is required when you migrate archives from a PI2 or from another PI3 System to your PI Server. An error message is issued for every record for which a point could not be found in the local PI Server. These messages can be suppressed if desired. Statistics are displayed approximately every five seconds, at the end of the first pass, and at the end of the second pass. During the second pass, records from the sorted list are written to the output file. The input data is optionally filtered or modified. If the output archive file does not exist, it is created. The archive header is initialized based on command-line specifications. If the output file already exists, the input data is added. If a primary record does not exist for a given point ID, the data for that point ID is discarded. The input data is converted to the output point type, if different from the input point type. All auxiliary data, such as index records and record links, are recreated during the load. Only actual data are read from the input, and thus, any errors in the input file auxiliary data are repaired.

Manage Archives of an Offline PI Server (piarchss) The Offline Archive Utility is actually the same Archive subsystem executable, piarchss that is a part of a running PI system. To use the archive utility functions of piarchss, you run it in console mode using special command-line arguments. The offline archive utility can be used even while PI is running. You typically use the piarchss utility to work with archive files outside the context of a running PI Server. This enables you to continue archiving current data on your PI Server, while manipulating other archives offline. Typical applications of the offline tool include: •

Combine a number of archives together



Divide a large archive file into smaller archives



Extract a specific time period from an archive



Recover a corrupted archive

Note: The archives that are created by the Offline Archive Utility may be either fixed or dynamic. Their format is not different from any other archives created by piartool -ac.

Running piarchss When you run piarchss as the offline archive utility, indicate an input archive file and an output archive file, along with relevant command parameters. The basic format is: piarchss -if inputPath -of outputPath

where inputPath is the full path and file name of the input archive file and outputPath is the full path and file name of output archive file.

6

piarchss (the Offline Archive Utility) Reference

The piarchss utility takes the input file, processes it according to the command parameters, and then outputs the processed file to whatever location you specified. The piarchss utility does not modify the input file under any circumstances. Tips for Using the Offline Archive Utility If you're working with the piarchss offline archive utility, note the following: •

The full path name of the input archive must be specified. Note: piartool -al lists only registered archives.



If the input file is registered, the Offline Archive Utility unregisters it when processing begins.



If the input archive is the primary Archive, it cannot be unregistered. To work around this, force an archive shift using piartool -fs or temporarily shut down the Archive Subsystem.



If the output file does not exist, the utility creates it.



If a full path name is not specified for the output archive, the utility places the output archive in the current directory.



At the end of processing, neither the input nor the output archives are registered.



By default, the piarchss offline archive utility creates dynamic archives. Use the -f argument to specify a fixed archive. Note: Dynamic archives become non-shiftable once a single overflow record is generated, but remain shiftable if no overflow records are generated.



You can run the piarchss offline archive utility while the PI System, including piarchss itself, is running. At a minimum, the pinetmgr, pibasess, and pisnapss subsystems must be running, because the utility needs to access the Point Database during off-line operations.

The piarchss Utility Command-Line Parameters There are several command-line parameters for the piarchss offline archive utility. Some of these options are discussed in more detail in the following sections. The parameters may be entered in any order. Parameter

Name

Notes

-dup

Duplicate records

Allow input archive records with duplicate times. By default duplicates are ignored.

-f size

Make output archive a fixed archive

Specify size in MB. If size = 0, the input file size is used. Default is dynamic archive.

-filter start end

Filter

Process events only within the time range (inclusive) specified. Both timestamps must be provided. See Time Filtering (-filter) (page 9).

PI Server Reference Guide

7

Command-Line Utility Reference

Parameter

Name

Notes

-id pathname

Specify ID conversion file

Specify the ID conversion binary path and filename. See Specifying an ID Conversion File (-id) (page 33).

-if pathname

Input archive file

Required. The full path, including drive letter is required. This is true for all file arguments passed.

-oet option

Output file end time

Options: Input, Event, time, NFE, Primary, NoChange. See Specifying an End Time for the Output File (-oet) (page 8).

-of pathname

Output Archive File

Required.

-ost option

Output file start time

Options: Input, Event, time, NFE. See Specifying a Start Time for the Output File (-ost) (page 8).

-silent

Silent mode

Suppress warning messages.

-tfix

Time fix

Apply a specified time transformation to input data. See Transforming Event Timestamps (-tfix).

-tzf pathname

Time zone specification file

Use when input is different from standard DST.

-vah

Validate annotation handles

Apply a validation algorithm. Multiple events referencing a single annotation are detected and fixed. Batch Database annotations are checked for consistency.

Specify a Start Time for the Output File The -ost flag specifies the start time for the output file. The usage is: -ost option

Where option is one of the following: input

Sets the start time to the start time of input. This is the default behavior.

event

Sets the start time to time of first event in input.

time (where time is specified in absolute PI time format)

Sets the start time to the specified time string. Times are specified in absolute PI time format. Relative times are not supported. Times must be enclosed in double quotes when containing spaces. If only date is specified the time defaults to 00:00:00 (midnight) For example: "22-JAN-02 23:59:59" 23-JAN-02 21-Feb Output file start and end times must differ by at least one second.

NFE

Sets the start time to time of first event which passes the time filter.

Specify an End Time for the Output File The -oet flag specifies the end time for the output file. The usage is as follows: -oet option

8

piarchss (the Offline Archive Utility) Reference

Where option is one of the following: input

Sets the end time to the end time of input file. This is the default behavior.

event

Sets the end time to the time of last event in input file.

time (where time is specified in absolute PI time format)

Sets the end time to the specified time string. Times are specified in absolute PI time format. Relative times are not supported. Times must be enclosed in double quotes when containing spaces. If only date is specified the time defaults to 00:00:00 (midnight). For example: “22-JAN-02 23:59:59” 23-JAN-02 21-Feb Output file start and end times must differ by at least one second.

NFE

Sets the end time to time of last event which passes the time filter.

primary

Sets the end time to indicate the archive is a primary archive.

NoChange

End time is not altered.

Filter a Time Range The -filter flag specifies a time range (inclusive) beyond which events are discarded. The usage is: -filter starttime endtime

Start time must be before end time. Piarchss Offline Archive Utility Exit Codes To facilitate batch file processing, the offline utility returns an exit code to the operating system: Code

Definition

0

No errors—at least one input record processed

1

Errors during input phase

2

No processing errors—0 records processed possibly an empty input file

@exit

The command character must precede every command. By default, the command character is @. Data are on separate lines that are not preceded by the command character. Use an Interactive Session or Batch Method At startup, piconfig checks whether the input is coming from an interactive terminal session or from a piconfig script file. When run interactively, piconfig issues a prompt after each command. To turn prompting on or off: @prompt yes @prompt no

When turned on, the prompt indicates the piconfig mode and the current table name in parentheses. The table name in the prompt is set when you issue the @table command: * (Ls - ) piconfig> @table pipoint * (Ls - PIPOINT) piconfig> @help

For details on modes and tables, see Summary of piconfig Commands and Parameters (page 35).

PI Server Reference Guide

37

Command-Line Utility Reference

Select PI Tables Whether you use an interactive session or a script file, to update a table with piconfig you must: 1. Select the PI table of interest. 2. View the current setting of the table. 3. Display table attributes. List Table Names Use the ?tbl command to list the table names you may select from: * (Ls - ) piconfig> @?tbl 1 - DBSECURITY 2 - PIARC 3 - PIATRSET 4 - PIBAUNIT 5 - PIBATCH 6 - PIBAALIAS 7 - PICOLLECTIVE 8 - PIDS 9 - PIFIREWALL 10 - PIGROUP 11 - PIIDENT 12 - PIIDENTMAP 13 - PINETMGRSTATS 14 - PIPOINT 15 - PIPTCLS 16 - PIPTSRC 17 - PISERVER 18 - PISNAP 19 - PISTATE 20 - PISUBSYS 21 - PISUBSYSSTATS 22 - PITIMEOUT 23 - PITHREAD 24 - PITRUST 25 - PIUSER

See Tables (page 51) for more information. Select a Table Use the table command to select a table. The currently selected table is indicated by the prompt. No table is selected until the first table command is issued. The table remains selected until the next table command. * (Ls - ) piconfig> @table pipoint

View Current piconfig Setting After you select a table, use the status command to view the current piconfig setting:

38

piconfig Reference

* (Ls - ) piconfig> @table pipoint * (Ls - PIPOINT) piconfig> @status ---- piconfig Status at 2-May-08 12:42:13 ---Mode: List Decimal digits displayed: -7 Characters: Command: Delimiter: Comment: Quot: 'tag33'"

Or ('sinusoid' > 'tag33')

The expression 'sinusoid' + "t-1d" + "ABC"

Should be specified as "'sinusoid' + \"t-1d\" + \"ABC\""

When the output from piconfig is used in another session or by another program such as Excel, make sure that fields containing the delimiter character are quoted (on output). Using the quote command does this: @quote "

or @quote '

Sending Values as Strings piconfig sends all table values as strings. When sent to the Snapshot (Archive values go via the Snapshot), it is interpreted in the following way: For a string tag: 88

piconfig Reference



Use the incoming string without change.

For a digital tag: •

Look for a state in the tag's state set.



Look for a state in the System digital set.



Interpret the string as a numeric offset and check if within range of the tag's set.

For all other tag types: •

Look for a state in the System digital set.



Convert the string to a value of the tag's type.

Boolean Values When a field in any table is a Boolean flag, for example the Step flag in the PIPOINT table, the input data can be specified as: 1 / 0 Yes / No True / False

piconfig always sends the data to the table as a string as explained above. The table owner, in this example the Base Subsystem, interprets the incoming string as a Boolean value 1 / 0. This can cause some confusion in the Digital States table when states are defined as the strings 1, 2, 3, and so on. We recommend that you configure digital states like this: "One, Two, …" or "State1, State2, …" Similarly, to define the states "true", "false", make a set with "false" in the first position followed by "true" to correspond to 0 and 1. Alternatively, modify the names slightly; such as "S-true", "S-false". Configuration Persistence Table specifications remain in effect until the next table command. Mode specifications remain in effect until the next mode command. For all structure formats, the structure specifications remain in effect until a table is changed. New structure specifications are added to previous specifications until they are used to process data. After this, new specifications overwrite previous ones. Select, and modify specifications behave similarly. These two commands are also cleared on mode and table changes. Command-Line Parameters The piconfig commands may be specified as command-line parameters when invoking piconfig. Each pair of parameters is assumed to be a command. These commands are executed before the first prompt is issued. Some examples are: $ piconfig comchar ? PI Server Reference Guide

89

Command-Line Utility Reference

$ piconfig table pipoint stype fixed $ piconfig help

Change Special Characters The special characters in piconfig can be customized to be any single, visible character that is not a number or a letter. These special characters include: •

command character

(ComChar)



comment character

(comment)



delimiter character

(delimiter)



quote character (quote)

Specifying a quote character causes any field containing the delimiter character (comma by default), to be enclosed with the specified quote character. Use this option any time the output is being re-used for input, for example when the extended descriptor contains commas and you want to create a comma-separated file. In this example, the comment character is changed: $ piconfig *piconfig> *piconfig> *piconfig> *piconfig> *piconfig> *piconfig> *piconfig>

* This is a comment. * Change the comment character to ! @comment ! ! Now we have a new comment character. !Change back to the original comment character. @comment * * Now we have our original comment character.

Similarly, you can change the delimiter used in delimited format to be a different character than comma (,). To display the currently assigned characters, mode, and table, use the status command. *piconfig> @status ---- piconfig Status ---Mode: List Characters: Command: Delimiter: Comment: Quot: Struc. Type IN: OUT: Error count: 3 Max: 10 Curent table: Cur. Prim.: Def. Prim: < > Nesting level : 0 Node:

Convert Fixed Format to Delimited Format The following is a simple example of converting fixed format data into delimited format. This can be helpful in PI2 to PI3 conversions. Convert mode can be used to reorder fields in a record or to apply modifications to data. e:\PI\adm>type fixed.dat *123456789012345678901234567890 Tag1 0 100 tag2 -5 555 e:\PI\adm>piconfig mode convert

90

piconfig Reference

* (Cv - ) piconfig> * (Cv - ) piconfig> * (Cv - ) piconfig> * (Cv - ) piconfig> * (Cv - ) piconfig> * (Cv - ) piconfig> * (Cv - ) piconfig> * (Cv - ) piconfig> 0 , 200,Tag1 -5 , 655,tag2

@isty fixed @osty delim @istru tag,1,1,10 @istru zero,1,10,5 @istru span,1,20,5 @ostru zero,span,tag @echo none @input fixed.dat

Convert Point Database Information from PI2 to PI Server To transfer information from a PI OpenVMS Point Database to a PI Server Point Database, see the OSIsoft Technical Support Web site for more information. Hexadecimal and Octal Numbers By default, piconfig uses decimal notation (base 10). To specify numbers in octal, precede them with 0. To specify numbers in hexadecimal, precede them with 0x. For example, the numbers 10, 012, and 0xA specify the same number. A few PI 2.x pidiff attributes are not used in piconfig. See the OSIsoft Technical Support Web site (http://techsupport.osisoft.com/) for more information.

PI Server Reference Guide

91

pidiag Reference The pidiag utility is a collection of tools you may use to diagnose, retrieve information about, and perform simple repairs of, PI Systems. It is designed to help the PI System Manager and OSIsoft Software Technical Support gather information, troubleshoot and solve common problems. The pidiag utility resides in the PI\adm subdirectory. Caution: You should never use open files with tools that perform operations on files, such as compact and repair options. In general, you should only use such tools when the system is down. If you are unsure about how to use these tools, consult OSIsoft Technical Support before using them. You should make a backup copy of the data file before you attempt any operations.

To invoke pidiag: pidiag -xxx

where xxx identifies an option. Depending on the specific tool, additional parameters may be included to invoke various options. These optional parameters are summarized here and in the piadiag utility help. Note: Italics means the actual value must be supplied. Square brackets ([]) mean optional. Items separated by vertical bar (|) are mutually exclusive of each other, only one of the items can be used. Option

Description

-ad [path]

Dump archive manager data file

-adg version path

Downgrade archive file(s) to a specific version

-ahd path

Dump the archive file header

-ar [path]

Recover archive manager data file

-ara

Automatically Recover the Archive Manager Data File (page 98)

-archk path [complete]

Archive integrity check utility

assert

Force an assertion. Works only in debug builds of pidiag.

-cid

No longer supported; use PI SMT or piconfig to set the PI Server ID

-cpc [-fix]

Check performance counters, report any problems found. Optionally fix certain problems.

-crash

Simulate a process crash

-dapi [hostname]

Create and display PI API Server ID based on supplied host name.The host name of the local machine is used if host name is not supplied.

PI Server Reference Guide

93

Command-Line Utility Reference

Option

Description

-did

Dump Server ID file; only works when the server is not running. When the server is running use PI Collective Manager or piconfig with the pisysdump.dif.

-dow

Echo the day of the week (0-6). 0=Sunday, 1=Monday, and so on.

-e code

Translate error code

-ecert [path]

Export the server certificate to a file.

-fb path [-header] [-dv]

Display file base file header, index, or version. -dv lists only the disk version of the file without any upgrades. -header suppresses the listing of the index and shows only the header. The input file is opened read only.

-fbc path [-header]

Compact a file base file. -header suppresses the listing of the index and shows only the header.

-fbf inpath outpath [alignment] [-compress] [-header]

Recover (fix) file base data file index by copying recoverable records to an output file. -fbf requires an output file and the input file is opened read only.

-gap path [-time=secs] [-sample=percent] [-matching=percent]

Estimate gaps in data for an archive. By default it samples the most active 10 percent of tags where the gap is at least 300 seconds long and is uniform across 90 percent of the sampled tags.

-getpipcpath [-filepath filename]

Display the PIPC home directory. With the -filepath option, display the full path where filename is found.

-gmmf, mmf

Get the performance counter memory map file

-gpc

Get performance counter path

-host

Display host information as used for Trust Login

host -compare filename [filename]

Compare a machine or cluster signature file to the local machine or to another signature file

-host -file filename

Produce machine signature file (for licensing)

-host -lictocsf licfile csffile

Extract the cluster signature from a license file and store to a cluster signature file

-host -lictomsf licfile msffile

94

Extract the machine signature from a license file and store to a machine signature file

-machine

Machine and compile information

-mdfv [path]

Display the message definition file version

-n number

Format and display number as various types

-rcsid

Recreate the Server ID file. For downgrading purposes only.

-rgs [-?] [-u] path [ReplaceableParameter= ""]

Register or unregister COM component by running .rgs script in path

-t time [U]

Convert timestamp to string.

pidiag Reference

Option

Description

-tz [ -if path | -ifrule [path] ] [-of path]

Specify special DST settings

-tz [time [TZ]] [ -check | -dump [-brief] |-full]

Show time zone information

-udf path

Reset the piadmin (userid #1) password to blank

-qd [HeaderOnly Header| RecNo=n | PointId=ID] path

Dump header or all/filtered events from Event Queue file

-qs path

Get offline queue file statistics

-ulcks

Reset the piadmin (userid #1) password to blank

-upc name

Uninstall performance counters for named subsystem

-uuid [count]

Create and display count UIDs.

-v

Version information

-w msec

Wait for passed milliseconds

-xa path [-st start] [-et end] [-uid uniqueID] [-xh schemaURL] [-dbMask mask] [-wash]

Export audit records. For details, see Audit the PI Server.

To display a help a help screen with all the options. pidiag -h pidiag -?

Display Version Information pidiag -v

Displays the version of pidiag utility itself. In general this is the same version for all PI utilities and subsystems. D:\PI\adm>pidiag -v Version: PI 3.4.363.24 Program: pidiag PI Path: D:\PI

Translate Error Codes Use the pidiag utility to interpret any error codes that are included in the message logs. To display the error message, enter: pidiag –e errorcode

where errorcode is the error number displayed in the message log. Error code values may be positive or negative. For example, if the error code is –10722, enter: PI Server Reference Guide

95

Command-Line Utility Reference

pidiag –e –10722 [–10722] PINET: Timeout on PI RPC or System Call

You can also use the pidiag utility to translate operating system error codes, which are always positive numbers.

Diagnose and Repair PI System Databases Most of the PI System internal databases are stored in files that have a common internal structure. Data is stored in records and the records are indexed. We call this structure file based. This section discusses the tools for diagnostics and repair of such database files. List the Index To list the header and index of a file base file, type: pidiag -fb path [-header | -dv]

The –header option suppresses the listing of the index and shows only the header. The –dv option displays the file’s version only. OSIsoft technical support can determine from this information if any errors occur in the structure of the file: D:\PI\adm>pidiag -fb d:\pi\dat\pidigst.dat PIfilebaseheader[$Workfile: pifile.cxx $ $Revision: 125 $]:: File Name: D:\PI\dat\pidigst.dat Major Version: 4 Minor Version: 0 Byte Alignment: 1 Directory Location: 1024 Directory Size: 1024 Record Count: 18 Last Recno: 0 Maximum Recno: 128 User Block Size: 512 Data Location: 2048 Data Size: 23325 Auto Compact %: 0 Last Modified: 10-Sep-09 09:45:11 Backup Time: 25-Aug-09 14:26:11 PIsecureobject[$Workfile: pisecobj.cxx $ $Revision: 46 $]:: ACL ID: 1 [ 1:A(r,w)|5:A(r)|2:A(r) ] % unused: 0

Compact a File-base Data File To remove unused space in a file base file, type: pidiag -fbc path [-header]

The percentage of unused space in a file can be viewed with pidiag –fb. If there is more than 10% of unused space, you might want to compact the file to save disk space.

96

pidiag Reference

The header and index of the compressed file is displayed after the compression. The -header option can be used to suppress the listing of the index. Recover File-base Data File Index To recover readable data records from a file and rebuild the index, type: pidiag -fbf inpath outpath [alignment][-compress][-header]

It is useful in cases where the index is corrupted and where some records are inaccessible or corrupted. Note that when there are unreadable records, they are discarded and an error message is printed. This tool should only be used following OSIsoft Tech Support’s advices. The optional alignment parameter specifies the byte alignment to use in the recovered file. It allows the recovered file to be able to grow larger than 2GB. The -compress option removes unused records. After recovering the file, the tool displays the header and index of the new file. The -header option can be used to suppress the listing of the index.

Archive Management The commands in this section assist with archive file management. Dump the Archive Manager Data File The Archive Manager data file contains the list of archive files currently known to the PI Server. The contents of the file can be dumped by running: pidiag -ad [path]

You can provide the full path to the Archive Manager data file. When it is not provided, the content of D:\PI\dat\piarstat.dat is displayed. C:\PI\adm>pidiag -ad Archive manager data file version is 1 Archive primary archive code is 1 Archive manager data file dump follows: PInt [$Workfile: pinttmpl.cxx $ $Revision: 13 $]:: Table contains 3 entries, with 3 total slots allocated. Extend size is 2 slots and the next iCode is 4. 1. C:\PI\dat\piarch.001 2. C:\PI\dat\piarch.002 3. C:\PI\dat\piarch.003 Alphabetical index: C:\PI\dat\piarch.001 C:\PI\dat\piarch.002 C:\PI\dat\piarch.003 PIobject: End of Dump

pidiag-ad option may be used, for example, in a procedure to repair the archive registry. For details, see Repairing the Archive Registry (page 102). PI Server Reference Guide

97

Command-Line Utility Reference

When the Archive Subsystem is running, use piartool -al to get this information. Automatically Recover the Archive Manager Data File pidiag -ara

This attempts an automatic recovery of the archive manager data file, PI\dat\piarstat.da, using the existing data in the file. It can be used if the index in the current file is corrupted. Caution: Use this command only when the PI Server is shut down.

Manually Recover the Archive Manager Data File pidiag -ar [path]

This creates a new archive manager data file. It is useful when moving a PI Server to another machine, or when running the same point configuration with different sets of archives. Caution: Use only when the PI Server is shut down.

The optional path argument is the full path of the primary archive file that you want to use. When it is not s not provided, you will be prompted for it. Upon restarting PI, the file is the only archive registered. If the archive manager file is corrupted, first try pidiag-ara. If that does not help, use pidiag-ar. For more details on using pidiag -ar and pidiag -ara, see Repairing the Archive Registry (page 102). Display Unregistered Archive Information It is frequently necessary to obtain information about Archive files that are not currently registered. To do this, use: pidiag -ahd path

For example: pidiag -ahd d:\pi\dat\piarch.001

The output is similar to the output from piartool -al for a single Archive file:

D:\PI\adm>pidiag -ahd d:\pi\dat\piarch.001 PIarcfilehead[$Workfile: piarfile.cxx $ $Revision: 129 $]:: Version: 8 Path: D:\PI\dat\piarch.001 State: 3 Type: 0 (fixed) Write Flag: 1 Shift Flag: 1 Record Size: 1024 Count: 131072 Add Rate/Hour: 27.9 Offsets: Primary: 1837/65536 Overflow: 106950/131072 Annotations: 1/65535 Annotation File Size: 2064 Start Time: 16-Aug-09 23:08:12 End Time: Current Time Backup Time: 25-Aug-09 14:26:11

98

pidiag Reference

Last Modified: 24-Sep-09 14:31:27

End of DumpFor examples on using pidiag -ahd, see Restoring a Complete Server from Backup, Restoring Archives From Backup, or Recovering from Accidental Change to System Time. Note: This command can only be used if the archive file is not registered, or if the PI Server is down. If you use it with a registered Archive file, pidiag returns an access error.

Verify the Integrity of Archive Files pidiag -archk path [complete]

To perform integrity checks or extract statistics from archive files that are not registered, use the -archk command. Run the command on an archive file to get a report that displays: •

a list of points sorted by record number or RecNo



the number of index records (indices)



the number of data records



the count of events in all records and the average fill ratio (fr)

When the complete option is specified, the report also includes details about each record, including the start time, number of events, and fill ratio of the data record. For example: D:pidiag –archk D:\PI\dat\piarch.001 Analyzing archive: D:\PI\dat\piarch.001 ---------------------------------------------------------------------recno: 1 id: 1 indices: 1 records: 5 events: 636 fr: 89.4% recno: 2 id: 2 indices: 1 records: 5 events: 631 fr: 88.6% recno: 3 id: 3 indices: 2 records: 278 events: 54437 fr: 99.5% recno: 4 id: 4 indices: 7 records: 866 events: 428465 fr: 99.6% recno: 5 id: 5 indices: 1 records: 23 events: 3202 fr: 97.3% recno: 6 id: 6 indices: 1 records: 31 events: 4355 fr: 96.6% recno: 7 id: 7 indices: 1 records: 39 events: 5534 fr: 98.4% recno: 8 id: 8 indices: 1 records: 27 events: 3981 fr: 98.7% recno: 9 id: 9 indices: 1 records: 6 events: 1340 fr: 89.7% recno: 10 id: 10 indices: 1 records: 19 events: 4646 fr: 98.3% recno: 11 id: 17 indices: 6 records: 1092 events: 86402 fr: 48.0% recno: 12 id: 18 indices: 0 records: 1 events: 69 fr: 48.4% recno: 13 id: 14 indices: 0 records: 1 events: 1 fr: 0.8% recno: 14 id: 15 indices: 0 records: 1 events: 1 fr: 0.8% recno: 15 id: 16 indices: 0 records: 1 events: 1 fr: 0.8% recno: 16 id: 19 indices: 0 records: 1 events: 0 fr: 0.0% recno: 17 id: 24 indices: 0 records: 1 events: 0 fr: 0.0% recno: 18 id: 0 indices: 0 records: 1 events: 0 fr: 0.0% recno: 19 id: 0 indices: 0 records: 1 events: 0 fr: 0.0% --------------------------------------------------------------------PI Server Reference Guide

99

Command-Line Utility Reference

0 errors detected 23 total index records 2399 total data records 593701 total events 247.5 events per record 10800 total annotations Consistency check status: [0] Success

Points receiving events in order with no edits or remove events typically have a fill ratio close to 100%. Note: Since the last record in a chain is rarely full, the fill ratio is almost never exactly at 100%.

In this example, points 4 and 17 (RecNos 4 and 11, respectively) clearly have an excessive number of index records. See Maximize PI Server Performance (page 100). Maximize PI Server Performance Review archive statistics to maintain best performance. On average, points should not have more than one or two index records. If this is not the case for many points, you should review compression parameters for these points or make the archive files smaller. Use the archive check command to detect and report any errors in the archive file. Errors are summarized at the end of the report but when running the command, they are sent to the standard error (stderr) stream. As a result, when redirecting the output to a file, the following syntax should be used so that errors are inserted into the output file report.txt: pidiag -archk "archive_file" > report.txt 2>&1

Alternatively, the following construct can be used to redirect the output to two different files: pidiag -archk "archive_file" 1> report.txt 2> errors.txt

The archive errors or corruptions could be the result of failures (crash, unexpected termination, power failure, and so on) or software bugs. If this occurs, use the offline archive utility to reprocess the corrupted archive file, recover the data and fix all issues. For more information, see Using the Offline Archive Utility (piarchss) (page 6). The -archk command can also be run with the optional argument complete, in order to extract detailed information about the archive file structure. This extra information is similar to what is provided by the archive walk command (see piartool -aw). It notably includes point types and statistics (start time, event count, fill ratio) for every index or data record and for each point in the archive file. The archive header information (see Information about Unregistered Archives (page 98)) is also included at the beginning of the report. Here is an example of the detailed mode: D:\PI\adm>pidiag -archk D:\PI\dat\piarch.001 complete Analyzing archive: D:\PI\dat\piarch.001 -----------------------------------------------------------------------------PIarcfilehead[$Workfile: piarfile.cxx $ $Revision: 101 $]:: Version: 7 Path: D:\PI\dat\piarch.001 State: 3 Type: 0 Write Flag: 1 Shift Flag: 1 Record Size: 1024 Count: 131072 Add Rate/Hour: 1.7 100

pidiag Reference

Offsets: Primary: 20/65536 Overflow: 128665/131072 Annotations: 10826/65535 Annotation File Size: 434144 Start Time: 19-Oct-05 12:39:10 End Time: Current Time Backup Time: Never Last Modified: 19-Dec-05 18:09:15 recno: 1, id: 1, events: 636, annotations: 0, fr: 89.4% - (Float32) index array size: 1 0: idxrec id: 1, record pointers: 5, total events: 636 record array size: 5 0: record id: 130516, start: 19-Oct-05 12:39:10, events: 142, fr: 1: record id: 130811, start: 30-Oct-05 15:33:27, events: 142, fr: 2: record id: 130515, start: 12-Nov-05 09:29:36, events: 142, fr: 3: record id: 130210, start: 22-Nov-05 04:44:08, events: 142, fr: 4: record id: 128814, start: 15-Dec-05 13:31:42, events: 68, fr: [...]

99.4% 99.7% 99.9% 99.9% 47.9%

Downgrade Archive File to Older Versions To downgrade archive files so they can be mounted by older versions of the PI Archive, use pidiag -adg. The command syntax is: pidiag -adg version path

Version is the version number you want to downgrade to. Path is the full path of the archive file you want to downgrade. You need to downgrade the archives on the newer server before copying the files to the older server. Note: pidiag -adg accepts wildcard characters in the path argument (for example, D:\PI\dat\piarch.*). This allows performing easy downgrade of many archive files in a single command.

Archive file versions are displayed in the archive header information. For details, see Information about Unregistered Archives (page 98). The archive file versions of the most recently released PI Servers are: PI Server Version

Archive Version

3.3

5

3.4.363 and 3.4.364

6

3.4.370 and 3.4.375

7

3.4.380

8

Note: downgrading from version 8 to older versions is not supported.

For example, to convert an archive file from version 3.4.370 to 3.4.364: D:\PI\adm>pidiag -adg 6 D:\PI\dat\piarch.005 Processing: D:\PI\dat\piarch.005... [0] Success

You can verify the version after downgrading the file using pidiag –ahd. D:\PI\adm>pidiag -ahd d:\pi\dat\piarch.005

PI Server Reference Guide

101

Command-Line Utility Reference

PIarcfilehead[$Workfile: piarfile.cxx $ $Revision: 115 $]:: Version: 6 Path: D:\PI\dat\piarch.005 State: 3 Type: 0 (fixed) Write Flag: 1 Shift Flag: 1 Record Size: 1024 Count: 131072 Add Rate/Hour: 0.0 Offsets: Primary: 18/32768 Overflow: 65535/65536 Annotations: 1/65535 Annotation File Size: 2064 Start Time: 2-Nov-06 12:05:52 End Time: Current Time Backup Time: 22-Nov-06 11:48:39 Last Modified: 22-Nov-06 15:40:37 End of Dump

Check Data Gaps in an Archive To check if there is any data gap in an archive, run: pidiag -gap path [-time=secs][-sample=percent][-matching=percent]

This command checks data gaps by sampling the most active tags and checking if there are gaps in their archived data. By default, it samples the most active 10 percent of tags. If there is a gap that is at least 300 seconds long and is uniform across 90 percent of the sample tags, the gap is reported. The percentage of tags to sample, gap length and the percentage of tags having the same gap can be specified. Example: D:\PI\adm>pidiag -gap d:\pi\dat\piarch.001 Analyzing archive: D:\PI\dat\piarch.001 ----------------------------------------------------------------Archive start time: 16-Aug-09 23:08:12 Archive end time: 18-Jan-38 19:14:07 Number of points to sample: 183 Minimum gap time: 300 seconds 164 out of 183 points must have aligned gaps --------------------------------------------------------------------------- RESULTING GAPS ----------Duration: 23:15:51 Duration: 14:29:07 Duration: 14:38:07 Duration: 15:04:45

417

st: 16-Aug-09 23:08:54

et: 16-Aug-09

659593

st: 16-Aug-09 23:15:54

et: 24-Aug-09

480

st: 24-Aug-09 14:30:07

et: 24-Aug-09

1431

st: 24-Aug-09 14:40:54

et: 24-Aug-09

Repair the Archive Registry This archive registry information is stored in a binary file called piarstat.dat. If this file is corrupted, you can use the pidiag utility to rebuild it:

102

pidiag Reference

1. Copy piarstat.dat to a temporary location. Do not overwrite the original file. Rename the file, in case you need it later. 2. Stop PI Server. 3. Run pidiag -ad and collect the dump of piarstat.dat, and verify the output. 4. If the results of the dump look normal, attempt the automated recovery. Otherwise, use the interactive one. 5. Restart PI Server. 6. Check the message log to see if all archives are loaded. If the interactive version is used, only the Primary Archive is loaded. 7. Register any remaining archives. If the interactive version was used, all other archives must be registered. Including the pidiag -ad, there are three ways to run the pidiag tool for Archive registry repair: -ad

Dumps the current piarstat.dat file. This is used to review the data in the file.

-ar

Provides an interactive recovery utility for renaming the old piarstat.dat to piarstat.old and generating a new one with a single entry – the Primary Archive – provided by the user.

-ara

Provides an automated recovery utility that renames the old piarstat.dat to piarstat.old and generates a new one with all of the entries found in the original file. Any errors will cause the automated version to abort, and the user should resort to the interactive version.

Event Queue Files Utilities View Event Queue File Contents pidiag -qd [HeaderOnly | RecNo=n | PointId=ID] path

This command displays the header and events from an offline event queue file. Path is the full path of the event queue file. An offline event queue file is an event queue file that is not currently loaded by PI Snapshot Subystem or PI Archive Subsystem. With the HeaderOnly option, only the file header and page headers are displayed: D:\PI\adm>pidiag -qd headeronly d:\pi\dat\pimapevq.dat PImapfilequeue[$Workfile: pimmq.cxx $ $Revision: 36 $]:: filepath: d:\pi\dat\pimapevq.dat headersize: 65536, pagesize: 1048576, state: 0x62 PImapfileheader[$Workfile: pimmq.cxx $ $Revision: 36 $]:: filesize: 67108864, pagesize: 1048576, version: 2 detached: 0, readpage: 5, writepage: 11 filename: D:\PI\dat\pimapevq.dat statlock: 0, freepagecount: 57, writtenbytes: 10732644 eventwrites: 445624, eventreads: 182380, eventcount: 263244 shiftcount: 8, readshiftcount: 2 queueorder: 0, overflowevents: 0

PI Server Reference Guide

103

Command-Line Utility Reference

Dump of page #5 PImapfilepage[$Workfile: pimmq.cxx $ $Revision: 36 $]:: pagesize: 1048576, eventcount: 43104, version: 1 full: 1, readoffset: 178414, writeoffset: 178405 datasize: 1048548, wrapoffset: 1048542 ...

When a record number or a point ID is specified, the events of the record or the point are also displayed: D:\PI\adm>pidiag -qd RecNo=1 d:\pi\dat\pimapevq.dat PImapfilequeue[$Workfile: pimmq.cxx $ $Revision: 36 $]:: filepath: d:\pi\dat\pimapevq.dat headersize: 65536, pagesize: 1048576, state: 0x62 PImapfileheader[$Workfile: pimmq.cxx $ $Revision: 36 $]:: filesize: 67108864, pagesize: 1048576, version: 2 detached: 0, readpage: 5, writepage: 11 filename: D:\PI\dat\pimapevq.dat statlock: 0, freepagecount: 57, writtenbytes: 10732644 eventwrites: 445624, eventreads: 182380, eventcount: 263244 shiftcount: 8, readshiftcount: 2 queueorder: 0, overflowevents: 0 Dump of page #5 PImapfilepage[$Workfile: pimmq.cxx $ $Revision: 36 $]:: pagesize: 1048576, eventcount: 43104, version: 1 full: 1, readoffset: 178414, writeoffset: 178405 datasize: 1048548, wrapoffset: 1048542 --------------------------------------------pointid,recno,mode,timestamp,type,bits: value 1,1,append,25-Sep-2009 16:56:06,12,S,O,A,S,Q [0,0,0,0,0]: 76.4593, 76.4593 1,1,append,25-Sep-2009 19:31:15,12,S,O,A,S,Q [0,0,0,0,0]: 14.2614, 14.2614 ...

View Event Queue File Statistics pidiag -qs path

This command displays the statistics of an offline event queue file. D:\PI\adm>pidiag -qs d:\pi\dat\pimapevq.dat Event Queue File: d:\pi\dat\pimapevq.dat --------------------------------------------Physical File Size (MB): 64 Page Size (KB): 1024 Total Data Pages: 63 Write Page Index: 11 Read Page Index: 5 Total Page Shifts: 8 Available Pages: 57 Average Events per Page: 43537 Estimated Remaining Capacity: 2479587 Total Bytes Written (MB): 10 Total Event Writes: 445624 104

pidiag Reference

Total Event Reads: Current Queue Events: Overflow Queues: Total Overflow Events: Current Queue Id:

182380 263244 0 0 0

PI Server ID Utilities Prior to PI server version 3.4.375 (the PR1 release), the server ID is stored in the file PI\dat\PISysID.dat and can be viewed via the pdiag -cid command. In version 3.4.375 and later, the file no longer exists. The Server ID is stored in the PIServer table and must be viewd with the Collective Manager or piconfig when the PI Server is running. When the server is not running, it can be viewed by pidiag -did. For details, see the High Availability and PI Server Replication Guide. If you are to downgrade the PI Server to a version earlier than 3.4.375, use the pidiag -rcsid command to recreate the PISysID.dat file.

Performance Counter Utilities Get Performance Counter Path pidiag -gpc can be used to help configure performance counter tags for use with the PI Performance Monitor (Perf-Mon) Interface. The basic Perf-Mon Interface is included with the PI Server. From a command prompt, enter the following to open the Get Counter Paths dialog box: pidiag -gpc

Select counters from the dialog box and click Add. This causes the full path of the performance counter to be echoed to the command prompt. The format of the path is the same format used by the PI Performance Monitor Interface. Once all desired counters have been echoed to the command prompt, the output can be used in conjunction with the PI TagConfigurator Excel Add-In for building PI Performance Monitor Tags. Uninstall Performance Counters To uninstall performance counters for a specific subsystem for debugging purposes, use the pidiag-upc command. You must provide the name of the subsystem. For example, the following removes the Registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\pinetmgr\ Performance and all of its values: pidiag -upc pinetmgr

Stopping and starting pinetmgr as a service reinstalls the performance counters.

PI Server Reference Guide

105

Command-Line Utility Reference

Get Performance Counter Values To check the definition or get the current values of PI performance counters, use pidiag -gmmf. You must provide the Performance Counter object name. The following table shows the list of Performance Counter object names for the main PI Subsystems: Subsystem

Main Counters

Session Statistics

Subsystem Statistics

PI Network Manager

pinetmgr_Counters

N/A

N/A

PI Message Subsystem

pimsgss_Counters

PISession:pimsgss

PISubsys:pismsgss

PI License Manager

pilicmgr_Counters

PISession:pilicmgr

PISubsys:pilicmgr

PI Update Manager

piupdmgr_Counters

PISession:piupdmgr

PISubsys:piupdmgr

PI Base Subsystem

pibasess_Counters

PISession:pibasess

PISubsys:pibasess

PI Snapshot Subsystem

pisnapss_Counters

PISession:pisnapss

PISubsys:pisnapss

PI Archive Subsystem

piarchss_Counters

PISession:piarchss

PISubsys:piarchss

Notes: These object names are case sensitive. pidiag returns a system error 2 when mistyped. These objects are all defined in the global namespace of Windows. As a result, their names must always be prefixed by the string Global\ (case-sensitive).

Example: C:\PI\adm>pidiag -gmmf Global\pibasess_Counters Performance counters for MMF Global\pibasess_Counters Point Count: 200558 Connector Point Count: 0 Point Create or Edit/sec: 0 Digital State Translations/sec: 165 Wild Card Searches/sec: 200 Point Accesses/sec: 200710 Module Count: 20 Heading Set Count: 0 Heading Count: 0 Module Database Record Count: 24 Module Create or Edit/sec: 0 Heading Set Create or Edit/sec: 0 Heading Create or Edit/sec: 0 Module Database Create or Edit/sec: 0 Module Accesses/sec: 94 Heading Set Accesses/sec: 0 Heading Accesses/sec: 0 Module Database Accesses/sec: 94

Check Performance Counters The command: pidiag –cpc [-fix]

106

pidiag Reference

checks performance counters and reports problems found. When the option -fix is specified, it attempts to fix the problems. If there are problems it cannot fix, it makes suggestions on how to repair the issues manually. Link and Unlink 32-bit and 64-bit Performance Counters PI software running on Windows records its performance counters within the Windows registry. 32 bit and 64 bit PI software write to different locations in the registry, and this can leave 32 bit performance monitoring tools like the Performance Monitor Interface unable to read the counters for 64 bit PI software, and vis-versa. To avoid this situation, the two registry locations must be linked. Normally the PI message subsystem ensures these locations are linked, however a manual command is available as well. To link the keys, run: pidiag –licks

To unlink the keys, run: pidiag –ulcks

Licensing Utilities PI Server requires a PI license file to run. The license file may be machine or cluster specific, which means it can be used only on a particular computer or the members of a particular cluster. PI License Manager determines whether a machine or cluster specific license file can be used on a computer or a cluster based on hardware, network, and operationg system information. We call such information the signature of a machine or a cluster. Several pidiag commands are provided for gathering and checking machine and cluster signatures. Generating a Signature File pidiag -host -file filename

This command gathers the hardware, network, and operating system information of the local computer or cluster and stores the information in the output file specified by filename. The output file is called a machine signature file or a cluster signature file. This signature file is needed for generating the PI license file for this computer or cluster. We recommend that you use extension .msf for a machine signature file and .csf for a cluster signature file. Example: D:\PI\adm>pidiag -host -file D:\vmtest-xp2.msf

Comparing Signatures pidiag -host -compare filename [, filename]

This command compares signatures. When only one signature file is provided, it compares the information stored in the file with the configuration of the local machine or cluster. When a second signature file is provided, this command compares the two signature files. Matching signatures example: D:\PI\adm>pidiag -host -compare D:\vmtest-xp2.msf PI Server Reference Guide

107

Command-Line Utility Reference

Percent Match: 100

Not matching signatures example: D:\PI\adm>pidiag -host -compare D:\vmtest-xp4.msf OS String : Service Pack 3 2 CPU Level : 6 CPU Rev : 3851 CPU count : 4 Logical CPU count : 4 Memory : 2048 Fixed Disk Count : 1 Total Disk Space (MB) : 476817 Multi-Thread : 0 MAC Address : 4-005056c00008 0-000c290b1612 MAC Address 2 : 3-005056c00001 ComputerName : VMTEST-XP2 IPaddr : 192.168.5.182 192.168.4.132 OSProductID : 55274-640-7804556-23379 76487-640-7804556-23915 Percent Match: 0

- Service Pack -

15 1032 0 1 512 0 10227 7

- VMTEST-XP4

-

Extracting Signature from a License File A machine specific license file contains the signature of the machine or cluster that it was generated for. This information can be extracted by: pidiag -host -lictomsf licfile msffile

If the license file is for a cluster, the command is: pidiag -host -lictocsf licfile csffile

The licfile parameter is the full path of the license file. The msffile parameter is the output machine signature file that will contain the extracted machine signature. The csffile parameter is the output cluster signature file that will contain the extracted cluster signature. Example: D:\PI\adm>pidiag -host -lictomsf D:\pilicense.dat D:\test.msf

These commands are useful when you have a machine specific license file but do not know which computer or cluster it is for. Once you extract the signature, you can use the pidiag -host -compare command to check it against your machine or cluster.

Miscellaneous Wait for Passed Milliseconds The command to wait for passed milliseconds is: pidiag -w msec

108

pidiag Reference

Test for Crash Dump Capability The command pidiag -crash

purposely raises an operating system exception; in other words, it purposely crashes. This is used to test the crash dump capability of the installed just-in-time debugger such as Dr. Watson on Windows. Debuggers, including Dr. Watson, rely on debug symbols to translate code addresses to line numbers and meaningful text. The PI System installs these symbols in %SystemRoot%\Symbols\exe directory where SystemRoot is typically C:\Windows. The system environment variable, _NT_SYMBOLS_PATH, must include this full path. On a crash, if this path is not included in _NT_SYMBOLS_PATH the crash symbols will not be correctly interpreted. Reset Password to Blank To reset the piadmin (userid #1) password to blank: pidiag -udf path

This command is useful when the piadmin password is lost. Following this operation, the piadmin password can be set to any given string using the pisetpass utility. For example: e:\PI\adm>pidiag -udf e:\pi\dat\ The administrative password has been successfully reset.

The administrative account is piadmin. Note: The PI Base Subsystem must be shut down for this command to succeed. Also note the path argument requires a trailing \ character.

Display Network Definitions To display the network definitions of a computer: pidiag -host

This may be used on nodes running client applications and interfaces, to help the definition of trust login records. For example: D:\pi\adm>pidiag -host Domain

Machine User

IP Addr FQDN

Primary Domain Controller: pidiag -getpipcpath PIPC home directory: C:\Program Files\PIPC\

Example 2, on 64-bit Windows: C:\Program Files\PIPC\adm>pidiag -getpipcpath 32-bit PIPC home directory: C:\Program Files (x86)\PIPC 64-bit PIPC home directory: C:\Program Files\PIPC\

Find Files in the PIPC Directory pidiag -getpipcpath -filepath filename

This command is useful on 64-bit Windows when you do not know whether a file is in the 32-bit PIPC directory or the 64-bit PIPC directory. This command first attempts to locate the file in the 64-bit PIPC home directory. If not found, it tries to locate the file in the 32-bit PIPC directory. If the file is found, the full path of the file is displayed. Example 1, finding a file in the 32-bit PIPC directory: C:\Program Files\PIPC\ADM>pidiag -getpipcpath -filepath interfaces\pitopi\pitopi.exe C:\Program Files (x86)\PIPC\interfaces\pitopi\pitopi.exe

Example 2, finding a file in the 64-bit PIPC directory: C:\Program Files\PIPC\ADM>pidiag -getpipcpath -filepath interfaces\piperfmon_basic\piperfmon_basic.exe C:\Program Files\PIPC\interfaces\piperfmon_basic\piperfmon_basic.exe

Generate GUID pidiag -uuid [count]

This generates GUIDs. Count is the number of GUIDs to generate. If it is not specified, one GUID is generated. pidiag -uuid 88E75570-14AA-4512-879D-A20B85771402

Display Machine-Specific Programming Information To display machine-specific information that may be useful for programmers, use pidiag -machine. This command also provides details about the processor architecture of the local machine. The number of processors , both physical and logical, is shown, as well as the number of CPU cores and information about Intel® Hyper-Threading Technology. pidiag -machine CPU Architecture: INTEL Physical/Logical Processors: 1/2 Number of Cores per Processor: 1 Hyper-Threading Status: 1 (enabled) PI Server Reference Guide

111

Command-Line Utility Reference

System appears to be little endian. PI System built as little endian. long integers are 4 bytes. TCHARs are 1 byte. Pointers are 4 bytes. Enumerations are 4 bytes. int8s are 1 byte. uint8s are 1 byte. int16s are 2 bytes. uint16s are 2 bytes. int32s are 4 bytes. uint32s are 4 bytes. int64s are 8 bytes. uint64s are 8 bytes. float32s are 4 bytes. float64s are 8 bytes.

Determine Message Definition File Version The PI message log stores each message as an ID and parameters instead of plain text. When a client reads a message from the log, the PI Message Subsystem uses a message definition file to translate the ID and parameters into plain text. PI message definition files are versioned. You can view the version of the file by: pidiag -mdfv [path]

[path] is the full path of a message definition file. When it is not provided, the version of the default file, PI\dat\pimdf.dat or PIPC\dat\pimdf.dat, is reported. Register a COM Component To register a COM component, run the input registration script: pidiag -rgs

The script should have all the necessary registry information to start and access the component. This utility is useful if the COM component is to run remotely from a client node and the client node does not have all the necessary .DLLs in order to instantiate it locally, which is required in order for the component to self-register. The component should be provided with the script. pidiag -rgs [-?] [-u] FILENAME.RGS [ReplaceableParameter="Value"]

Parameter

Description

-?

Displays a help dialog box

-u

Unregisters the COM component

FILENAME.RGS

RGS filename

ReplaceableParameter

Anything in the RGS file surrounded by % is a replaceable parameter. For example, %MODULE%.

Value

A value for the replaceable parameter.

For example, to register an RGS file that contains %MODULE%: 112

pidiag Reference

pidiag -rgs MYOBJECT.RGS MODULE="c:\Program Files\MyProgram\myobject.dll"

Replace Parameters in the RGS File Anything in the RGS file surrounded by % is a replaceable parameter. For example: %MODULE%. You must provide a value for replaceable parameters. For example, to register an RGS file that contains %MODULE% in the following script: HKCR {

NoRemove CLSID { ForceRemove {8FC8B7BC-0C07-11D4-84C4-00C04F6102DF} = s 'UDSSim4 Class' { ProgID = s 'Demo4.UDSSim4.1' VersionIndependentProgID = s 'Demo4.UDSSim4' ForceRemove 'Programmable' LocalServer32 = s '%MODULE%' val AppID = s '{8FC8B7B0-0C07-11D4-84C4-00C04F6102DF}' 'TypeLib' = s '{8FC8B7AF-0C07-11D4-84C4-00C04F6102DF}' } } } pidiag -rgs MYOBJECT.RGS MODULE= "c:\Program Files\MyProgram\myobject.exe"

Dump PIFileBase Files Internally, most PI Server data files have the same low-level structure and are referred to as PIFileBase-type files. The most notable exceptions are PI archive files. However, the annotation files that correspond to the PI archive files are of type PIFileBase. The pidiag -fb utility dumps the PIFileBase-type files and can be used to check PIFileBase-type files for correctness. Pass it the complete pathname of the PIFileBase-type file as a parameter. For example: pidiag -fb c:\pi\dat\pidignam.dat

If it returns an error, you can try to fix it with the following command: pidiag -fbf c:\pi\dat\pidignam.dat

Note that PI must not be running when you attempt to repair a file. It is enough in most cases to shutdown the owner subsystem In some cases pidiag -fbf will report the following: Error reading input record # nn [-10466] No Record Available for Passed recno

This is normal for records between the actual last record and the maximum allocated record. The warning disappears if the utility is run a second time. PI Server Reference Guide

113

Command-Line Utility Reference

Rarely-used pidiag Options The following pidiag options are rarely used. Option

Description

-assert

Force an assertion. Note: only works in a debug build of pidiag.

-uuidcmp

Compare GUIDs

-z executable_file

Run Win32 process

-NightlyTask taskname tasktime command

Set up a file for the batch queue

-dbg executable path symbol_path

Windows debug symbols

-wsd procid

Get working set params

-wss procid minws maxws

Set working set params

-appendini INIFileName Section Key [Value] -getinivalue INIFileName Section Key

Utilities to interface to Windows ini file

-xaf source target

Fix Audit file

pigetmsg Reference The pigetmsg utility is located in the PI/adm directory. If you include all necessary parameters on the command line when you run pigetmsg, then pigetmsg simply returns the results and exits. This is called non-interactive mode. If you do not enter all the necessary parameters, then pigetmsg prompts you to enter them. This is called interactive mode. The necessary parameters to run in non-interactive mode are a minimum of two of the following: •

start time (–st)



end time (–et)



maxcount (–mc)

If you specify the -i option, pigetmsg goes into interactive mode after the results are returned, even if you entered all necessary parameters for non-interactive mode. If you specify the –f option, pigetmsg goes into continuous mode after the results are returned. See Use pigetmsg in Continuous Mode (page 116) for more information. Use this command to open Help files for the pigetmsg utility: pigetmsg /?

Options for pigetmsg The following table lists the available options for pigetmsg.

114

pigetmsg Reference

Option

Description

Mode -f

Update continuously (refreshing every 2 seconds)

-i

Interactive mode (the default, can be combined with -f to prompt users through each page of messages)

Filter Options -st

Start time. This should be entered in PI time format.

-et

End time. This should be entered in PI time format.

-t

Tail. Output the last messages within the time range (default is 1) If no end time is specified, search starts from current time

-id

This is an integer that represents the specific message identification number: 0 for the free-format messages. The default is all messages.

-msg

A string mask selection for the message text. The default is * (show everything).

-mc

total number of messages to return

-pr

This is the specific program name (pinetmgr)

-src -src1 -src2 -src3

Source of the message (matching the process name, Source 1, 2 or 3)  -src1 Source 1  -src2 Source 2  -src3 Source 3

-pid

Process ID, This is the process ID of the program.

-phost

Process hostname. This is the hostname where the program is running. Blank means this came from localhost.

-posuser

The Name of the user account (Principal) the process was running under.

-ppiuser

The PI Identity(s) of the user account the process was running under.

-ohost

Hostname of the user this process was acting on behalf of.

-oosuser

The Name of the user (Principal) this process was acting on behalf of.

-opiuser

The PI Identity(s) of the user this process was acting on behalf of.

-si -sw -se -sc

minimum severity level-- choose the appropriate option for the minimum severity level you want to see -si = information -sw = warning -se = error -sc = critical

-cat

Category. Messages may optionally belong to a particular category.

-pri

Priority. Messages may optionally be marked with a particular priority (1-10).

Prompting options -qb

basic prompts only (start time/end time)

-qa

prompt for all message fields

Formatting options -fw

Wide format output (one message per line)

-fx

XML format output

PI Server Reference Guide

115

Command-Line Utility Reference

-fc

CSV format output

Output options -oa

output all message fields (by default only the most common fields are shown)

-sd

Number of digits to display when showing subsecond timestamps (e.g. 5 for 17-Jul-09 10:23:13.03518). By default no subseconds are shown.

-of

output results to a file (if no filename given, a default is used) Connection Options -Node -Port (5450)

-Windows -Trust -Explicit -Username

Remote PI Server username

-Password

Remote PI Server password

-PackageParam

Note: The -dc option is not available in PI Server versions 3.4.380 and later. Interactive mode (-i) will show one page of messages at a time.

Use pigetmsg in Continuous Mode Continuous mode (-f) continually flushes the message log and gets the last messages every 2 seconds. If StartTime is specified, pigetmsg initially displays messages beginning at the start time up to current time. If the Tail option (-t) is specified, then pigetmsg initially displays the last (n) messages. If EndTime is specified (should be a timestamp relative to current time, i.e. *-5s), introduces a delay between the time a message is generated and the time pigetmsg displays it. This can ensure messages that arrive late or out of order are not missed. The program may be stopped with a Ctrl-C. Specify the -i option, and pigetmsg prompts after displaying each page of messages.

Use pigetmsg in Interactive Mode In interactive mode, there is a default start time and end time. The default start time is *-15m, that is, 15 minutes prior to the current time. The end time is * which indicates current

116

pigetmsg Reference

time. There is no default limit on the maximum number of messages, or max count. That is, if you do not enter a value for max count, you will retrieve all messages based on the start and end times entered. To select the default, click Enter after a prompt.

Tips for Filtering pigetmsg Output Use these guidelines to determine the pigetmsg output: •

To review messages for a specific time span, enter start time and end time.



To review a specific number of messages that begin at a specific start time enter max count and start time.



To review a specific number of messages that end at a specific end time, enter end time and max count.



To review messages that span from a specific start time through either a specific number of messages or a specific end time, start time, end time, and max count.

Use pigetmsg Remotely The pigetmsg utility supports remote logins to other PI Servers. Use the -remote argument to initiate an interactive remote pigetmsg session: pigetmsg –remote

In this mode, pigetmsg prompts you to enter the required connection details: node name, TCP/IP port, user name, and password. The term node refers to the TCP/IP host name or TCP/IP address of the PI Server. Alternatively, you can use these arguments to initiate a remote session: Parameter

Description

–username

Remote PI Server username

–port

TCP/IP port number

–node

Remote PI Server node name

–password

Remote PI Server password

For example, to begin an interactive session as the user, piadmin, with the password, buddy on a remote NT host named Samson, use:

pigetmsg –remote –node Samson –username piadmin –port 5450 –password buddy

Search for and Sort Messages To use pigetmsg to list all messages received today from a specific subsystem such as the PI Base Subsystem: pigetmsg –st t –et "*" –pn pibasess PI Server Reference Guide

117

Command-Line Utility Reference

To list the last 100 messages that have the word error as part of the message and then display these messages 10 at a time: pigetmsg –st t –et "*" –mc 100 –msg "*error*" –dc 10

To send pigetmsg results to a file, use the standard output redirection operator (>): pigetmsg –st "*–1h" –et "*" > myfile.txt

Use pigetmsg to Test pimsgss Run the pigetmsg utility to test pimsgss. If pimsgss is not working correctly, you will see: D:\PI\adm>pigetmsg Message ID [A], (0-n) (A)ll (T)ail (F)lush (Q)uit (?): Message Source [*], (?): Start time in PI format [*-15m], s(K)ip (?): End time in PI format [*], s(K)ip (?): Maximum count [], (0-n) (?): Text mask [*], (?): Display count [], (0-n) (?): [-10733] PINET: RPC Resolver is Off-Line.

pilistupd Reference The pilistupd utility shows the size of the queues of events maintained by the Update Manager. The utility requires that PI Server be running. Note: PI Server exposes Update Manager Counters as Windows Performance Counters. These counters may be viewed with the Windows Performance Monitor and stored as PI points using the OSIsoft Performance Monitor Interface.

At the PI\adm directory: pilistupd

You will see a summary of the current state of update signups:

118



Producer: This is the source of update notifications. Currently there are five producers. PI Snapshot Subsystem is a producer of Snapshot events. PI Base Subsystem is a producer of Point Database and Module Database changes. The Archive Subsystem is a producer of archive changes. The Batch Subsystem is a producer of Batch Database changes.



Consumer: Application currently signed up as a consumer of specified producer. For PI API applications, the consumer name is usually the first four letters of the login name of the user running the application. These names are not unique so the PI Update Manager assigned ID is appended to the name. PI API applications also have the PI Network Manager ID appended. These integers are appended to help find specific consumers. For the PI SDK, the consumer name is the complete application name with a colon and a PI SDK supplied identifier followed by a pipe character and a PI Update Manager assigned ID.

pilistupd Reference



Qual: This is the qualifier. The qualifier is a producer-specific integer. For example, Snapshots update stores the requested point ID in the qualifier.



Flags: A producer-specific field.



Pending: Number of events available for the consumer to retrieve. The value goes up and down as events come in and the consumer pulls them out. Values that increase continuously might indicate that the consumer is not working properly or disconnected.

Note: The Pending number shows a maximum of 50000 events, even if more events are in the queue. You can configure this limit with the MAXUPDATEQUEUE Tuning Parameter. The Update Manager might limit individual consumers from accumulating too many pending events. This is a display limitation and does not imply data loss.

Command-line Options for pilistupd pilistupd has the following command-line options: Option

Description

-v

Show version

-h

Help

-c consumer

Select a specific consumer

-p producer

Select producer

-m min

Show only events with pending >= min

-t

Show only the total number of pending consumers and producers for this selection

-d

piupdmgr dump to pi\adm\updmgr.dmp

-r C

Repeat C times every S sec.

-g

A list of registered producers/consumers

-sp

Sort output by producers

PI Producers and Associated Subsystems The following table lists the possible producers and what subsystem they belong to. Producer

Description

Subsystem

snapshots

snapshot

Snapshot

archive

archive

Archive

ptupdates

point updates

Base

PI Server Reference Guide

119

Command-Line Utility Reference

Producer

Description

Subsystem

MDBUpdates

module database

Base

PIChangeRecordUpdates

Configuration changes for PI Server replication

Base

DigitalSets

digital sets

Base

BDBUpdates

batch database updates

Archive

PIBatchUpdates

batch updates

Archive

PIUnitBatchUpdates

unit batches

Archive

PIUnitBatchOnUnitUpdates

Unit batch updates for a specific unit

Archive

PICampaignUpdates

campaigns

Archive

PITransferRecordUpdates

transfer records

Archive

Example 1. Limit Output to Point Updates The following command limits output to the Producer ptupdates: e:\pi\adm>pilistupd -p ptupdates Producer Consumer Qual. Flags ptupdates Pibatch|1 0 0 ptupdates Pitotal|2 0 0 ptupdates PipeE|14|3 0 0 ptupdates RandE|16|4 0 0 ptupdates RmpSE|17|5 0 0

Pending 0 0 0 0 0

In the results, the first entry is PI Batch Subsystem registered as a consumer of Point Database changes. The integer 1 indicates this is the first consumer to register with the PI Update Manager. The second registered consumer is the Totalizer Subsystem. The third entry is a PI API-based application, probably Performance Equation Scheduler. PI API applications have an up to eight-character name. The two subsequent integers, separated by the pipe ( | ), are the PI Network Manager assigned connection ID and the PI Update Manager assigned ID. The connection ID is useful in tracking down errant client applications; for example a ProcessBook display that is not checking for updates. The PI Network Manager Statistics table can be used to lookup the machine associated with an ID. Entries 4 and 5 are also PI API-based applications, probably the Random and RampSoak interfaces, which are installed by default on the PI Server node. Random interface generates sinusoid points. A trend of sinusoid can indicate whether the server is providing updates to the client normally.

120

pilistupd Reference

Example 2. Run pilistupd with PI ProcessBook Display The next table was generated by running pilistupd with an open PI ProcessBook version 3.x display, trending two points. c:\pi\adm>pilistupd Signup Statistics for 7-Mar-07 14:24:41 Producer Consumer Qual -----------------ptupdates pitotal|1 0 snapshots pialarm|2 1 ptupdates pialarm|2 0 ptupdates RmpSE|36|3 0 ptupdates RandE|37|4 0 ptupdates PipeE|254|9 0 ptupdates Procbook:zheng2:376:1|89 0 snapshots Procbook:zheng2:376:2|90 1 snapshots Procbook:zheng2:376:2|90 4

Flag ---0 0 0 0 0 0 0 0 0

Pending ------0 0 0 0 0 0 0 0 0

The last three lines of results are all the same display. For PI SDK applications, the consumer attribute includes: •

Procbook: Application name



zheng2: Client hostname



376: Process ID



1 and 2: Event pipe ID



89 and 90: PI Update Manager ID

The qualifier attribute shows the point IDs being trended. There are no pending events.

Example 3. Determine if Client Updates Occur Running pilistupd several times should reveal changes in the pending numbers. This can be done easily by using command-line switches. The -m option, requests a minimum pending value of 1. The -r requests that the command be run 100 times. In the example below, the command is issued and then results appear for four runs before the command is stopped with Ctrl+C. For three of the runs, none of the producers have any pending updates, as indicated by the No Matching entries output. e:\pi\adm>pilistupd -p snapshots -m 1 -r 100 No Matching entries No Matching entries Producer Consumer Qual. Flags Pending ---------------------- ------ -------snapshots piadE|15|5 4 0 1 snapshots piadE|15|5 12 0 1 snapshots piadE|15|5 18 0 1 snapshots piadE|15|5 19 0 1 snapshots piadE|15|5 20 0 1 No Matching entries ^C

PI Server Reference Guide

121

Command-Line Utility Reference

In a normal system, you would anticipate that the pending number would reach 1 occasionally as the pilistupd command was run before the consumer retrieved the update. If the pending number never increases above 0, it may be that data is not arriving from the source. If the pending number increases continually and does not shrink, the consumer is probably not retrieving the updates.

pipetest The pipetest utility checks the syntax of a Performance Equation. It can operate interactively, take its input from a file or check the extended descriptor of a point. The pipetest utility is located in the pi\adm directory. To start pipetest, open a command window, change to the pi\adm directory, and type a pipetest command. For a complete list of pipetest commands, type: pipetest -?

The pipetest utility is limited to equations that are 4095 characters or less and you can not use it to test dynamic response functions. To run the pipetest utility interactively from a command prompt window, open a command window, change to the pi\adm directory and enter: pipetest

At the pipetest equation prompt, type in the equation you want to test. If the equation syntax is not valid, pipetest displays a syntax error. If the syntax is valid, pipetest displays the result of the equation. You can also put one or more performance equations in a simple text file, and pass the entire file to pipetest using the -f switch. In the text file, you put each equation on a single line. You can include comment lines by beginning the line with an exclamation mark (!). Here's the text from an example pipetest file, called peTestEquations.txt: ! test calculation for point A if BadVal('sinusoid') then 0 else ('sinusoid')/25 ! test calculation for point B TimeLT('sinusoid', 'y' , 't', TagVal('sinusoid', '*'))

To test the equations in the file, type: pipetest -f peTestEquations.txt

Each input line in turn is echoed and the evaluated result is displayed.

pisetpass The pisetpass command is useful when the piadmin password is lost. Following this operation, the piadmin password can be set to any given string using the pisetpass utility. For example: e:\PI\adm>pidiag -udf e:\pi\dat\ The administrative password has been successfully reset. The administrative account is piadmin. 122

piversion

Note: The PI Base Subsystem must be shut down for this command to succeed. Also note the path argument requires a trailing \ character.

piversion To get the PI Server version and build numbers, enter the following from the PI\adm directory: piversion -v

If you have applied a patch to your PI Server, the version numbers of the executables affected are different from that shown by piversion -v. To see the version of each executable and the version of the executable running in memory, use piversion.bat, also in the PI\adm directory: piversion.bat

When you use the -v option to run an executable, it does not start; instead, the version number appears. For example, if you type piarchss.exe -v from the PI\bin directory, you would see something like this: Version: PI 3.4.380.36 Program: piarchss.exe

PI Server Reference Guide

123

Chapter 2

PI Server Database Files The PI Server includes several databases and files that store configuration information and time-series data. The main PI Server databases are the Point Database and the PI Archive, or Time-Series Database. Other parts of the system, including the Snapshot Table, the Digital State Table, the Batch Database, and the Module Database, support these components. The Security database contains settings about client authentication and high-level database access. The PI Server data files are located in the PI\dat directory. Archives are likely to be in a separate directory. This table provides a list of database files for your reference. The files are organized by the subsystem to which they belong: Files that comprise:

Description

Point Database (PI Base Subsystem) pipoints.dat

Point definition

piptattr.dat

Attribute Set definition

piptclss.dat

Point Classes definition

pidigst.dat

Digital Sets definition

pidignam.dat

Digital State Names definition

piptsrcind.dat

Point source index. This is an index that allows for quick lookup by pointsource. This file is rebuilt automatically if it does not exist.

piptcomind.dat

Index of COM connector points. Automatically rebuilt if it does not exist.

Module Database (PI Base Subsystem) PIModuleDb.dat

PI Module Database

PIModuleUnitDb.dat

Batch process unit index—an index of all modules with the IsPIUnit flag set to true. Automatically rebuilt if it does not exist. Note: Delete this file before a backup restoration.

Security (PI Base Subsystem) piident.dat

PI Identity definition file; upgraded PI Servers contain piusr.dat and piusrgrp.dat

piusrctx.dat

PI User Contexts, a very simplistic mechanism to tag PI Users; this is deprecated but the PI SDK has a public interface for it.

piidentmapping.dat

PI Mappings definition

piacl.dat

Access Control Lists (ACLs) definition for all PI Server secure objects (points, modules and database security databases).

pidbsec.dat

PI Database Security definition

PI Server Reference Guide

125

PI Server Database Files

pitrstrl.dat

PI Trusts definition

pifirewall.tbl

PI Firewall Table

Time-Series Database (PI Snapshot and Archive Subsystem) piarcmem.dat

Snapshot Table

pimapevq.dat (or pimq####.dat)

Event Queue file(s)

piarstat.dat

List of registered Archive files

PI Server Messages (PI Message Subsystem) pimsgtxt.dat

Message text resource

pimdf.dat

Message definition file; new on PI Server versions 3.4.380 and later

pimsg_yymmdd.dat

Message logs where yymmdd represents date covered by file

Batch Database (Batch Subsystem) piptunit.dat

Legacy Batch Units (deprecated)

piptalia.dat

Legacy Batch Aliases (deprecated)

Miscellaneous shutdown.dat

Shutdown event definition

pilastsnap.dat

Current time updated by the Snapshot Subsystem. It is used to determine the PI Server shutdown time.

pitimeout.tbl

Tuning Parameter definition

Dump PIFileBase Files Internally, most PI Server data files have the same low-level structure and are referred to as PIFileBase-type files. The most notable exceptions are PI archive files. However, the annotation files that correspond to the PI archive files are of type PIFileBase. The pidiag -fb utility dumps the PIFileBase-type files and can be used to check PIFileBase-type files for correctness. Pass it the complete pathname of the PIFileBase-type file as a parameter. For example: pidiag -fb c:\pi\dat\pidignam.dat

If it returns an error, you can try to fix it with the following command: pidiag -fbf c:\pi\dat\pidignam.dat

Note that PI must not be running when you attempt to repair a file. It is enough in most cases to shutdown the owner subsystem In some cases pidiag -fbf will report the following: 126

piarcmem.dat

Error reading input record # nn [-10466] No Record Available for Passed recno

This is normal for records between the actual last record and the maximum allocated record. The warning disappears if the utility is run a second time.

piarcmem.dat This binary file is used by the PI Snapshot Subsystem. It contains the most recent values that have been sent to the PI Server. The PI Snapshot Subsystem periodically writes the latest Snapshot values to this file. Use pidiag -fb and pidiag -fbf to verify the validity of this PIFileBase-type database.

piarstat.dat This binary file keeps track of registered archives. It is required by piarchss. If you are having trouble with archive file registration, do not delete this file. Instead, see Repairing the Archive Registry (page 102).

pidignam.dat This binary file stores each unique digital state name. Use pidiag -fb and pidiag -fbf to validate and restore this PIFileBase-type database.

pidigst.dat This binary file stores the digital sets; it references names stored in the above file. Use pidiag -fb and pidiag -fbf to validate and restore this PIFileBase-type database.

pilastsnap.dat This binary file stores the timestamp of the last completed Snapshot flush to disk. On PI System startup, this timestamp is assumed to be the shutdown time and is used as the timestamp for shutdown events. On orderly shutdown, this file will contain the true shutdown time. With a system crash such as a power failure, the Snapshot may be as old as the Snapshot flush cycle time period. The Snapshot flush cycle is controlled by the SnapFlushCycle timeout parameter, which is 15 minutes by default.

PI Server Reference Guide

127

PI Server Database Files

pimapevq.dat and pimaNNNN.dat These are the memory-mapped Event Queues. Most systems use the default single file pimapevq.dat. Certain situations require multiple Event Queues; in this case the files take the naming convention of pimaNNNN.dat where NNNN is an integer. The memory mapped Event Queue serves two purposes. First, it used for moving events from the Snapshot Subsystem to the Archive Subsystem. PISnapss places events which pass compression into this queue. The PI Archive Subsystem takes these events and writes them to the Archive. Second, this file provides storage of events when the Archive Subsystem cannot process events such as during Archive shifts or when the Archive process is shutdown. This file, as the name implies is a memory-mapped file. Memory mapped files allow for high speed in-memory access with the security of being safely backed up to disk.

pimsgtxt.dat This binary file stores formatted message strings used by the pigetmsg utility. Use pidiag -fb and pidiag -fbf to check and restore the validity of this PIFileBase-type database.

pipoints.dat This binary file stores the Point database. Use pidiag -fb and pidiag -fbf to check and restore the validity of this PIFileBase-type database.

piptalia.dat This binary file contains alias information. Use pidiag -fb and pidiag -fbf to check and restore the validity of this PIFileBase-type database.

piptattr.dat This binary file stores the point attributes. Use pidiag -fb and pidiag -fbf to check and restore the validity of this PIFileBase-type database.

piptclss.dat This binary file stores the point classes. Use pidiag -fb and pidiag -fbf to check and restore the validity of this PIFileBase-type database.

128

piptunit.dat

piptunit.dat This binary file stores the PI Point units. Use pidiag -fb and pidiag -fbf to check and restore the validity of this PIFileBase-type database.

piusr.dat This file stores the PIUser database. Use pidiag -fb and pidiag -fbf to check and restore the validity of this PIFileBase-type database.

piusrctx.dat This file stores the context database. Use pidiag -fb and pidiag -fbf to check and restore the validity of this PIFileBase-type database.

piusrgrp.dat This file stores the group database. Use pidiag -fb and pidiag -fbf to check and restore the validity of this PIFileBase-type database.

shutdown.dat This text file contains directives that tell the PI Shutdown Interface which points should receive shutdown events.

PI Server Reference Guide

129

Appendix A

PI Performance Counters PI Server has a number of performance counter statistics that can be viewed using Microsoft's performance Monitor utility (System Monitor in Windows 2000). The following tables list the statistics that may be viewed.

PI Archive Subsystem Statistics Attribute

Description

Archived Events/sec

Rate of successful event addition to the archive.

Out of Order Events/sec

Out of order events posted in the archive.

Events Cascade/sec

Rate of Out-of-Order events causing record shifts.

Events Read/sec

Rate of archive events read.

Read Operations/sec

Rate of archive read calls. Each call can return multiple events. The rate of event retrieval is Events Read/sec.

Primary Archive Number

Internal index number of archive current assigned to primary position.

Cache Record Count

Archive cache records in memory.

Cache Records Created/sec

Rate at which archive cache records are created.

Cache Records Deleted/sec

Rate at which archive cache records are deleted.

Record Disk Reads/sec

Rate of archive disk reads (includes Cache Record Disk Reads/sec).

Record Disk Writes/sec

Rate of archive disk writes.

Cache Record Disk Reads/sec

Rate of archive cache disk reads.

Cache Record Memory Reads/sec

Rate of archive cache memory hits.

Overflow Index Record/sec

Rate at which index archive records are created.

Overflow Data Record/sec

Rate at which data archive records are created.

Cache Clean Operations/sec

Rate at which archive cache records are removed from memory.

Cache Flush Operations/sec

Rate at which points are flushed to disk.

Time to Archive Shift

Number of seconds until the archive is projected to shift. This time is not calculated if the archive is less than 20% full.

PI Server Reference Guide

131

PI Performance Counters

132

Attribute

Description

Connector Read Operations/sec

Rate of calls to read events for mapped points through COM Connectors. This rate is NOT included in the Read Operations/sec counter.

Connector Events Read/sec

Rate of events read for mapped points through COM Connectors. This rate is NOT included in the Events Read/sec counter.

Connector Summaries/sec

Rate of summaries for mapped points through COM Connectors. This rate is NOT included in the Events Read/sec counter.

Connector Events Read Exec Time

Time elapsed in milliseconds for one Events Read for a COM Connector point.

Connector Event Read Exec Time

Time elapsed in milliseconds for one Event Read for a COM Connector point.

Connector Summaries Exec Time

Time elapsed in milliseconds for one summaries call for a COM Connector point.

Point Flushes Last Cycle

Number of points flushed to disk during last cycle. Busy points might get flushed several times per cycle.

Unflushed Points

Number of points that have at least one unflushed event.

Archive Cycles/Sec

Number of Subsystem cycles per second.

Total Unflushed Events

Total number of unflushed events.

Configured Cache Record Pool

Maximum number of cache records in the read-only pool.

Current Cache Record Pool

Current maximum number of cache records, this may be lower that the configured value due to low memory resources.

Config. Max Unflushed Events/pt

Maximum number of unflushed events per point.

Current Max Unflushed Events/pt

Current maximum number of unflushed events per point, this may be lower that the configured value due to low memory resources.

Primary Archive % Used

Percent of used records in Primary Archive File.

Event Queue Chunk Size

Number of events read per Event Queue read operation.

Flush Queue Size

Number of pending flush operations in memory queue.

Write Contentions/sec

Rate of write lock contentions (EVQ threads).

Write Contention Points

Number of points in write contention last cycle.

GetSnapshot Calls/sec

Rate of internal calls to the Snapshot Subsystem.

ArcEvent Calls/sec

Rate of single archive event calls.

CompEvents Calls/sec

Rate of compressed events calls.

InterpEvents Calls/sec

Rate of interpolated events calls.

PlotEvents Calls/sec

Rate of plotted (trended) event calls

Summary Calls/sec

Rate of summary/filter expression calls.

PICampaigns Created/sec

Rate of PI Campaign creation.

PIBatches Created/sec

Rate of PI Batch creation.

PIUnitBatches Created/sec

Rate of PI Unit Batch creation.

PITransferRecords Created/sec

Rate of PI Transfer Record creation.

PI Base Subsystem Statistics

Attribute

Description

PICampaigns Edited/sec

Rate of PI Campaign edits

PIBatches Edited/sec

Rate of PI Batch edits

PIUnitBatches Edited/sec

Rate of PI Unit Batch edits

PITransferRecords Edited/sec

Rate of PI Transfer Record edits.

PICampaigns Read /sec

Rate of PI Campaign access.

PIBatches Read /sec

Rate of PI Batch access.

PIUnitBatches Read /sec

Rate of PI Unit Batch access.

PITransferRecords Read/sec

Rate of PI Transfer Record access.

PICampaigns Deleted /sec

Rate of PI Campaign deletion.

PIBatches Deleted /sec

Rate of PI Batch deletion.

PIUnitBatches Deleted /sec

Rate of PI Unit Batch deletion.

PITransferRecords Deleted /sec

Rate of PI Transfer Record deletion.

PI Base Subsystem Statistics Attribute

Description

Aborted Backups

Total number of times backups have been aborted.

Backup In Progress

If a backup is in prgress, this counter is set to 1. Otherwise, this counter is set to 0.

Backups Started

Total number of backups that have been started.

Backups Started non-Component

Total number of VSS, non-component mode backups that have been started. For example, a backup with NtBackup.exe will cause this counter to be incremented.

Backups Started non-VSS

Total number of non-VSS backups that have been started.

Failed Backups

Total number of backups that have failed.

Last Backup Copy Failures

Number of file copy failures from the last backup. This counter is not incremented for a non-component mode backup.

Last Backup Duration

Time in seconds of last backup.

Last Backup Failed

If the last backup failed or if the last backup was aborted or if the last backup's verification check failed, this counter will be 1. Otherwise, this counter is set to 0.

Last Backup Files Copied

Number of files copied in last backup. This counter is not incremented for a non-component mode backup.

Last Backup Files Skipped

Number of files not copied in last backup because a file of the same last modified date and size already exists in the destination. File copies can be skipped for incremental, differential, and full backups. This counter is not incremented for a non-component mode backup.

PI Server Reference Guide

133

PI Performance Counters

Attribute

Description

Last Backup Init Duration

Initialization duration. The number of seconds required to start backup after the backup was requested. This should typically be 0 for non-VSS backups and about 5 seconds or less for VSS backups.

Last Backup Megabytes Copied

Number of megabytes copied in last backup. This counter is not incremented for a non-component mode backup.

Last Backup PrepareBackup To Freeze Duration

Number of seconds between PrepareBackup and Freeze events. This can be a long time for a non-VSS backup if the backup is waiting for an archive shift to complete.

Last Backup Total File Count

Total files identified for last backup. Should be equal to copied + skipped + failed unless the backup is non-component mode.

Last VSS Freeze Duration

Time in milliseconds between start of the freeze event and the end of the thaw event for the last VSS backup.

Last VSS Freeze Transition

Time in milliseconds to acquire exclusive write locks in all subsystems participating in backup.

Verification Failures

Total number of verification failures.

PI Base Subsystem Statistics

134

Attribute

Description

Point Count

Total number of defined points. This number includes the Connector Point Count.

Connector Point Count

Count of defined points that are mapped points. These are points that interact with points on a foreign data historian using a COM Connector.

Point Create or Edit/sec

Rate at which points are created or edited.

Digital State Translations/sec

Rate at which digital state strings are translated to offsets.

Wild Card Searches/sec

Rate of wild card point searches. This counter represents the rate at which new searches are started, not the number of points found.

Point Accesses/sec

Rate at which point information is accessed, not including point edits. This will include translations of tag to point id.

Module Count

The total number of modules in the module database.

Heading Set Count

The total number of heading sets in the module database.

Heading Count

The total number of headings in the module database.

Module Database Record Count

The total number of records in the module database.

Module Create or Edit/sec

Rate at which modules are created or edited.

Heading Set Create or Edit/sec

Rate at which heading sets are created or edited.

Heading Create or Edit/sec

Rate at which headings are created or edited.

Module Database Create or Edit/sec

Rate at which MDB records are created or edited.

PI Buffer Subsystem Statistics

Attribute

Description

Module Accesses/sec

Rate at which module information is accessed, not including module edits.

Heading Set Accesses/sec

Rate at which heading set information is accessed, not including module edits.

Heading Accesses/sec

Rate at which heading information is accessed, not including module edits.

Module Database Accesses/sec

Rate at which module database information is accessed, not including module edits.

PI Buffer Subsystem Statistics Attribute

Description

Compressed Events/sec

Rate of events marked for archiving. Does not include OOO events.

Events Received/sec

Rate of events received by the Buffer Subsystem

Out-Of-Order Events/sec

Rate of out-of-order events received by the Buffer Subsystem

Point Count

Number of local points with cached configuration (on disk)

Point Edits/sec

Rate of point edits received from the PI Server

Total API Buffered Events

Number of events in all API buffers, including APIBUF*.DAT files

Total Events Sent/sec

Rate of events successfully sent to the PI Server

Total Queue Writes/sec

Rate of events written to all session queues

Total Queued Events

Total of buffered events in all session queues

Total Snapshot Posts/sec

Rate of data posts from all buffer sessions

Unresolved Cache Points

Numbers of local points with unknown configuration

Buffer Sessions Active

Number of buffer sessions that are registered or sending data

Buffer Sessions Offline

Number of buffer sessions that are disconnected or in error

Buffer Sessions Total

Number of initialized buffer sessions

Events In Error

Number of events not processed locally by the Buffer Subsystem.

Events Rejected

Number of events rejected by the Buffer Subsystem.

PI Collective Statistics Attribute

Description

Is Running Normally

Is the status normal for all members of the collective?

Last Config Change Time

Last time the configuration of the collective was modified

Current Server

The index of the current server of the collective

Number of Servers

The number of member servers in the collective

PI Server Reference Guide

135

PI Performance Counters

PI License Entry Statistics Attribute

Description

Amount drawn

Amount drawn from this license

Amount left

Amount left in this license

PI License Manager Statistics Attribute

Description

License count

Total active licenses

User count

Total active users

License requests

Requests for license per second

License returned

Return license calls per second

PI License User Statistics Attribute

Description

Succesful requests

Total number of successful license calls

Failed requests

Total number of failed license calls

PI Message Subsystem Statistics Attribute

Description

Sent Messages/sec

The number of messages sent to PI Message Subsystem per second.

Retrieved Messages/sec

The number of messages retrieved by the PI Message Subsystem per second.

Inserted Messages/sec

The number of messages that were inserted into the PI Message Subsystem from the Application Event Log per second.

PI Network Manager Statistics

136

Attribute

Description

Connections

The number of connections to the PI Network Manager. Applies to _Total only.

Messages Sent/sec

The number of messages sent to the PI Network Manager.

Messages Received/sec

The number of messages received by the PI Network Manager.

Bytes Sent/sec

The number of bytes sent to the PI Network Manager.

PI Performance Equations Statistics

Attribute

Description

Bytes Received/sec

The number of bytes received by the PI Network Manager.

Overflow/sec

The number of times an overflow message is required by the PI Network Manager.

Receive Errors

The number of times an error occurs during a receive of a message to the PI Network Manager.

Send Errors

The number of times an error occurs during a send of a message to the PI Network Manager.

PI API Connections

The number of PI API applications connected.

PI SDK Connections

The number of PI SDK applications connected.

Licensing Failures

The number of times an application was rejected due to licensing concerns

Licensing Warnings

The number of times an application was warned of licensing concerns

Queued Connections

The number of connections currently being processed

Queued Connection Deletions

The number of connections currently being processed for deletion

PINet3 Asynch Call Delay

Delay in milliseconds between when a PINet call was scheduled and when it was executed

API Asynch Call Delay

Delay in milliseconds between when an API call was scheduled and when it was executed

Scheduled Task Delay

Delay in milliseconds between when the currently running task was scheduled and when it was executed

PI Performance Equations Statistics Attribute

Description

AlarmFuncCalls/sec

Rate of calls made to alarm functions.

ArcFindCalls/sec

Rate of calls made to the PI Archive Subsystem for finding values.

ArcSummaryCalls/sec

Rate of calls made to the PI Archive Subsystem for summarized values.

ArcValueCalls/sec

Rate of calls made to the PI Archive Subsystem for compressed events.

FailedEvaluations/sec

Rate of PE evaluations that return the digital state Calc Failed.

NumberOfPEs

Number of Performance Equations.

SnapshotCalls/sec

Rate of calls made to the PI Snapshot Subsystem to obtain snapshot event(s).

SnapshotEvents/sec

Rate of snapshot event retrieval.

SteamFuncCalls/sec

Rate of calls made to steam functions.

TotalEvaluations/sec

Rate of PE evaluations.

PI Server Reference Guide

137

PI Performance Counters

PI Server LocalHost Statistics The piperfmon.dif file contains examples of some basic performance counters useful in monitoring PI Server. These points contain performance information about the PI Server as well as the machine that runs it. The performance counters for the machine are useful in determining resource problems of the machine that runs PI Server. The performance counters for the PI Server are useful in determining how well the PI Server is performing. PI Performance Counters

138

Tag

Explain Text

PERF.LOCALHOST.Logical Disk(_Total).Free Megabytes

Free Megabytes displays the unallocated space on the disk drive in MB. One MB = 1,048,576 bytes.

PERF.LOCALHOST.Memory .% Committed Bytes In Use

% Committed Bytes In Use is the ratio of Memory: Committed Bytes to Memory: Commit Limit. (Committed memory is physical memory in use for which space has been reserved in the paging file should it need to be written to disk. The commit limit is determined by the size of the paging file. If the paging file is enlarged, the commit limit increases, and the ratio is reduced). This counter displays the current percentage value only; it is not an average.

PERF.LOCALHOST.Memory .Page Faults/sec

Page Faults/sec is the overall rate that faulted pages are handled by the processor. It is measured in numbers of pages faulted per second. A page fault occurs when a process requires code or data that is not in its working set (its space in physical memory). This counter includes both hard faults (those that require disk access) and soft faults (where the faulted page is found elsewhere in physical memory). Most processors can handle large numbers of soft faults without consequence. However, hard faults can cause significant delays. This counter displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.

PERF.LOCALHOST.PICollec tive Statistics

Is the status normal for all members of the collective?

PERF.LOCALHOST.Physical Disk.Avg

Disk Write Queue Length Avg. Disk Write Queue Length is the average number of write requests that were queued for the selected disk during the sample interval. Any number above 1.0 for a sustained period of time indicates that the disk is becoming a performance bottleneck.

PERF.LOCALHOST.Process or(0).% Processor Time

% Processor Time is the percentage of time that the processor is executing a non-Idle thread. This counter was designed as a primary indicator of processor activity. It is calculated by measuring the time that the processor spends executing the thread of the Idle process in each sample interval, and subtracting that value from 100%. (Each processor has an Idle thread, which consumes cycles when no other threads are ready to run). It can be viewed as the percentage of the sample interval spent doing useful work. This counter displays the average percentage of busy time observed during the sample interval. It is calculated by monitoring the time the service was inactive, and then subtracting that value from 100%.

PERF.LOCALHOST.TCP.Se gments Retransmitted/sec

Segments Retransmitted/sec is the rate at which segments are retransmitted, that is, segments transmitted containing one or more previously transmitted bytes.

PI Server LocalHost Statistics

Tag

Explain Text

PERF.LOCALHOST.TCP.Se gments Sent/sec

Segments Sent/sec is the rate at which segments are sent, including those on current connections, but excluding those containing only retransmitted bytes.

PERF.LOCALHOST.Process (piarchss).% Processor Time PERF.LOCALHOST.Process (pibasess).% Processor Time PERF.LOCALHOST.Process (pinetmgr).% Processor Time PERF.LOCALHOST.Process (pisnapss).% Processor Time

% Processor Time is the percentage of elapsed time that all of the threads of this process used the processor to execute instructions. An instruction is the basic unit of execution in a computer, a thread is the object that executes instructions, and a process is the object created when a program is run. Code executed to handle some hardware interrupts and trap conditions are included in this count. On Multi-processor machines the maximum value of the counter is 100 % times the number of processors.

PERF.LOCALHOST.PI Archive.Read Events operations/sec

Rate of archive events read.

PERF.LOCALHOST.PI Archive.Cache Record Disk Reads/sec

Archive cache disk reads.

PERF.LOCALHOST.PI Archive.Cache Record Memory Reads/sec

Archive cache memory hits.

PERF.LOCALHOST.PI Base Subsystem.Point Count

Total number of defined points. This number includes the Connector Point Count.

PERF.LOCALHOST.PI Network Manager(_Total).Connection s

The number of connections to the PI Network Manager. This counter only applies to instance _Total.

PERF.LOCALHOST.PI Network Manager(_Total).Messages Sent/sec PERF.LOCALHOST.PI Network Manager(piarchss).Message s Sent/sec PERF.LOCALHOST.PI Network Manager(pibasess).Message s Sent/sec PERF.LOCALHOST.PI Network Manager(pisnapss).Message s Sent/sec

The number of messages sent to the PI Network Manager.

PERF.LOCALHOST.PI Snapshot.OutOfOrderSnapsh ots/sec

Out of order events sent to the snapshot.

PERF.LOCALHOST.PI Snapshot.Queued Events/sec

Events sent to Event Queue.

PERF.LOCALHOST.PI Snapshot.Snapshots/sec

Events sent to the snapshot.

PI Server Reference Guide

139

PI Performance Counters

Tag

Explain Text

PERF.LOCALHOST.PI Update-Manager.Pending events

Total Events pending in the PI Update Manager database.

PERF.LOCALHOST.CALCU LATED.PI Compression Ratio

PI Compression Ratio is a performance equation that calculates amount of data that is compressed.

PERF.LOCALHOST.CALCU LATED.PI Archive.Cache Hit Rate

PI Archive.Cache Hit Rate is a performance equation that measures the rate at which data is accessed from memory as opposed to disk.

PI Server Statistics Attribute

Description

Is Communicting

Is the server communicating to the other members of the collective?

Is In Sync

Is the server in sync with the other members of the collective?

Is Available

Is the server available?

Is Current Server

Is the server the member of the collective sending this information?

Last Sync Record ID

Last sync record processed

Role

The role this server plays in a collective

Sync Records/sec

Sync records processed/sec

Communication Period

The frequency the server is configured to communicate with the collective

Sync Period

The frequency this server is configured to sync with the collective

Last Communication Time

Last time the server communicated with the collective

Last Sync Time

Last time the server synchronized with the collective

Server Index

The index of the server in the list of members of the collective

PI Session Statistics

140

Attribute

Description

Messages Sent/sec

The number of messages sent by the PI session.

Messages Received/sec

The number of messages received by the PI session.

Bytes Sent/sec

The number of bytes sent by the PI session.

Bytes Received/sec

The number of bytes received by the PI session.

Receive Errors

The number of times an error occurs during a receive a message by the PI session.

Send Errors

The number of times an error occurs during a send of a message by the PI session.

PI Snapshot Subsystem Statistics

PI Snapshot Subsystem Statistics Attribute

Description

Snapshots/sec

Rate at which events are sent to the snapshot.

OutOfOrderSnapshots/sec

Rate at which out-of-order events are sent to the snapshot.

Queued Events/sec

Rate at which events are sent to the Event Queue.

GetSnapshots/sec

Rate at which events are read from the snapshot.

GetSnapshot Calls/sec

Rate of individual snapshot value calls.

GetSnapshots Calls/sec

Rate of multiple snapshot values calls.

Remove Snapshots/sec

Rate of snapshot values being deleted.

Digital State Translations/sec

Rate of digital strings translated into offsets.

Connector Snapshots/sec

Rate at which events are sent to mapped points through COM Connectors. This rate is NOT included in the Snapshots/sec counter.

Connector GetSnapshots/sec

Rate at which events are read from mapped points through COM Connectors. This rate is NOT included in the GetSnapshots/sec counter.

Connector Updates/sec

Update events received from COM Connectors. This rate is NOT included in the Connector GetSnapshots/sec counter.

Connector Snapshot Put Elapsed Time

Time elapsed in milliseconds for Snapshot Put for COM Connector a point.

Connector Snapshot Read Elapsed Time

Time elapsed in milliseconds for Snapshot Read for a COM Connector point.

Connector Updates Elapsed Time

Time elapsed in milliseconds for Updates for COM Connector points.

Events in Primary Queue

Number of events in the primary queue file.

Number of Overflow Queues

Number of overflow queue files (0 if only the primary queue is active).

Events in Overflow Queues

Total of events in the overflow queue files.

Estimated Remaining Capacity

Estimated maximum number of events with current queue file.

Event Queue Total Pages

Number of data pages in primary queue file.

Event Queue Used Pages

Number of full data pages in primary queue file.

Event Queue Page Shifts/sec

Rate of data page shifts in primary queue file.

Primary Event Queue Id

Identification number of primary queue (0 to 65,535).

PI SQL Subsystem Statistics Attribute

Description

Callbacks/sec

Rate of calls to PI-SQL execution callback routine.

PI Server Reference Guide

141

PI Performance Counters

Attribute

Description

ArcValueCompCalls/sec

Rate of RPC calls made to the PI Archive Subsystem for compressed events.

ArcValueCompEvents/sec

Rate at which compressed data events are returned by the PI Archive Subsystem.

WildcardSearches/sec

Rate at which new wildcard searches are initiated in the PI Point Database.

WildcardPoints/sec

Rate at which points are returned when performing wildcard searches of the PI Point Database.

ArcValueCalls/sec

Rate of RPC calls made to the PI Archive Subsystem to obtain a single archived value.

SnapshotCalls/sec

Rate of RPC calls made to the PI Snapshot Subsystem to obtain a single snapshot value.

WHERE Clause Evaluations/sec

Rate of full evaluations of the WHERE clause of a SELECT statement.

ArcValueTimedCalls/sec

Rate of RPC calls made to the PI Archive Subsystem for interpolated or timed events.

ArcValueTimedEvents/sec

Rate at which interpolated or timed data events are returned by the PI Archive Subsystem.

SummaryArcValueCalls/se c

Rate of RPC calls made to the PI Archive Subsystem for summarized values (such as average, total, and standard deviation).

Dot Variable Evaluations/sec

Rate of "dot" variable evaluations made within the PI SQL Library. A dot variable in SQL is a table alias and column name, such as "picomp.tag.” This rate is a measure of PI SQL Subsystem processing not related to obtaining data from other subsystems.

Next Point With Source Calls/sec

Rate at which points are returned by the PI Base Subsystem in searches for points with a specific PointSource attribute.

PostCalls/sec

Rate of RPC calls made to the PI Snapshot Subsystem to post events from execution of SQL INSERT or UPDATE statements.

PostEvents/sec

Rate at which data events are posted to the PI Snapshot Subsystem from execution of SQL INSERT or UPDATE statements.

Handles

Number of PI SQL handles currently allocated in the PI SQL Subsystem. This is an indication of how many clients are actively processing SQL statements.

PI Subsystem Statistics

142

Attribute

Description

Message Queue Length

Number of incoming messages in queue.

Pending Transactions

Number of pending transactions.

Actual Pending Transactions

Only for internal debugging purpose. You should use it only under the suggestion of OSIsoft Technical Support.

Message Pickup Time

Latency of incoming messages (time in message queue).

Message Execution Time

Execution time of incoming message (RPC).

PI Subsystem Statistics

Attribute

Description

Message Complete Time

Total message handling time (including results sending).

Callback Execution Time

Execution time of transaction callback.

Transaction Completed/sec

Number of transactions completed per second.

Transaction Cancelled/sec

Number of transactions cancelled per second.

Transaction Avg Time

Average execution time of outgoing transactions.

Transaction Max Time

Maximum execution time of outgoing transactions.

Lock Acquisitions/sec

Number of successful lock acquisitions per second

Lock Timeouts/sec

Number of lock timeouts (failed locks) per second.

Lock Contentions/sec

Number of lock conflicts (threads waiting for the same lock).

RPC Threads Total

Total number of RPC worker threads (query processing).

RPC Threads Active

Number of RPC worker threads processing a query.

File Open

Number of time File base Open called.

File Close

Number of time File base Close called.

File Read/Sec

Rate of File base Read.

File Write/Sec

Rate of File base Write.

File Delete/Sec

Rate of File base Delete.

File Create

Number of time File base Create called.

File Compress

Number of time File base Compress operations.

File Grow

Number of time File Directory grow operations.

Backups Started

Number of backup start operations

Backups Completed

Number of backup complete operations

Backups Aborted

Number of backup abort operations

Backup Freeze Last Duration

Number of milliseconds subsystem was frozen for the last backup

Backup Freeze Last Transition

Number of milliseconds required to put the subsystem into a frozen state for the last backup

Backup Freeze Last Count

Number of freeze operations for the last backup. Multiple freeze operations may be required for non-VSS backups

Backup Freeze Failures

Number of failed freeze operations

Backup Freeze In Progress

If the subsystem is frozen, this counter is set to 1. Otherwise, it is set to 0.

Backup Freeze Max Duration

Maximum milliseconds that subsystem has been frozen for a backup

Backup Freeze Avg Duration

Average milliseconds that subsystem is frozen for backups

PI Server Reference Guide

143

PI Performance Counters

PI Totalizer Subsystem Statistics Attribute

Description

Total Point Count

The total number of active PI Totalizer Subsystem points.

Source Tag Values/sec

Rate of Totalizer input events.

EventExpr/sec

Rate of EventExpr evaluations.

FilterExpr/sec

Rate of FilterExpr evaluations

Filter Changes/sec

Rate of Filter state changes

Period End/sec

Rate of Totalization period completions

Updates/sec

Rate of snapshot values to Totalizer points

Update status

The status of the PI Update Manager as perceived by the PI Totalizer. If non-zero, this is the absolute value of the most recently received error code. If zero, all is well.

PI Update Consumer Statistics Attribute

Description

Pending events

Total Events pending for this consumer.

New events/sec

Event rate for this consumer.

Lost events/sec

Events lost due to the PI Update Manager database being full.

Update sign-ups

Queued sign-ups for this consumer.

Get Events calls/sec

Getevent calls rate.

PI Update Manager Statistics

144

Attribute

Description

Pending events

Total Events pending in the PI Update Manager database.

New events/sec

Events sent to the PI Update Manager.

Lost events/sec

Events lost due to the PI Update Manager database being full.

Update signups

Queued signups in the PI Update Manager.

New registration/sec

Consumer and Producer registration rate.

Consumer count

Total number of registered consumers.

Max pending events

Maximum pending events reached in the PI Update Manager database.

Get Events calls/sec

Total consumers Getevent calls rate.

PI Update Producer Statistics

PI Update Producer Statistics Attribute

Description

Pending events

Total Events pending for this producer.

New events/sec

Event rate for this producer.

Update calls/sec

Rate of incoming update calls

Update sign-ups

Queued sign-ups for this producer.

PI Server Reference Guide

145

Appendix B

PI Messages Reference: Example Messages This chapter discusses the messages that PI writes to its message logs during normal operation. Messages are written to the message log by the PI Message Subsystem. Use the pigetmsg utility in the PI\adm directory to retrieve messages.

Normal Startup Messages The following messages are typical when the PI System is started: PIMessageLog host=adder2k3_32_1 st=2009-09-22T19:01:50-07:00 et=2009-09-22T19:04:50-07:00 I 22-Sep-09 19:01:50 pinetmgr (7061) >> Local listener opened I 22-Sep-09 19:01:50 pinetmgr (7046) >> Starting main control loop. I 22-Sep-09 19:01:52 pinetmgr (7039) >> Connection accepted: Process name: pilogsrv.exe(1692) ID: 0 I 22-Sep-09 19:01:53 pimsgss (6087) >> Starting PI process pimsgss. I 22-Sep-09 19:01:53 pinetmgr (7039) >> Connection accepted: Process name: pimsgss(992) ID: 1 D 22-Sep-09 19:01:53 pinetmgr:Connection Information (7080) >> Connection ID: 1 ; Process name: pimsgss ; User: ; OS User: ; IP: ; AppID: ; AppName: (connecting) I 22-Sep-09 19:01:53 pimsgss (6027) >> PI subsystem pimsgss is now running, version: PI 3.4.380.36 D 22-Sep-09 19:01:53 pimsgss (8020) >> PI Message subsystem starting D 22-Sep-09 19:01:53 pimsgss (6041) >> Rpcservertablelist successfully registered to pinetmgr. D 22-Sep-09 19:01:54 pinetmgr (7075) >> Servertablelist received from ID 1 pimsgss(992). 3 entry(ies): PImsg|1 pimsgss_subsysquery|1 pimsgss_dbsecurity|1 PI Server Reference Guide

147

PI Messages Reference: Example Messages

I 22-Sep-09 19:01:55 pilicmgr (6087) >> Starting PI process pilicmgr. I 22-Sep-09 19:01:55 pinetmgr (7039) >> Connection accepted: Process name: pilicmgr(3668) ID: 2 D 22-Sep-09 19:01:55 pinetmgr:Connection Information (7080) >> Connection ID: 2 ; Process name: pilicmgr ; User: ; OS User: ; IP: ; AppID: ; AppName: (connecting) I 22-Sep-09 19:01:55 pilicmgr (6027) >> PI subsystem pilicmgr is now running, version: PI 3.4.380.36 I 22-Sep-09 19:01:55 pilicmgr (3037) >> License validated for the non-replicated server D 22-Sep-09 19:01:55 pinetmgr (7075) >> Servertablelist received from ID 2 pilicmgr(3668). 3 entry(ies): pilicmgr|1 pilicmgr_subsysquery|1 pilicmgr_dbsecurity|1 D 22-Sep-09 19:01:55 pilicmgr (6041) >> Rpcservertablelist successfully registered to pinetmgr. I 22-Sep-09 19:01:59 pinetmgr (7039) >> Connection accepted: Process name: piartool(3752) ID: 3 I 22-Sep-09 19:02:01 pinetmgr (7039) >> Connection accepted: Process name: piartool(3900) ID: 4 I 22-Sep-09 19:02:03 pinetmgr (7039) >> Connection accepted: Process name: piartool(3720) ID: 5 I 22-Sep-09 19:02:05 piupdmgr (6087) >> Starting PI process piupdmgr. I 22-Sep-09 19:02:05 pinetmgr (7039) >> Connection accepted: Process name: piupdmgr(3100) ID: 6 D 22-Sep-09 19:02:05 pinetmgr:Connection Information (7080) >> Connection ID: 6 ; Process name: piupdmgr ; User: ; OS User: ; IP: ; AppID: ; AppName: (connecting) I 22-Sep-09 19:02:05 piupdmgr (6027) >> PI subsystem piupdmgr is now running, version: PI 3.4.380.36 I 22-Sep-09 19:02:05 piupdmgr:adder2k3_32_2 (6003) >> Primary Queue successfully initialized (256MB/16384KB) , (2 events) I 22-Sep-09 19:02:05 piupdmgr:adder2k3_32_2 (6007) >> Primary Queue successfully loaded (2 events) D 22-Sep-09 19:02:05 piupdmgr (6041) >> Rpcservertablelist successfully registered to pinetmgr.

148

Normal Startup Messages

D 22-Sep-09 19:02:05 pinetmgr (7075) >> Servertablelist received from ID 6 piupdmgr(3100). 4 entry(ies): piupdmgr|1 piupdmgr|2 piupdmgr_subsysquery|1 piupdmgr_dbsecurity|1 I 22-Sep-09 19:02:08 pinetmgr (7039) >> Connection accepted: Process name: piartool(3952) ID: 7 I 22-Sep-09 19:02:11 pibasess (6087) >> Starting PI process pibasess. I 22-Sep-09 19:02:11 pinetmgr (7096) >> Deleting connection: piartool(3752), Shutdown request received from piartool(3752), ID: 3 :0 I 22-Sep-09 19:02:11 pinetmgr (7096) >> Deleting connection: piartool(3900), Shutdown request received from piartool(3900), ID: 4 :0 I 22-Sep-09 19:02:11 pinetmgr (7096) >> Deleting connection: piartool(3720), Shutdown request received from piartool(3720), ID: 5 :0 D 22-Sep-09 19:02:11 pinetmgr:Connection Statistics (7133) >> ID: 3; Duration: 3.333334E-002 min.; kbytes sent: 4.244141; kbytes recv: 0.4521484; app: ; user: ; osuser: ; trust: ; ip address: ; ip host: D 22-Sep-09 19:02:11 pinetmgr:Connection Statistics (7133) >> ID: 4; Duration: 1.666667E-002 min.; kbytes sent: 4.244141; kbytes recv: 0.4521484; app: ; user: ; osuser: ; trust: ; ip address: ; ip host: D 22-Sep-09 19:02:11 pinetmgr:Connection Statistics (7133) >> ID: 5; Duration: 1.666667E-002 min.; kbytes sent: 4.380859; kbytes recv: 0.7246094; app: ; user: ; osuser: ; trust: ; ip address: ; ip host: D 22-Sep-09 19:02:11 pinetmgr:Connection Information (7079) >> Connection ID: 3 ; Process name: piartool ; User: ; OS User: ; IP: ; AppID: ; AppName: (disconnecting) D 22-Sep-09 19:02:11 pinetmgr:Connection Information (7079) >> Connection ID: 4 ; Process name: piartool ; User: ; OS User: ; IP: ; AppID: ; AppName: (disconnecting) D 22-Sep-09 19:02:11 pinetmgr:Connection Information (7079) >> Connection ID: 5 ; Process name: piartool ; User: ; OS User: ; IP: ; AppID: ; AppName: (disconnecting) I 22-Sep-09 19:02:11 pinetmgr (7096) >> Deleting connection: piartool(3952), Shutdown request received from piartool(3952), ID: 7 :0 D 22-Sep-09 19:02:11 pinetmgr:Connection Statistics (7133) PI Server Reference Guide

149

PI Messages Reference: Example Messages

>> ID: 7; Duration: 3.333334E-002 min.; kbytes sent: 8.134766; kbytes recv: 0.7236328; app: ; user: ; osuser: ; trust: ; ip address: ; ip host: D 22-Sep-09 19:02:11 pinetmgr:Connection Information (7079) >> Connection ID: 7 ; Process name: piartool ; User: ; OS User: ; IP: ; AppID: ; AppName: (disconnecting) I 22-Sep-09 19:02:11 pinetmgr (7039) >> Connection accepted: Process name: pibasess(3764) ID: 8 D 22-Sep-09 19:02:11 pinetmgr:Connection Information (7080) >> Connection ID: 8 ; Process name: pibasess ; User: ; OS User: ; IP: ; AppID: ; AppName: (connecting) I 22-Sep-09 19:02:11 pibasess (6027) >> PI subsystem pibasess is now running, version: PI 3.4.380.36 I 22-Sep-09 19:02:11 pibasess:Acl Table (6074) >> This table will not automatically generate a standard message for each write operation (e.g. create, edit, delete, rename, etc.) I 22-Sep-09 19:02:11 pibasess:Server Table (6074) >> This table will not automatically generate a standard message for each write operation (e.g. create, edit, delete, rename, etc.) I 22-Sep-09 19:02:11 pibasess:Collective Table (6074) >> This table will not automatically generate a standard message for each write operation (e.g. create, edit, delete, rename, etc.) I 22-Sep-09 19:02:12 pibasess:AuthInfo Table (6074) >> This table will not automatically generate a standard message for each write operation (e.g. create, edit, delete, rename, etc.) I 22-Sep-09 19:02:12 pibasess:Module Table (6074) >> This table will not automatically generate a standard message for each write operation (e.g. create, edit, delete, rename, etc.) I 22-Sep-09 19:02:12 pibasess:pirepl (1019) >> Server adder2k3_32_1 is offline, reason: Starting up D 22-Sep-09 19:02:12 pibasess (6041) >> Rpcservertablelist successfully registered to pinetmgr. D 22-Sep-09 19:02:12 pinetmgr (7075) >> Servertablelist received from ID 8 pibasess(3764). 6 entry(ies): piptss|1 piusss|1 piptsdk|1 PIModuleDbSDK|1 pibasess_subsysquery|1 pibasess_dbsecurity|1 I 22-Sep-09 19:02:14 pinetmgr (7039) >> Connection accepted: Process name: piartool(1880) ID: 9 I 22-Sep-09 19:02:16 pisnapss (6087) >> Starting PI process pisnapss. I 22-Sep-09 19:02:16 pinetmgr (7039) 150

Normal Startup Messages

>> Connection accepted: Process name: pisnapss(1752) ID: 10 D 22-Sep-09 19:02:16 pinetmgr:Connection Information (7080) >> Connection ID: 10 ; Process name: pisnapss ; User: ; OS User: ; IP: ; AppID: ; AppName: (connecting) I 22-Sep-09 19:02:16 pisnapss (6027) >> PI subsystem pisnapss is now running, version: PI 3.4.380.36 I 22-Sep-09 19:02:16 pisnapss:pisnapmgr (2121) >> Snapshot records loaded, count: 14, found: 14 (bfs: 0), status: [0] Success I 22-Sep-09 19:02:16 pisnapss:pievqwriter (6003) >> Primary Queue successfully initialized (128MB/1024KB) I 22-Sep-09 19:02:16 pisnapss:pisnapmgr (2127) >> PIsnapmgr::loadsnaptables: loaded: C:\Program Files\PI\dat\piarcmem.dat, status: [0] Success D 22-Sep-09 19:02:16 pisnapss (6000) >> Digital State table synchronized with Base Subsystem D 22-Sep-09 19:02:16 pisnapss (6041) >> Rpcservertablelist successfully registered to pinetmgr. D 22-Sep-09 19:02:16 pinetmgr (7075) >> Servertablelist received from ID 10 pisnapss(1752). 3 entry(ies): pisnapss|1 pisnapss_subsysquery|1 pisnapss_dbsecurity|1 I 22-Sep-09 19:02:19 pinetmgr (7039) >> Connection accepted: Process name: piartool(2156) ID: 11 I 22-Sep-09 19:02:21 piarchss (6087) >> Starting PI process piarchss. I 22-Sep-09 19:02:21 pinetmgr (7039) >> Connection accepted: Process name: piarchss(2036) ID: 12 D 22-Sep-09 19:02:21 pinetmgr:Connection Information (7080) >> Connection ID: 12 ; Process name: piarchss ; User: ; OS User: ; IP: ; AppID: ; AppName: (connecting) I 22-Sep-09 19:02:21 piarchss (6027) >> PI subsystem piarchss is now running, version: PI 3.4.380.36 I 22-Sep-09 19:02:21 pinetmgr (7096) >> Deleting connection: piartool(1880), Shutdown request received from piartool(1880), ID: 9 :0 I 22-Sep-09 19:02:21 pinetmgr (7096) >> Deleting connection: piartool(2156), Shutdown request received from piartool(2156), ID: 11 :0 D 22-Sep-09 19:02:21 pinetmgr:Connection Statistics (7133) PI Server Reference Guide

151

PI Messages Reference: Example Messages

>> ID: 9; Duration: 1.666667E-002 min.; kbytes sent: 23.59961; kbytes recv: 0.7265625; app: ; user: ; osuser: ; trust: ; ip address: ; ip host: D 22-Sep-09 19:02:21 pinetmgr:Connection Statistics (7133) >> ID: 11; Duration: 1.666667E-002 min.; kbytes sent: 26.7832; kbytes recv: 0.7265625; app: ; user: ; osuser: ; trust: ; ip address: ; ip host: D 22-Sep-09 19:02:21 pinetmgr:Connection Information (7079) >> Connection ID: 9 ; Process name: piartool ; User: ; OS User: ; IP: ; AppID: ; AppName: (disconnecting) D 22-Sep-09 19:02:21 pinetmgr:Connection Information (7079) >> Connection ID: 11 ; Process name: piartool ; User: ; OS User: ; IP: ; AppID: ; AppName: (disconnecting) I 22-Sep-09 19:02:22 piarchss:piarcmgr (2074) >> Primary archive file C:\Program Files\PI\dat\piarch.001 loaded. D 22-Sep-09 19:02:23 piarchss (6000) >> Digital State table synchronized with Base Subsystem I 22-Sep-09 19:02:23 piarchss:pievqreader (6007) >> Primary Queue successfully loaded (0 events) I 22-Sep-09 19:02:23 piarchss:piarcmgr (2035) >> Cache Manager: cache pool set to 42944 records, maximum unflushed events per point is 224. I 22-Sep-09 19:02:23 piarchss:piarcmgr (2036) >> Automatic conversion of fixed to dynamic archives is enabled I 22-Sep-09 19:02:23 piarchss:piarcmgr (2182) >> Maximum query execution time is unlimited (Archive_MaxQueryExecutionSec) D 22-Sep-09 19:02:23 pinetmgr (7075) >> Servertablelist received from ID 12 piarchss(2036). 5 entry(ies): piarss|1 piarss2|1 piarbatch|1 piarchss_subsysquery|1 piarchss_dbsecurity|1 D 22-Sep-09 19:02:23 piarchss (6041) >> Rpcservertablelist successfully registered to pinetmgr. I 22-Sep-09 19:02:24 pinetmgr (7039) >> Connection accepted: Process name: piartool(692) ID: 13 I 22-Sep-09 19:02:26 pibackup (6087) >> Starting PI process pibackup. I 22-Sep-09 19:02:26 pinetmgr (7039) >> Connection accepted: Process name: pibackup(2884) ID: 14 D 22-Sep-09 19:02:26 pinetmgr:Connection Information (7080)

152

Normal Startup Messages

>> Connection ID: 14 ; Process name: pibackup ; User: ; OS User: ; IP: ; AppID: ; AppName: (connecting) I 22-Sep-09 19:02:26 pibackup (6027) >> PI subsystem pibackup is now running, version: PI 3.4.380.36 D 22-Sep-09 19:02:26 pibackup (5046) >> Successfully loaded data from C:\Program Files\PI\dat\pibackuphistory.dat D 22-Sep-09 19:02:27 pinetmgr (7075) >> Servertablelist received from ID 14 pibackup(2884). 3 entry(ies): pibackup|1 pibackup_subsysquery|1 pibackup_dbsecurity|1 D 22-Sep-09 19:02:27 pibackup (6041) >> Rpcservertablelist successfully registered to pinetmgr. I 22-Sep-09 19:02:29 pinetmgr (7039) >> Connection accepted: Process name: piartool(2128) ID: 15 I 22-Sep-09 19:02:30 pibasess:pirepl (1018) >> Server adder2k3_32_1 is online. I 22-Sep-09 19:02:30 pinetmgr (7010) >> TCP/IP (IPV4) connection listener opened on port: 5450 I 22-Sep-09 19:02:30 pinetmgr (7039) >> Connection accepted: Process name: piartool(4000) ID: 16 I 22-Sep-09 19:02:32 pinetmgr (7096) >> Deleting connection: piartool(692), Shutdown request received from piartool(692), ID: 13 :0 I 22-Sep-09 19:02:32 pinetmgr (7096) >> Deleting connection: piartool(2128), Shutdown request received from piartool(2128), ID: 15 :0 I 22-Sep-09 19:02:32 pinetmgr (7096) >> Deleting connection: piartool(4000), Shutdown request received from piartool(4000), ID: 16 :0 D 22-Sep-09 19:02:32 pinetmgr:Connection Statistics (7133) >> ID: 13; Duration: 1.666667E-002 min.; kbytes sent: 35.38477; kbytes recv: 0.7285156; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host: D 22-Sep-09 19:02:32 pinetmgr:Connection Statistics (7133) >> ID: 15; Duration: 1.666667E-002 min.; kbytes sent: 36.51172; kbytes recv: 0.7275391; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host: D 22-Sep-09 19:02:32 pinetmgr:Connection Statistics (7133) >> ID: 16; Duration: 3.333334E-002 min.; kbytes sent: 36.37305; kbytes recv: 0.453125; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host: PI Server Reference Guide

153

PI Messages Reference: Example Messages

D 22-Sep-09 19:02:32 pinetmgr:Connection Information (7079) >> Connection ID: 13 ; Process name: piartool ; User: ; OS User: ; IP: ; AppID: 0 ; AppName: piartool (disconnecting) D 22-Sep-09 19:02:32 pinetmgr:Connection Information (7079) >> Connection ID: 15 ; Process name: piartool ; User: ; OS User: ; IP: ; AppID: 0 ; AppName: piartool (disconnecting) D 22-Sep-09 19:02:32 pinetmgr:Connection Information (7079) >> Connection ID: 16 ; Process name: piartool ; User: ; OS User: ; IP: ; AppID: 0 ; AppName: piartool (disconnecting) I 22-Sep-09 19:02:32 pinetmgr (7039) >> Connection accepted: Process name: piartool(2416) ID: 17 D 22-Sep-09 19:02:32 pibackup (5094) >> Successfully registered subsystem pimsgss, version 3.4.380.36 D 22-Sep-09 19:02:32 pibackup (5094) >> Successfully registered subsystem pilicmgr, version 3.4.380.36 D 22-Sep-09 19:02:33 pibackup (5094) >> Successfully registered subsystem pibasess, version 3.4.380.36 D 22-Sep-09 19:02:33 pibackup (5094) >> Successfully registered subsystem pisnapss, version 3.4.380.36 D 22-Sep-09 19:02:33 pibackup (5094) >> Successfully registered subsystem piarchss, version 3.4.380.36 I 22-Sep-09 19:02:34 pinetmgr (7039) >> Connection accepted: Process name: piartool(2196) ID: 18 I 22-Sep-09 19:02:35 pinetmgr (7039) >> Connection accepted: Process name: piartool(612) ID: 19 I 22-Sep-09 19:02:37 pinetmgr (7039) >> Connection accepted: Process name: piartool(2892) ID: 20 I 22-Sep-09 19:02:39 pinetmgr (7039) >> Connection accepted: Process name: piartool(1684) ID: 21 I 22-Sep-09 19:02:41 pinetmgr (7039) >> Connection accepted: Process name: piartool(3036) ID: 22 I 22-Sep-09 19:02:42 pinetmgr (7039) >> Connection accepted: Process name: piartool(460) ID: 23 I 22-Sep-09 19:02:42 pinetmgr (7096) >> Deleting connection: piartool(2416), Shutdown request received from piartool(2416), ID: 17 :0 I 22-Sep-09 19:02:42 pinetmgr (7096) >> Deleting connection: piartool(2196), Shutdown request received from piartool(2196), ID: 18 :0 154

Normal Startup Messages

I 22-Sep-09 19:02:42 pinetmgr (7096) >> Deleting connection: piartool(612), Shutdown request received from piartool(612), ID: 19 :0 I 22-Sep-09 19:02:42 pinetmgr (7096) >> Deleting connection: piartool(2892), Shutdown request received from piartool(2892), ID: 20 :0 I 22-Sep-09 19:02:42 pinetmgr (7096) >> Deleting connection: piartool(1684), Shutdown request received from piartool(1684), ID: 21 :0 I 22-Sep-09 19:02:42 pinetmgr (7096) >> Deleting connection: piartool(3036), Shutdown request received from piartool(3036), ID: 22 :0 D 22-Sep-09 19:02:42 pinetmgr:Connection Statistics (7133) >> ID: 17; Duration: 1.666667E-002 min.; kbytes sent: 36.51074; kbytes recv: 0.7265625; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host: D 22-Sep-09 19:02:42 pinetmgr:Connection Statistics (7133) >> ID: 18; Duration: 1.666667E-002 min.; kbytes sent: 36.37402; kbytes recv: 0.4541016; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host: D 22-Sep-09 19:02:42 pinetmgr:Connection Statistics (7133) >> ID: 19; Duration: 3.333334E-002 min.; kbytes sent: 36.51172; kbytes recv: 0.7285156; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host: D 22-Sep-09 19:02:42 pinetmgr:Connection Statistics (7133) >> ID: 20; Duration: 1.666667E-002 min.; kbytes sent: 36.37305; kbytes recv: 0.453125; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host: D 22-Sep-09 19:02:42 pinetmgr:Connection Statistics (7133) >> ID: 21; Duration: 1.666667E-002 min.; kbytes sent: 36.5127; kbytes recv: 0.7294922; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host: D 22-Sep-09 19:02:42 pinetmgr:Connection Statistics (7133) >> ID: 22; Duration: 3.333334E-002 min.; kbytes sent: 36.37402; kbytes recv: 0.4541016; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host: D 22-Sep-09 19:02:42 pinetmgr:Connection Information (7079) >> Connection ID: 17 ; Process name: piartool ; User: ; OS User: ; IP: ; AppID: 0 ; AppName: piartool (disconnecting) D 22-Sep-09 19:02:42 pinetmgr:Connection Information (7079) >> Connection ID: 18 ; Process name: piartool ; User: ; OS User: ; IP: ; AppID: 0 ; AppName: piartool (disconnecting) D 22-Sep-09 19:02:42 pinetmgr:Connection Information (7079) PI Server Reference Guide

155

PI Messages Reference: Example Messages

>> Connection ID: 19 ; Process name: piartool ; User: ; OS User: ; IP: ; AppID: 0 ; AppName: piartool (disconnecting) D 22-Sep-09 19:02:42 pinetmgr:Connection Information (7079) >> Connection ID: 20 ; Process name: piartool ; User: ; OS User: ; IP: ; AppID: 0 ; AppName: piartool (disconnecting) D 22-Sep-09 19:02:42 pinetmgr:Connection Information (7079) >> Connection ID: 21 ; Process name: piartool ; User: ; OS User: ; IP: ; AppID: 0 ; AppName: piartool (disconnecting) D 22-Sep-09 19:02:42 pinetmgr:Connection Information (7079) >> Connection ID: 22 ; Process name: piartool ; User: ; OS User: ; IP: ; AppID: 0 ; AppName: piartool (disconnecting) I 22-Sep-09 19:02:44 pinetmgr (7039) >> Connection accepted: Process name: piartool(2896) ID: 24 I 22-Sep-09 19:02:46 pinetmgr (7039) >> Connection accepted: Process name: piartool(4072) ID: 25 I 22-Sep-09 19:02:46 pinetmgr (7020) >> Opening the server for incoming connections: I 22-Sep-09 19:02:53 pinetmgr (7096) >> Deleting connection: piartool(460), Shutdown request received from piartool(460), ID: 23 :0 I 22-Sep-09 19:02:53 pinetmgr (7096) >> Deleting connection: piartool(2896), Shutdown request received from piartool(2896), ID: 24 :0 I 22-Sep-09 19:02:53 pinetmgr (7096) >> Deleting connection: piartool(4072), Shutdown request received from piartool(4072), ID: 25 :0 D 22-Sep-09 19:02:53 pinetmgr:Connection Statistics (7133) >> ID: 23; Duration: 1.666667E-002 min.; kbytes sent: 36.50879; kbytes recv: 0.7246094; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host: D 22-Sep-09 19:02:53 pinetmgr:Connection Statistics (7133) >> ID: 24; Duration: 1.666667E-002 min.; kbytes sent: 36.375; kbytes recv: 0.4550781; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host: D 22-Sep-09 19:02:53 pinetmgr:Connection Statistics (7133) >> ID: 25; Duration: 1.666667E-002 min.; kbytes sent: 36.50586; kbytes recv: 0.5263672; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host: D 22-Sep-09 19:02:53 pinetmgr:Connection Information (7079) >> Connection ID: 23 ; Process name: piartool ; User: ; OS User: ; IP: ; AppID: 0 ; AppName: piartool (disconnecting) D 22-Sep-09 19:02:53 pinetmgr:Connection Information (7079) 156

Client Connection Messages

>> Connection ID: 24 ; Process name: piartool ; User: ; IP: ; AppID: 0 ; AppName: piartool (disconnecting) D 22-Sep-09 19:02:53 pinetmgr:Connection Information (7079) >> Connection ID: 25 ; Process name: piartool ; User: ; IP: ; AppID: 0 ; AppName: piartool (disconnecting)

; OS User:

; OS User:

Client Connection Messages The PI Network Manager (pinetmgr) writes messages to the PI System message log that track communications between PI clients and the PI Server. The following message from pinetmgr indicates that a client is attempting to connect to PI Server. Note that a connection ID (cnxn ID) is assigned. D 22-Sep-09 21:41:33 pinetmgr (7004) >> PInet accepted TCP/IP connection, cnxn ID 31 Hostname: , 192.168.5.137: 1269 A PI SDK-based client will first publish it's name. In this example the client name is AboutPI-SDK.exe I 22-Sep-09 21:41:33 pinetmgr (7039) >> Connection accepted: Process name: AboutPI-SDK.exe(4372):remote(4372) ID: 31

The PI server will then attempt to authenticate the client. That is, the client will pass in certain credentials and the PI server will accept or reject these credentials. In this example the client successfully connects via Windows authentication: I 22-Sep-09 21:41:33 pinetmgr (7082) >> Successful login ID: 31. Address: 192.168.5.137. Name: AboutPI-SDK.exe(4372):remote. Identity List: piadmins | PIWorld. Environment Username : OSI\ssortland. Method: Windows Login (SSPI,Kerberos)

If the client is unable to connect via one method, it may try another. Here it fails to connect via Windows authentication but is able to connect via trust. I 22-Sep-09 22:38:27 pinetmgr (7138) >> Unsuccessful login ID: 35. Address: 192.168.5.137. Name: AboutPI-SDK.exe(43 72):remote. Credentials used: OSI\ssortland. Method: Windows Login (SSPI,Kerbero s). Error: [-10433] No identity mapping for this request I 22-Sep-09 22:38:27 pinetmgr (7076) >> Successful login ID: 35. Address: 192.168.5.137. Host: . Name: AboutPI-SDK.e xe(4372):remote. User: piadmin. OSUser: . Trust: addertrust

The Server administrator has the option to disable certain authentication methods. In this example Explicit logins have been disabled. The message will look like this:

PI Server Reference Guide

157

PI Messages Reference: Example Messages

I 23-Sep-09 12:52:35 pinetmgr (7138) >> Unsuccessful login ID: 44. Address: 192.168.5.137. Name: AboutPI-SDK.exe(50 48):remote. Credentials used: piadmin. Method: Explicit Login. Error: [-10431] A uthentication method is disabled by current server policy If the server is unable to authenticate a PI SDK-based client, it will be forceably disconnected. I 22-Sep-09 22:25:03 pinetmgr (7096) >> Deleting connection: AboutPI-SDK.exe(4372):remote(4372), Shutdown request r eceived from AboutPI-SDK.exe(4372):remote(4372), ID: 31 192.168.5.137:1269

PI API-based applications have a different set of connection establishment messages. All PI API based client connection messages begin with "New Pinet 1 connection". First the Pinet 1 protocol is printed: D 22-Sep-09 21:04:01 pinetmgr (7051) >> New Pinet 1 connection: RandE Protocol: 00010008

The PI Server then attempts to use the credentials of the incoming connection to locate a record in the PItrust database. If a match is found, the following message is written (Note: For PI API-based clients the published application name is truncated. The name is a five-character name: 4 characters plus a capital "E". In this example, the client name is RandE): I 22-Sep-09 21:04:01 pinetmgr (7053) >> New Pinet 1 connection: RandE Successful Trust-Relation login: adder2k3_32_1.osisoft.int|127.0.0.1|RandE piadmin. If a match is not found, the messages are: I 22-Sep-09 21:53:40 pinetmgr (7054) >> New Pinet 1 connection: RandE No Trust established for: adder.osisoft.int|19 2.168.5.137|RandE. Explicit login is required for access. I 22-Sep-09 21:53:42 pinetmgr (7077) >> Access Denied: [-10413] No trust relation for this request ID: 32. Address : 192.168.5.137. Host: . Name: RandE. User: . OSUser: . Trust:

Subsystem Connection Messages pinetmgr writes messages to the PI System message log that track communications between utilities and the subsystems. New connections requested by one of the PI subsystems are assigned a connection ID: 0 pinetmgr 27-Oct-05 16:23:25 >> Connection accepted: Process name: piupdmgr(3184) ID: 5

158

Disconnect Messages

The subsystem begins its own initialization. On Windows, part of this process involves updating the subsystem's own working set size limits: 0 piupdmgr 27-Oct-05 16:23:25 >> Starting PI process piupdmgr. 0 piupdmgr 27-Oct-05 16:23:27 >> PI subsystem piupdmgr is now running, version: PI 3.4.370.52

The above messages may be following by subsystem-specific initialization messages. When initialization is complete, the subsystem tells pinetmgr which Remote Procedure Calls (RPCs) it supports. This is indicated in the following message: 0 pinetmgr 27-Oct-05 16:23:26 >> Servertablelist received from: piupdmgr(3184). 4 entries: piupdmgr|1 piupdmgr|2 piupdmgr_subsysquery|1 piupdmgr_dbsecurity|1

When pinetmgr receives notification of new RPCs, it updates the master list, and then sends the updated list to all PI subsystems. When a subsystem receives this updated master RPC list, it writes the following message. At this point, the subsystem is ready to process remote procedure calls: 0 piupdmgr 27-Oct-05 16:23:27 >> Rpcservertablelist successfully registered to pinetmgr.

If pinetmgr is unable to send the updated list to the new subsystem, it writes a message as follows: 0 pinetmgr 27-Oct-05 16:32:22 >> Error sending client table(2) to: piupdmgr

A successfully connected subsystem may write messages indicating its initialization progress. In general, there is no message written when initialization is complete and the subsystem is ready to process RPC calls.

Disconnect Messages pinetmgr writes messages to the PI System message log that track communications between PI clients and the PI Server. The following message from pinetmgr indicates that a client is attempting to connect to PI Server. Note that a connection ID (cnxn ID) is assigned. D 22-Sep-09 21:41:33 pinetmgr (7004) >> PInet accepted TCP/IP connection, cnxn ID 31 Hostname: , 192.168.5.137: 1269 A PI SDK-based client will first publish it's name. In this example the client name is AboutPI-SDK.exe I 22-Sep-09 21:41:33 pinetmgr (7039) >> Connection accepted: Process name: AboutPI-SDK.exe(4372):remote(4372) ID: 31

The PI server will then attempt to authenticate the client. That is, the client will pass in certain credentials and the PI server will accept or reject these credentials. In this example the client successfully connects via Windows authentication: PI Server Reference Guide

159

PI Messages Reference: Example Messages

I 22-Sep-09 21:41:33 pinetmgr (7082) >> Successful login ID: 31. Address: 192.168.5.137. Name: AboutPI-SDK.exe(4372):remote. Identity List: piadmins | PIWorld. Environment Username : OSI\ssortland. Method: Windows Login (SSPI,Kerberos)

If the client is unable to connect via one method, it may try another. Here it fails to connect via Windows authentication but is able to connect via trust. I 22-Sep-09 22:38:27 pinetmgr (7138) >> Unsuccessful login ID: 35. Address: 192.168.5.137. Name: AboutPI-SDK.exe(43 72):remote. Credentials used: OSI\ssortland. Method: Windows Login (SSPI,Kerbero s). Error: [-10433] No identity mapping for this request I 22-Sep-09 22:38:27 pinetmgr (7076) >> Successful login ID: 35. Address: 192.168.5.137. Host: . Name: AboutPI-SDK.e xe(4372):remote. User: piadmin. OSUser: . Trust: addertrust

The Server administrator has the option to disable certain authentication methods. In this example Explicit logins have been disabled. The message will look like this: I 23-Sep-09 12:52:35 pinetmgr (7138) >> Unsuccessful login ID: 44. Address: 192.168.5.137. Name: AboutPI-SDK.exe(50 48):remote. Credentials used: piadmin. Method: Explicit Login. Error: [-10431] A uthentication method is disabled by current server policy

If the server is unable to authenticate a PI SDK-based client, it will be forceably disconnected. I 22-Sep-09 22:25:03 pinetmgr (7096) >> Deleting connection: AboutPI-SDK.exe(4372):remote(4372), Shutdown request r eceived from AboutPI-SDK.exe(4372):remote(4372), ID: 31 192.168.5.137:1269

PI API-based applications have a different set of connection establishment messages. All PI API based client connection messages begin with "New Pinet 1 connection". First the Pinet 1 protocol is printed: D 22-Sep-09 21:04:01 pinetmgr (7051) >> New Pinet 1 connection: RandE Protocol: 00010008

The PI Server then attempts to use the credentials of the incoming connection to locate a record in the PItrust database. If a match is found, the following message is written (Note: For PI API-based clients the published application name is truncated. The name is a five-character name: 4 characters plus a capital "E". In this example, the client name is RandE):

160

RPC Resolver Messages

I 22-Sep-09 21:04:01 pinetmgr (7053) >> New Pinet 1 connection: RandE Successful Trust-Relation login: adder2k3_32_1.osisoft.int|127.0.0.1|RandE piadmin. If a match is not found, the messages are: I 22-Sep-09 21:53:40 pinetmgr (7054) >> New Pinet 1 connection: RandE No Trust established for: adder.osisoft.int|19 2.168.5.137|RandE. Explicit login is required for access. I 22-Sep-09 21:53:42 pinetmgr (7077) >> Access Denied: [-10413] No trust relation for this request ID: 32. Address : 192.168.5.137. Host: . Name: RandE. User: . OSUser: . Trust:

RPC Resolver Messages Every few minutes, the pinetmgr sends a healthcheck message to each of the PI subsystems. If one doesn't respond within a given amount of time, pinetmgr will report the following message and the subsystem (RPC resolver) is marked off-line. >> Deleting connection: pisnapss, Subsystem Healthcheck failed.

If an RPC is made to a subsystem that is marked off-line, the following message is generated. [-10733] PINET: RPC Resolver is Off-Line

The following message indicates that the first part of a message was retrieved. This contains the message length. The pinetmgr attempted to retrieve the rest of the message but a timeout occurred. >> Deleting connection: pisnapss, Connection lost(1), [-10731] PINET: incomplete message

Dead Process Timed Out The pinetmgr utility keeps track of processes that have signed up for updates. It is possible for a signed-up process to go away without properly unsigning up. If pinetmgr detects this case, it will remove the dead process from its table and report the following message: 0 piupdmgr 19-Feb-97 17:31:15 >> Consumer timed out! removed...

PI Server Reference Guide

161

Appendix C

PI Error Code Reference Negative numbers indicate PI System errors. Positive numbers indicate operating system errors.

Error Codes 1-99, With Messages Code

Code Identifier

Message

0

PI_NORMAL

Success

-1

PI_ERROR

Generic Error or PI 2.x Point Out of Range or Not Defined

-2

PI_ATT_BLANKTAG

Blank tag

-3

PI_ATT_PTDBFULL

Point data base full

-4

PI_ATT_MEMDBFULL

Memory data base full

-5

PI_ATT_TAGNOTFOUND

Tag not found

-6

PI_ATT_BADCHARTAG

Illegal Characters in Tag

-7

PI_ATT_TAGEXISTS

Tag already exists

-8

PI_ATT_BADTIME

Time is After Current Time and Date or Time is