You are on page 1of 213

PI Server Reference Guide

Published November 2009


OSIsoft, LLC International Offices
777 Davis St., Suite 250 OSIsoft Australia
San Leandro, CA 94577 USA Perth, Australia
OSIsoft Germany GmbH
Additional Offices Altenstadt, Germany
Houston, TX OSIsoft Asia Pte Ltd.
Johnson City, TN
Longview, TX Singapore
Mayfield Heights, OH OSIsoft Canada ULC
Philadelphia, PA Montreal, Canada
Phoenix, AZ
Calgary, Canada
Savannah, GA
OSIsoft, LLC Representative Office
Sales Outlets/Distributors Shanghai, People’s Republic of China
Middle East/North Africa OSIsoft Japan KK
Republic of South Africa Tokyo, Japan
Russia/Central Asia OSIsoft Mexico S. De R.L. De C.V.
South America/Caribbean
Southeast Asia Mexico City, Mexico
South Korea Taiwan OSIsoft do Brasil Sistemas Ltda.
Sao Paulo, Brazil

Contact and Support:


Main phone: (01) 510-297-5800
Fax: (01) 510-357-8136
Support phone: (01) 510-297-5828
Web site: http://www.osisoft.com
Support web site: http://techsupport.osisoft.com
Support email: techsupport@osisoft.com

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 Allow input archive records with duplicate times. By


records default duplicates are ignored.
-f size Make output Specify size in MB. If size = 0, the input file size is
archive a fixed used. Default is dynamic archive.
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 Specify the ID conversion binary path and filename.
conversion file See Specifying an ID Conversion File (-id) (page 33).
-if pathname Input archive Required. The full path, including drive letter is
file required. This is true for all file arguments passed.
-oet option Output file end Options: Input, Event, time, NFE, Primary, NoChange.
time See Specifying an End Time for the Output File (-oet)
(page 8).
-of pathname Output Archive Required.
File
-ost option Output file Options: Input, Event, time, NFE. See Specifying a
start time 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 Use when input is different from standard DST.
specification
file
-vah Validate Apply a validation algorithm. Multiple events
annotation referencing a single annotation are detected and fixed.
handles 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 Sets the start time to the specified time string. Times are specified in absolute
(where time is PI time format. Relative times are not supported. Times must be enclosed in
specified in double quotes when containing spaces. If only date is specified the time
absolute PI time defaults to 00:00:00 (midnight)
format) 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 Sets the end time to the specified time string. Times are specified in absolute PI
(where time is time format. Relative times are not supported. Times must be enclosed in double
specified in quotes when containing spaces. If only date is specified the time defaults to
absolute PI time 00:00:00 (midnight).
format) 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
<0 An error returned from the output processing check log messages

Event Queue Recovery


There are times it might be desirable sometimes to remove an Event Queue file from the
system. One example is when the system cannot manage the load of a large backlog of
events.
To do this:
1. Stop the Snapshot and Archive Subsystems.
2. Rename PI\dat\pimapevq.dat to PI\dat\pimapevq.save.
3. Restart the Snapshot and Archive Subsystems.

PI Server Reference Guide 9


Command-Line Utility Reference

Later, the renamed Event Queue file can be loaded into an offline archive. The input file is
the saved Event Queue data file. The argument -evq indicates the input file is an Event
Queue. The resulting output archive might have dates that overlap existing archives. Offline
processing, as discussed above, is required to combine these archives. Here is an example
command line using piarchss to recover an Event Queue:
piarchss -if D:\pi\dat\pimapevq.save -of D:\pi\dat\piarch099.dat
-evq

Note: In most cases the Event Queue is the above file. But, it is possible to have
multiple Event Queues. The utility piartool -qs indicates if your system uses
multiple queues. If multiple queues are used, the queue naming convention is
pimapNNNN.dat, where NNNN is a four-digit integer.

In version 3.3 and earlier, the Event Queue is pi\dat\pieventq.dat. Version 3.4 and
later does not support processing this format. These files should be processed before
upgrading.
Also, the memory mapped file approach introduced in version 3.4 and other enhancements
allows PI to handle out-of-order data much more efficiently. Thus, in most cases, offline
processing of the Event Queue is not necessary.

Combine and Divide Archives


From a user perspective, archive files are organized according to the time ranges that they
span. It is sometimes useful to change the initial file organization of the archive. The Offline
Archive Utility can be used to accomplish each of the following tasks:
• Combining archives with overlapping dates into one archive
• Combining archives with adjacent time ranges into one archive
• Dividing an archive into smaller archives, each covering a portion of the original time
span

Combine Multiple Archives into a Single Archive


To combine several archives, invoke piarchss once for each input file, using the same output
file for all these inputs. Start from the oldest input and continue in ascending time order.

Note: The Offline Archive Utility will not work in descending or random time order.

The end-time of the output file can be moved forward as required, but the start-time cannot be
changed after creation.
Archives with an unknown end time should be processed into a new archive to determine the
actual end time. The resulting archive can then be merged chronologically. Merging a series
of archives with overlapping dates requires processing the archive with the oldest start time
first, then process the remaining in chronological order based on the archive end times.
This example demonstrates how to combine archives:
piarchss -if D:\pi\dat\oldest.dat -of D:\pi\dat\bigfile.dat

10
piartool Reference

piarchss -if D:\pi\dat\newer.dat -of D:\pi\dat\bigfile.dat


piarchss -if D:\pi\dat\newest.dat -of D:\pi\dat\bigfile.dat
In this example, bigfile.dat does not exist prior to the operation. It is created in the first
session and events are added to it in the second and third session. It is created as a dynamic
archive by default. After it is created, it may be registered, and then events may be added to
the archive through the Snapshot Subsystem.
Any of the three input files that were registered prior to the operation are unregistered during
the operation. When the operation is complete, you can register them again. Dynamic
archives, which is the default type created by the offline utility, are not shiftable.

Divide an Archive into Smaller Archives


To break a single archive into smaller archives, invoke piarchss once for each output file and
use the same input file for all the outputs. Each time, a different start and end time is
specified. These times are specified in absolute PI time format.
This is an example of dividing an archive into two smaller archives:
piarchss -if D:\pi\dat\bigfile.dat -of D:\pi\dat\january.dat -filter "1-jan"
"31-jan-02 23:59:59" -ost "1-jan" -oet "31-jan-02 23:59:59"
piarchss -if D:\pi\dat\bigfile.dat -of D:\pi\dat\february.dat -filter
"1-feb" "28-feb-02 23:59:59" -ost "1-feb" -oet "28-feb-02 23:59:59"

In this example, january.dat and february.dat do not exist prior to the operation.
They are created as dynamic archives by default. After they are created, they may be
registered using piartool -ar, and then events may be added to the archive files in the usual
way. Both output archives are not shiftable because they were created by the Offline Archive
Utility as dynamic archives.
The filter start time of january.dat is specified as 1-jan. This defaults to 1-jan, of the
current year, at 00:00:00. The filter end time is enclosed in double quotes because of the
embedded space character. The output archive start and end times are explicitly specified.
Excluding the -ost and -oet flags results in the default behavior. For more details, see Specify
a Start Time for the Output File (page 8) and Specify an End Time for the Output File (page
8).
If the input file was registered prior to the operation, it will be unregistered during the
operation. When the operation is complete, you can use piartool -ar to register it again.

piartool Reference
This table lists the command-line options you will use to manage archives with the piartool
utility.

Note: PI Server must be running when you use piartool. For details about the offline
archive utility, see Manage Archives of Offline PI Server (page 6).

Option Name Action

-aag Archive Activity Enable/Disable the archive activity grid, and list the
Grid Archive access information.

PI Server Reference Guide 11


Command-Line Utility Reference

Option Name Action

-ac Archive create Create an archive for specified period

-acd Dynamic archive Create a dynamic archive for specified period.


create
-ads Archive disable Removed specified archive from shift participation.
shift
-aes Archive enable shift Add specified archive to shift participation.

-al Archive list List all registered archives.


-ar path Archive register Register a specified archive. You can use the
wildcard characters * and ? to register archives in
bulk. The symbol * matches all possibilities with any
number of characters. The symbol ? matches a
single character and may be used any number of
times.
-as Archive statistics Archive Subsystem activity monitor and statistics.
-au path Archive unregister Unregister a specified archive. You can use the
wildcard characters * and ? to unregister archives in
bulk. The symbol * matches all possibilities with any
number of characters. The symbol ? matches a
single character and may be used any number of
times.
-aw Archive walk List details of the records in an archive file.
-backup path Perform a PI Starts a PI Server backup. The path argument
[arguments] Server backup specifies the target directory for the backup files.
For a complete list of arguments that modify that
backup, see Back up the PI Server.
-backup -command Run a backup Runs a backup command. For a complete list of
[arguments] command backup commands and a list of possible arguments,
see Back up the PI Server.
-block Block Wait for a specified subsystem to become
responsive. Used in PI start scripts.
-cad 'tagname' [-reset] Archive cache Archive cache diagnostics for a specified point.
diagnostics Display the events sitting in the read and write cache.
-cas ['tagmask'] Archive cache Display a summary of the contents of the archive
summary cache, including the number of events in the Read
and Write caches for every point that matches the
tagmask.
-cs PINetmgr PI Network Manager connection stress test.
[For troubleshooting connection stress
only] test

-de path Dump eventqueue Dump specified Event Queue file.


[-pt tagname] [recno] Optionally select a specific tag and/or specific record
in the file.

12
piartool Reference

Option Name Action

-disconnect Force Subsystem Force the specified subsystem to disconnect from


-subsystem name [-id Disconnect pinetmgr, or if pinetmgr is specified, instruct pinetmgr
ID] to disconnect the connection based on the
[For troubleshooting connection ID passed.
only] The -graceful option causes a disconnection notice to
be first sent by pinetmgr or the target subsystem.
-fs Force shift Force an archive shift.
-idci input_file ID conversion file Create ID conversion file from specified input file.
-idco outfile creation

-lic [Options listed Licensing Usage List general license and usage information
under Action] Information Def [-select "mask"] List all licenses. The
-select option lets you do a wildcard selection
instead of displaying the entire list of licenses. For
example, piartool –lic def –select
piarchss* shows all the licenses whose names
start with "piarchss".
User [-select "mask"] List all license users.
The -select option lets you list only the users
matching the wildcard mask.
Lic [-select "mask"] List all licenses and
users. The -select option allows you to list only the
licenses and users matching the wildcard mask.
AllowedApps [-List type,type...|-Check
app,app,...]
List the licenses of the specified application types or
check whether a specific feature is licensed. The
valid application types include: PIService, PIUtility,
OSIInterface, OSIMiddleWare, OSIAPIApp,
OSISDKApp, ServerApp, APIApp, SDKApp.
Note: When a PI server is not running, piartool
does not work but you can use pilicmgr -lic
usage and pilicmgr -lic def to list the license
information.
-mpt {0|1} Message protocol Log all communication coming to and from the
[For troubleshooting trace server.
only] To enable tracing run with -mpt 1. Call a second time
with -mpt 0 to stop tracing.
The resulting output file appears in the \pi\temp
directory with the .mpt extension.
The file can be read with the mptconsolveview utility,
which OSISoft provides on request, e.g.:
Mptconsolveview .\24-Aug-05_12-10-06.mpt
-msg "message" Message Sends a series of test messages to the PI message
[-pro "procname"] Subsystem Test log. Can emulate sending messages from any
process. nrep sets how many messages are sent,
[-nrep m]
nbuf sets how many messages are sent at a time,
[-nbuf l] nmps attempts to throttle how many messages are
[-nmps n] sent per second.
[For troubleshooting
only]

PI Server Reference Guide 13


Command-Line Utility Reference

Option Name Action

-msgtest startsize PINetmgr Send a series of test messages to the PINetmgr.


endsize Communications Message size increases by one byte increments
[For troubleshooting Test starting from startsize to endsize. Specify startsize
only] and endsize in bytes.

-netstress PINetmgr stress Test PINetmgr subsystem by sending and receiving


[-SendBlocks 1] test. specified 4k blocks.
[-RecvBlocks 1]
[-loops 1]
[For troubleshooting
only]
-ooo [-r] [repeat=0] Out of order snap Show tags with Out of Order events. Optional Reset
events and Repeat.
-qs Queue statistics Monitor Event-Queue activity and statistics.
-re -subsystem name Raise Exception Raise exception in specified subsystem (force a
-pid PID crash). This call only works locally; remote is not
supported.
[For troubleshooting
only]
-remote Remote system Run utility against a remote system. When this
argument is included as the last argument in any
valid command the utility prompts for remote system
login information. If successful the utility runs against
the remote system.
-rpctest subsystem Inter-process Times the RPC round trip to the specified
count Async Communication sub-system.
[For troubleshooting Test
only]
-ss Snapshot statistics Snapshot Subsystem activity monitor and statistics.
-standalone N Standalone mode Place PI Server in standalone mode. Possible values
for N are:
1 Enter standalone
0 Exit standalone
2 Query current state
-qwait [300] Event Queue wait Set the Event Queue wait time; optional argument of
time 300 seconds default wait time may be changed.
-systembackup System Backup Start/End backup for a specified subsystem.
Deprecated in favor of -backup.
-thread 'subsystem' Subsystem Thread List a subsystem's threads.
-info List

-v Version Get version and build information.


-upd <subsystem> Update producer Display update producer statistics. Run this test for
<producer> statistics each producer. See PI Producers and Associated
Subsystems (page 119).

14
piartool Reference

The piartool Backup Commands

You can use the piartool –backup commands to launch a VSS or non-VSS backup or to
issue other auxiliary backup commands. For more information about backups and backup
types, see the PI Server System Management Guide.

Launching Backups with piartool


The syntax of the piartool -backup command for starting a backup is:
piartool -backup path [-component comp] [-archive N] [-numarch N]
[-cutoff date][-wait [sec]] [-nonvss] [-incremental] [-arcdir]

Argument Description
path Full path to the backup directory. The directory path can be a UNC path.
Examples:
C:\pibackup\
\\myserver\c$\pibackup\
\\myserver\share\pibackup\
The UNC path can be a path to a shared directory on a remote computer.
Mapped network drive cannot be used in the full path.
-arcdir Back up archives and annotation files to the path\arc directory.
If this flag is not specified, archives are backed up to a directory depending
upon their current location. For example, if an archive is in the
C:\PI\archives directory, then it is backed up to path\archives.
Similarly, if an archive is in the C:\PI\dat directory, then it is backed up to
path\dat.
-archive N Back up only the specified archive number N and its associated annotation
file.
Archive numbers begin at 0 for the primary archive. This flag is ignored if
the -component flag is specified.
The -archiving flag takes precedence over the -numarch and -cutoff flags.
-component comp Back up only the component specified by comp. For example:
piartool -backup c:\pi\backup -component pibasess
backs up only the files that belong to the PI Base Subsystem. As a second
example, the command:
piartool -backup c:\pi\backup -component
piarchss
backs up only the piarchss component. Notice that the full path name of the
piarchss component, PI Archive Subsystem\piarchss, is not used when
specifying the component name. See Backup Components of the PI Server.
To see a full list of the components, enter:
piartool –backup –identify –verbose
The -component flag takes precedence over the -numarch and -cutoff flags,
which are used only to restrict the number of archive components that are
backed up. If the -component flag is not specified, all components are backed
up except for the archive components that are restricted from backup by the
-numarch and -cutoff flags.
The -component flag also takes precedence over the -archive flag.

PI Server Reference Guide 15


Command-Line Utility Reference

Argument Description
-cutoff date Cutoff date in PI time format.
For example, -cutoff *-10d restricts the backup to archives that contain data
between 10 days prior to current time and current time. The more restrictive
of -numarch N and -cutoff date takes precedence. The default cutoff date is
1-Jan-1970 00:00:00, unless otherwise specified by the
Backup_ArchiveCutoffDate timeout parameter.
This flag is ignored if the -component or -archive flag is specified.
-incremental Files are not backed up if a file in path has the same name, last modified date
and file size as in the source directory. If path does not exist or if there are no
files in path, then the –incremental flag has no effect.

-nonvss Perform a non-VSS backup on Windows Server 2003 or greater. This option
has no effect on Windows XP or Windows 2000.
-numarch N Back up N archives.
For example, specifying -numarch 2 backs up the primary archive and
archive 1, provided that the primary archive and archive 1 contain data. Empty
archives are not identified for backup. The default number of archives for
backup is 3, unless otherwise specified by the Backup_NumArchives
timeout parameter.
This flag is ignored if the -component or -archive flag is specified.
-wait [sec] Wait up to sec seconds for the non-VSS backup to complete before returning
from the piartool -backup command. The progress of the backup is reported
every 15 seconds and when the backup is complete, the status of the backup
is reported via piartool -backup -query.
If the -wait flag is used without specifying the optional sec parameter, then the
piartool -backup command waits up to 1 day for the backup to complete.
If the -wait flag is not specified, then piartool -backup returns immediately. In
this case, the progress of the backup can be monitored with the
piartool -backup -query command.
The -wait option is used in the pibackup.bat script because it is important for
the backup to complete before the site-specific backup scripts are called.

Auxiliary Backup Commands for piartool


The piartool -backup commands are typically used for troubleshooting and for monitoring
the course of a backup. The syntax is:
piartool -backup Arg1 [Arg2] [Arg3] [...]
If Arg1 does not begin with a hyphen (-), then Arg1 is assumed to be the destination
directory for the backup, as described in Launching Backups with piartool (page 15). If Arg1
begins with a hyphen, then it is one of the auxiliary commands in the following table:
Argument Description
-abort Abort a current running backup. For example:
piartool -backup -abort
-query [-verbose] Reports a list of subsystems that are currently registered for backup. If
a backup is not in progress, the command reports the status of the last
backup. If a backup is in progress, the command reports the type of
backup and the status of the backup. For example:
piartool -backup -query

16
piartool Reference

Argument Description
-identify Reports the list of files that PI will back up. If the -verbose flag is
[-numarch number] specified, the command reports a list of files and components.
[-cutoff date] A component is a logical grouping of files. For example, all of the files
[-verbose] for the base subsystem are grouped under the pibasess component.
The purpose of a component is to identify a group of files for backup.
The -numarch and -cutoff flags have the same meaning as the
corresponding piartool -backup path command that is used to start
backups. See Launching Backups with piartool (page 15).
The identify command creates a \pi\dat\pibackupfiles.bks file.
This file contains the list of files that need to be backed up for the PI
Server. The number of archives in the list is restricted by the -numarch
and -cutoff parameters.
This file was used by NTBackup.exe for backups in 3.4.370 as
described in Upgrade Considerations. The pibackupfiles.bks file is still
created for backwards compatibility.
Example:
piartool -backup -identify -verbose
-SimulateVSS Simulates the COM+ events of a VSS backup without backing up any
simulate_command files. See Lifetime of a VSS Backup for a complete description of the
COM+ events. The -SimulateVSS commands are useful for third-party
backup applications that can take snapshots but do not communicate to
the PI Server via the VSS API.
-SimulateVSS -PrepareBackup2Freeze causes all events, from the
PrepareBackup event through the Freeze event, to occur. The
simulated backup is aborted if it does not end within 60 seconds.
You can use -SimulateVSS -Thaw2PostSnapshot in conjunction with
-SimulateVSS -BackupShutdown ends the simulated VSS backup.
-test –freeze component Freezes the specified component. For example, piartool -backup -test
-freeze -pibasess prevents any modification to the PI Point Database,
Module Database, Digital State table, and so on.
For a complete list of components, enter the piartool -backup
–identify -verbose command.

-trace level Control writing of debug messages to the log file.


By default, the trace level is 0, resulting in no trace messages. Higher
values of trace level result in more trace messages. Trace levels higher
than 100 result in no more messages than a trace level of 100.
Normally, tracing should be off to avoid unnecessary messages in the
log file.
If the trace level is non-zero, the trace level is displayed by the piartool
-backup -query command.
Example:
piartool -backup -trace 1

PI Server Reference Guide 17


Command-Line Utility Reference

piartool -backup -query


When the PI System if first started and whenever the PI Backup Subsystem is restarted, the
output of a piartool -backup -query will appear as follows once all of the subsystems have
registered for backup.
e:PI\adm>piartool -backup -query
Backup in Progress: FALSE
Last Backup Start: NEVER
VSS Supported: TRUE
Subsystems Registered for Backup
Name, Registration Time, Version, Status
pibatch, 29-Dec-06 12:09:36, 3.4.375.38, [0] Success
pilicmgr, 29-Dec-06 12:09:52, 3.4.375.38, [0] Success
piarchss, 29-Dec-06 12:10:37, 3.4.375.38, [0] Success
pibasess, 29-Dec-06 12:11:53, 3.4.375.38, [0] Success
pisnapss, 29-Dec-06 12:11:54, 3.4.375.38, [0] Success
pimsgss, 29-Dec-06 12:11:56, 3.4.375.38, [0] Success
Last Backup Start will appear as Never when the backup subsystem is restarted because the
backup subsystem does not keep track of previous backups between restarts. Pibatch may not
appear in your list of subsystems that are registered for backup if you are not licensed to use
the old batch subsystem.
If the PI System is started normally, then subsystems should register for backup within about
30 seconds of the PI Backup Subsystem startup time. Normal startup is, for example, starting
the PI System with the pisrvstart.bat command file or letting the PI System services
automatically start after a reboot. However, if the PI Backup Subsystem is shutdown and
restarted by iteself, it may take up to 10 minutes for the individual subsystems to register for
backup.
All of the following subsystems must be running in order for a backup to succeed.
Subsystem Registers for Backup
PI Network Manager No
PI Backup Subsystem No
PI License Manager Yes
PI Message Subsystem Yes
PI Snapshot Subsystem Yes
PI Archive Subsystem Yes
PI Base Subsystem Yes
PI Batch Subsystem Yes, but will not register if not licensed to use the old PI Batch
Subsystem.

The other subsystems either do not have files that need to be backed up or they do not need to
be running for a backup to succeed.

piartool -backup -identify


The piartool -backup -identify command displays the list of files that need to be backed up
for the PI system. The number of archives in the list is restricted by the -numarch and

18
piartool Reference

-cutoff parameters or, if these parameters are not specified, the Backup_ArchiveCutoffDate
and Backup_NumArchives timeout parameters. The output has the format:
e:\pi\adm>piartool -backup -identify
FileName_1
FileName_2
FileName_3
...
Whenever the backup identify command is run, a backup selection file,
PI\dat\pibackup.bks, is created. This file was used by NTBackup.exe for backups in
3.4.370 as described in Upgrade Considerations, and is still created for backwards
compatibility.
The piartool -backup -identify -verbose command lists detailed information about the
components and files that are backed up by the PI Backup Subsystem. The components and
files that are listed should correspond to the components and files described in Backup
Components of the PI Server.
The piartool -backup -identify -verbose command includes the following file information:
Name File Information
ComponentName The component that the file belong to.
LastBackup The time the file was last backed up. The last backup date is listed as null if
the associated file has never been backed up or if the last backup date is not
stored.
The last backup date is not stored for any files belonging to the
SettingsAndTimeoutParameters component and for all PI message logs,
except for the PI message log that is currently in memory.
LastModified Last modified time of the file.
SizeInBytes Size of the file in bytes.

and component information:


Name Component Information
ComponentDescription The descriptive “Friendly Name” of the component.
ComponentPath The path of the component.

Manage Archives with piartool

Create Archives
These utilities allow you to name the new archive, specify its location, create it, and initialize
it:
• piarcreate
• piartool -ac
• piartool -acd

PI Server Reference Guide 19


Command-Line Utility Reference

The piarcreate utility creates an archive without registering it. You can specify the size of
the archive with piarcreate, but you must complete a second step to register the archive. Use
the -d flag to create a dynamic archive. With piarcreate, you can specify the maximum
number of points and maximum size of a dynamic Archive. See Set the Maximum Archive
Size for details.

Note: With piarcreate, the impacts to system resources are minimal. Therefore, use of
this utility is considered the most efficient way to create archives. However, you
cannot specify start and end times using piarcreate.

You may use the piartool utility to optionally specify the following for new archives: the
start and end times for both fixed and dynamic archives, the maximum size for dynamic
archives and the fixed size for fixed archives. Use option -ac to create a fixed-size archive
and option -acd to create a dynamic archive. With both piartool -ac and piartool -acd, the
default created archive size matches the current Primary Archive size, and registration is
automatic.
Every archive has a parallel annotation file that has the extension .ann. The file is created
automatically by either utility. It must remain in the same directory that contains its archive
file at all times.

Select an Archive Type: Fixed or Dynamic


By default, a fixed archive is created. If you specify the -d parameter, a dynamic archive is
created instead. Dynamic archives grow as they get filled, up to the specified maxsize, but
no more than 2 terabytes.
See Example: Create a Dynamic Archive (page 21) for details.

EXAMPLE: CREATE A FIXED ARCHIVE


To create a fixed Archive using the piartool interactively:
C:\PI\adm\piartool -ac

This procedure will create and register a new archive. The archive
path and optional start/end times or size may be specified.

WARNING: This will reduce system responsiveness for the duration of


the process. If you do not need to initialize the archive times it
is more efficient to run 'piarcreate' and then register the new archive
with 'piartool -ar'.

Enter the complete path to the new archive: C:\PI\dat\piarch.113

You have entered the archive path: C:\PI\dat\piarch.113.


Is this correct (y/n/q)? y

Would you like to initialize the start and end times (y/n)? y

Times must be entered in standard PI Time Format, for example:


04-Jun-89 10:00:00

20
piartool Reference

Enter the archive start time: t

You have entered the start time: 12-Nov-07 00:00:00 Is this correct
(y/n)? y

Enter the archive end time ('*' for primary): 12-Nov-07 01:00:00

You have entered the end time: 12-Nov-07 01:00:00 Is this correct
(y/n)? y

Would you like to set the archive size to something different than
the current primary archive (y/n)? y

You have requested to create an archive with the attributes:

File Path: C:\PI\dat\piarch.113


Start Time: 12-Nov-07 00:00:00
End Time: 12-Nov-07 01:00:00
File Size: 200MB

Is this correct (y/n)? y

Successfully scheduled the archive creation. Archive path:


D:\PI\dat\piarch.113.

Check the message log for completion status.

Note: To review the message log for the archive created in this example, enter
pigetmsg - st t -et * -pn piarchss. See Search for and Sort Messages
with pigetmsg for details.

EXAMPLE: CREATE A DYNAMIC ARCHIVE


To create a dynamic Archive using the piartool interactively:
C:\PI\adm\piartool -acd

This procedure will create and register a new dynamic archive. The
archive path and optional start and end times may be specified.

WARNING: This will reduce system responsiveness for the duration of


the process. If you do not need to initialize the archive times it
is more efficient to run 'piarcreate' and then register the new archive
with 'piartool -ar'.

Enter the complete path to the new archive: C:\PI\dat\piarch.224

You have entered the archive path: C:\PI\dat\piarch.224.


Is this correct (y/n/q)? y

Would you like to initialize the start and end times (y/n)? y

PI Server Reference Guide 21


Command-Line Utility Reference

Times must be entered in standard PI Time Format, for example:


04-Jun-89 10:00:00

Enter the archive start time: 31-Dec-06 00:00:00

You have entered the start time: 31-Dec-06 00:00:00 Is this correct
(y/n)? y

Enter the archive end time ('*' for primary): 17-Jun-07 02:00:00

You have entered the end time: 17-Jun-07 02:00:00 Is this correct
(y/n)? y

You have requested to create an archive with the attributes:

File Path: C:\PI\dat\piarch.224


Start Time: 31-Dec-06 00:00:00
End Time: 17-Jun-07 02:00:00

Is this correct (y/n)? y

Successfully scheduled the archive creation. Archive path:


D:\PI\dat\piarch.113.

Check the message log for completion status.

Note: To review the message log for the archive created in this example, enter
pigetmsg - st t -et * -pn piarchss. See Search for and Sort Messages
with pigetmsg for details.

Create a New Primary Archive


In some situations it is useful to create and register a primary archive with a specific
start-time. For example, when recovering from setting the time into the future, when
backfilling archives, or after using pidiag -ar to recover from any corrupted archive situation.
Use piartool -ac to create a new primary archive and specify the start time as required and
the end time as *.
Note the following restrictions:
• Registering a new primary archive fails whenever there is a current valid primary archive
registered.
• A valid primary archive must have a specified start time and null end-time, which
signifies current time.

Add and Edit Annotations


Every value in the Snapshot or the Archive may be annotated. An annotation can be of any
data type. Annotations are stored in an Annotation file. Each Archive file has a single
associated Annotation file, with an .ann extension. You can use piconfig to add and edit
text annotations.

22
piartool Reference

Note: Any operation on annotation translates into an actual I/O, bypassing Archive
caching. Thus it is much less efficient than non-annotated events. Be aware of this
when using annotations.

Annotation file statistics are shown with the Archive listing utility piartool -al. The
following is output from an Archive listing:
Archive[0]: D:\PI\dat\piarch.033 (Used: 1.8%)
PIarcfilehead[$Workfile: piarfile.cxx $ $Revision: $]::
Version: 7 Path: D:\PI\dat\piarch.001
State: 4 Type: 0 Write Flag: 1 Shift Flag: 1
Record Size: 1024 Count: 131072 Add Rate/Hour: 1.7
Offsets: Primary: 20/65536 Overflow: 128673/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 13:10:32
In the above listing, the Archive file is d:PI\arc\piarch.033. The corresponding
Annotation file is d:PI\arc\piarch.033.ann. There are 10,826 annotations; with
room for a total of 65,535 and the Annotation file is 434,144 bytes (424 KB).
The Annotation file is created if it does not exist. It is important the Archive and Annotation
files remain together, especially when a backed up Archive file is restored.

Note: The PI SDK supplies a programmatic interface for creating, accessing, and editing
annotations. The PI SDK User Guide and online help are the best source for
details on valid variants for annotations.

Unregister an Archive
Any archive may be unregistered except the Primary Archive (archive number 0), which
stores the current data. Use this command to drop an archive from the list of registered
archives:
piartool -au path
where path specifies a complete, not relative, pathname. For example, the following
command unregisters the archive called piarch.006 in the PI\dat directory on the D
drive:
piartool -au D:\PI\dat\piarch.006
You can use the wildcard characters * and ? to unregister archives in bulk. The symbol *
matches all possibilities with any number of characters. The symbol ? matches a single
character and may be used any number of times. For example, the following command
unregisters all archive files that begin with the piarch.0 prefix and are located in the
PI\dat directory:
piartool -au D:\PI\dat\piarch.0*

PI Server Reference Guide 23


Command-Line Utility Reference

Register an Archive
To register archives, you use the piartool -ar command. The syntax is:
piartool -ar path
For example, the following command registers the archive called piarch.006 in the
PI\dat directory on the D drive:
piartool -ar D:\PI\dat\piarch.006
The specified path must be a complete, not relative, path of an existing archive file. You can
use the wildcard characters * and ? to register archives in bulk. The symbol * matches all
possibilities with any number of characters. The symbol ? matches a single character and may
be used any number of times.
For example, the following command registers all archive files in the PI\dat directory that
begin with the piarch.0 prefix:
piartool -ar D:\PI\dat\piarch.0*

Predict Next Archive Shift Time


The command piartool -as is used to monitor archive activity, performance and to estimate
the next archive shift. The utility predicts the time for the next archive shift, based on the
average number of archive records consumed per hour, plus the rate of consumption. If the
primary archive is less than 20 percent full, the prediction is based on the previous archive
rates.

Set the Archive Shift Enable Flag


Each archive has a Shift Enable Flag. If the Shift Enable Flag is set to 1 then the archive is
eligible to participate in archive shifts. If the flag is 0, then the archive will not participate in
archive shifts. The status of the flag may be viewed using piartool -al.
Archives can be excluded from shift participation by running piartool -ads path. Shift
disabled archives can be re-enabled with the command piartool -aes path. The path must be
a full pathname.

Note: piartool -aes does not re-enable dynamic archives for shifting.

Force Archive Shifts


The command piartool -fs forces an immediate archive shift. During normal operations, the
piartool -fs command should not be used. However, it may be useful to force an archive to
shift while testing your system or to do advance archive management.
For example, this command is sometimes useful if you are building a large number of new
points. Since primary records may occupy no more than one half of the records in an archive
file, it may be necessary to build a larger primary archive. You can then force an archive shift
to make your primary archive the larger archive.

24
piartool Reference

For systems with large point counts, archive shifts may require a several minutes. As soon as
the shift starts, messages are written to the PI message log, such as:
0 piarcmgr 2-Apr-03 14:32:39
>> Forced archive shift requested.
0 piarcmgr 2-Apr-03 14:32:39
>> Beginning Archive Shift. Current Primary Archive:
d:\pi\dat\piarch.001
0 piarcmgr 2-Apr-03 14:32:39
>> Target Archive for Shift: d:\pi\dat\piarch.003
0 piarsrv 2-Apr-03 14:32:39
>> Clear and Initialize archive file: d:\pi\dat\piarch.003
0 piarsrv 2-Apr-03 14:32:48
>> Archive clear progress: 51200 records cleared.
0 piarsrv 2-Apr-03 14:32:58
>> Archive clear progress: 102400 records cleared.
0 piarsrv 2-Apr-03 14:33:08
>> Archive clear progress: 153600 records cleared.
0 piarsrv 2-Apr-03 14:33:19
>> Archive clear progress: 204800 records cleared.
0 piarsrv 2-Apr-03 14:33:28
>> Archive successfully cleared 256000 records
0 piarsrv 2-Apr-03 14:33:28
>> Archive successfully initialized 16285 points.
0 piarsrv 2-Apr-03 14:33:28
>> Archive file Clear and Initialize completion status[0] Success
0 piarcmgr 2-Apr-03 14:33:28
>> Completing Archive Shift. Current Primary Archive:
d:\pi\dat\piarch.001
0 piarcmgr 2-Apr-03 14:33:28
>> Archive d:\pi\dat\piarch.001 shifted successfully. New Primary
Archive is d:\pi\dat\piarch.003
Do not shut down the PI Server until the shift has completed. To determine when this has
occurred, check the message log for a message like:
0 piarcmgr 2-Apr-03 14:33:28
>> Archive d:\pi\dat\piarch.001 shifted successfully. New Primary
Archive is d:\pi\dat\piarch.003

Backfilling Data
At times it may be useful to make data available in PI that was collected prior to the PI
installation. Several applications can be used for this procedure, known as backfilling. You
may use a PI API or PI SDK application, piconfig, or the batch file interface. Your choice
depends mainly on how the data that will be entered into PI is currently stored.

Backfill Data with Compression


The installation procedure is:
1. Install PI, start PI, create all points, stop PI.
2. Isolate the PI Server from all incoming process data. This means shutting down PI
interfaces on all PI API and PINet nodes. Another way to do this is to disallow all PI API

PI Server Reference Guide 25


Command-Line Utility Reference

connections at the server. To do this, start piconfig without starting PI. Disregard
messages about failure to connect and enter:
@table pifirewall
@mode edit,t
@istr hostmask,value
"*.*.*.*",DISALLOW

Note: Entries that allow access to specific names or addresses override the
DISALLOW. Edit all other entries to DISALLOW. Local connections are not
affected by PIFirewall table entries; verify that applications that may write
data are not running.

3. Start PI with the -base parameter. This ensures that PI starts up with only the minimum
required subsystems. Enter the command:
pisrvstart.bat -base
4. Use piartool -ac or -acd to create and register archive files for the backfilling period.
5. Use piconfig or other tools to insert one event for every point at the earliest time on-line.
6. Delete all the PointCreated events from the snapshot. This will bring into the
snapshot the old events. This can be done with a PI API or PI SDK program or with the
piconfig utility. Verify that the old event is in the snapshot.
7. Backfill the archives by reading in the data in Time Sequential Order. This way the data
is compressed.

Caution: The Archive Subsystem assumes the snapshot time is the most recent
time stamp written to any point. To enable compression, it is important to keep
all current data sources from writing to the PI Server. This is why Random,
Ramp Soak, Performance Equations, PI Total, PI Alarm, or any other
interfaces cannot be running.

8. If you used the technique of modifying the PIFirewall table in Step 2 above, run piconfig
to either change the hostmask value to Allow or delete the above hostmask altogether.
9. Start the interfaces using pisrvsitestart.bat.

Backfill Data without Compression


1. Install PI Server and create all points. The points that you want to backfill must be
created prior to the archive initialization, otherwise the archive has no primary records for
these points.

Note: You can backfill data using an archive created with a start time prior to point
creation time, provided the point data exists when that archive is created.
Reprocessing an old archive with the offline utility adds to that archive all
existing points, while preserving all the old data.

26
piartool Reference

2. Use piartool -ac to create and initialize back fill archives. The start and end times must
be specified. The start time should be the timestamp of the oldest data to be backfilled;
the end time should be just prior to the oldest archive time specified using piartool -al.
3. Backfill the data. The data that you backfill is not compressed, since it is prior to the
snapshot time.
4. If the backfill archive is filled before all of the backfill data is entered, you must delete
the backfill archive, and create two backfill archives. Next, divide the target time range
between the two, or create a single larger archive, and then retry the data backfilling.

Estimate Archive Utilization


You must allocate the space to be used by a fixed archive when you create it. Use piartool -al
to list the registered archives. For each archive an estimate of the used space is displayed. See
the entry Record Size: in each Archive record. For details, see List Registered Archives.

Note: The default archives are sized at the time of installation when the installer answers
prompts from the installation wizard.

Monitor the Flow of Events to the Archive Subsystem

To use piartool to monitor the Archive Subsystem:


1. Enter piartool –as to list the Archive Subsystem internal counters every five seconds.
2. Review the output. Note the difference in the count in the column on the right since the
previous five seconds. The counters are reset to zero when the Archive Subsystem is
started.
$ piartool –as
Counters for 7–Aug–03 14:51:10
Archived Events: 1050621 1485
Out of Order Events: 0 0
Events Cascade Count: 0 0
Events Read: 5 0
Read Operations: 0 0
Cache Record Count: 0 0
Cache Records Created: 6 0
Cache Record Memory Reads: 5 0
Cache Clean Count: 0 0
Archive Record Disk Reads: 146342 219
Archive Record Disk Writes: 152737 226
Unflushed Events: 12431 –203
Unflushed Points: 3131 –48
Point Flush Count: 133491 211
Primary Archive Number: 5 0
Archive Shift Prediction (hr): 1 0
Archiving Flag: 1 0
Archive Backup Flag: 0 0
Archive Loaded Flag: 1 0
Shift or System Backup Flag: 0 0

PI Server Reference Guide 27


Command-Line Utility Reference

Failed Archive Shift Flag: 0 0


Overflow Index Record Count: 0 0
Overflow Data Record Count: 5082 4

Note: The piartool utility can run remotely by specifying some additional parameters
on the command line. For details, see Using the piartool Utility (page 11).

3. Enter <Ctrl+C> to stop the output from piartool.

Archived Events Counter


The Archived Events Counter is incremented for every new event written to the archive. This
count includes the delete and edit events.

Out-of-Order Events Counter


The Archive Subsystem receives events from the Snapshot Subsystem. If the timestamp of
the event is older than the last event in the target record, it is considered an out-of-order event
and is added to the Out-of-Order Events Counter.
Excessive out-of-order events might lead to system problems such as excess CPU
consumption, excessive disk I/O, and archives filling faster than expected.

Events Cascade Counter


Out-of-order events are inserted into the target record. The insert requires moving other
events within the record. If the record is full, one or more events are forced out of the record
into the adjacent record. The Events Cascade Counter is incremented each time an insertion
forces an event out of a record. This counter indicates how out-of-order events impact the
archive.

Events Read Counter


The Events Read Counter indicates the number of events read by all applications. For
example, if a trending application requests an array of events over a specified time period,
this counter is incremented for each event returned.

Read Operations Counter


The Read Operations Counter shows the number of archive read requests. Each archive read
request increments this count by one, regardless of the number of events returned.

Archive Memory Cache Counters


The Archive Subsystem uses a memory cache when handling events sent to the archive disk
file.

28
piartool Reference

During routine operation, the write cache is automatically flushed to disk at least every 15
minutes. Abrupt system shutdowns, such as power loss, should lose no more than the last 15
minutes of data. This time range may be changed through a configurable PITimeout table
parameter.
The data archive write cache architecture provides large performance gains over reading and
writing directly to disk. The cache even provides significant performance over the Operating
System file cache. As with all file cache designs, the disk image will often be slightly
inconsistent, and therefore archive backup cannot be performed without coordination with the
Archive Subsystem. The utility piartool –bs places the archive in a safe consistent state for
backups; piartool –be returns the archive to normal operation.
The cache consists of archive records loaded into memory. Cache Records Created is
incremented when memory is allocated for a new record.
When archive data is requested, as for example, when a user is trying to trend a point in PI
ProcessBook, the Archive Subsystem goes to the cache to retrieve the event data. If the
record is not there, the Archive Subsystem loads the record from disk to the cache; Archive
Record Disk Reads is incremented.
When writing events to the archive, they are stored first in memory. Unflushed Events
Counter indicates the total number of events not yet committed to disk. Unflushed Points
counter indicated the number of points with any number of events not yet committed to
disk.
Archive Record Disk Writes is incremented each time a record is written to disk. This occurs
during the regular cache flush every 15 minutes. It also occurs when the number of
un-flushed events for a point exceeds the configured maximum.
Cache Record Memory Reads is incremented for each read access.
Cache Clean Count indicates the number of records that were removed from the cache. The
archive cache contains a finite number of records. Old or low use records are removed from
memory to make room for most recently accessed records as needed; they are deleted when
unused for a certain length of time.
Cache Record Count is the number of records in the cache.

Primary Archive Number


The Primary Archive Number is an internal identifier and should be ignored. It is not to be
confused with the sequence number of the archive, as listed by piartool -al.

Archive Shift Prediction


The Archive Shift estimates the predicted time to the next archive shift. Use piartool –al to
list the target file of the archive shift. The target archive is initialized on shift; if it contains
data, make sure it is backed up. If this data is required to remain online, a new archive of
adequate size should be created and registered.
When the current archive is less then 20 percent full, the estimate is 0. In order to determine
whether a zero estimate means the archive is nearly full or not, run piartool –al. The message
indicates if there is not enough data for a prediction:

PI Server Reference Guide 29


Command-Line Utility Reference

Shift Time: Not enough information for prediction


The shift prediction in piartool –as differs slightly from the one in piartool –al. The piartool
–al figure is calculated at the time the call is made. piartool –as shows the average shift
prediction over the last 10 minutes. The latter number is available as a Windows Performance
Counter.

Archiving Flag
The archiving flag indicates whether events may be written to the archive; a value 1 indicates
events may be written, a value of 0, events may not be written. The Archiving Flag is set to 1
when there is a mounted Primary Archive. A Primary Archive may be registered but not
mounted, for example during an archive shift. In this case, the Archiving Flag would be set to
0. This flag is also set to 0 when in backup mode.
All registered archives may be viewed using piartool –al. The Archiving Flag is set to 0 if
the Primary Archive becomes full and there is no other archive file available into which to
shift. Note that the Primary Archive will never overwrite itself.

Archive Backup Flag


The Archive Backup Flag is set to 1 when the archive is in backup mode. Backup mode
indicates the archive file is in a consistent unlocked state and may be backed up. The value is
0 when the archive is available for normal access.

Archive Loaded Flag


The Archive Loaded Flag is 1 when a valid primary archive is mounted; 0 if the primary
archive is not mounted.

Shift or System Backup Flag


The Shift or System Backup Flag is 1 when the archive is in shift mode or the Archive
Subsystem has been placed in backup mode. Shifts occur automatically or you can force a
shift with piartool –fs. System backup mode is entered with piartool –systembackup.

Failed Archive Shift Flag


Failed Archive Shift Flag is set to 1 when a shift should occur but no potential archive shift
exists. Under normal conditions this flag is 0.

Overflow Index Record Count


The Overflow Index Record Count shows a number of index records. These records speed up
access to overflow records. Index records are created when two overflow records for a point
are full and third one is being created. This counter provides a measurement of archive file
consumption.

30
piartool Reference

Overflow Data Record Count


The Overflow Data Record Count shows a number of non-primary data records. Each archive
has a primary record for each point. When this record is full, data is written to overflow
records. This counter gives a measurement of archive consumption.

Monitor the Event Queue with piartool –qs

You should verify the proper sizing and functioning of the Event Queue, after you install or
upgrade PI Server, or backup the server after significant changes. The command piartool –qs
allows you to look at internal counters and statistics about the queue activity. For example,
you can determine if, and how fast, events are flowing through the queue.
1. Enter piartool –qs to list the Event Queue statistics every 5 seconds.
2. Review the output.
3. Compare the difference in the count in the column at the right margin to the count from
the previous 5 seconds. The counters are reset to 0 when the Archive Subsystem is
started.

Counters for 7–Aug–03 17:22:45 (C:\PI\dat\pimapevq.dat)


Physical File Size (MB): 64 0
Page Size (KB): 1024 0
Total Data Pages: 63 0
Write Page Index: 0 0
Read Page Index: 0 0
Total Page Shifts: 0 0
Available Pages: 63 0 (100.0%)
Average Events per Page: 40330 1
Estimated Remaining Capacity: 2540790 63 (2.2 hr)
Total Bytes Written (MB): 0 0
Total Event Writes: 14476 8007 (579/sec)
Total Event Reads: 14476 8007 (579/sec)
Current Queue Events: 0 0
Overflow Queues: 0 0
Total Overflow Events: 0 0
Current Queue Id: 0 0

4. Enter <Ctrl+C> to stop the output from piartool –qs.

Queue Size
The Physical File Size shows the current size of the Event Queue on disk; that is, the file
pimapevq.dat or any overflow queues.
The Page Size is the portion of the file that is loaded into memory for faster access.
The Event Queue is a circular buffer of pages and each page is a circular buffer of events.
That is, when a page is full, the Snapshot Subsystem tries to write into the next page and the
Archive Subsystem reads the pages in the same order they were written.

PI Server Reference Guide 31


Command-Line Utility Reference

The Total Data Pages shows the number of pages, obtained by dividing the Event Queue size
by the page size (minus one for the queue header).

Page Activity
The Write Page Index shows the page the Snapshot Subsystem is currently writing to.
Similarly, the Read Page Index indicates the page from which the Archive Subsystem is
reading. Under normal conditions, these two numbers are identical. If the Archive Subsystem
is not reading at the same pace the Snapshot is writing, page shifts will occur and the Total
Page Shifts counter will increment. At any time, the Available Pages counter shows how
many free pages are left in the current queue.

Queue Capacity
The Snapshot Subsystem maintains the number of Average Events per Page based on the
average size of all events. The subsystem uses this average to derive an Estimated Remaining
Capacity in number of events. This capacity is also shown by piartool –ss.
Total Bytes Written shows the volume of data that transmitted through the Event Queue since
the Snapshot Subsystem was last started.

Note: Configure your queue to hold a few days worth of data.

Event Rates
Every time the Snapshot sends an event to the archive, the Total Event Writes counter gets
incremented. Similarly, when events are read by the Archive Subsystem, the Total Event
Reads is incremented. The difference between these counts equals the total events per queue
and is shown by the Current Queue Events.

Overflow Queues
When the current queue is entirely full, the Snapshot Subsystem creates additional queue files
of the same size. The Overflow Queues and Total Overflow Events counters indicate how
many queues exist and how many events they hold. These counts are the same indicated by
piartool –ss.
The Current Queue Id shows the sequence number of the primary queue. This is always 0
under normal conditions.

Activity Grid

The Archive Subsystem provides a tool to monitor the rate of read-access to the Archive.
This tool creates, over a finite time period, a grid of activity. The grid provides an account of
connections and point activity. Start the activity grid to temporarily identify the connections
that present the greatest load on the system and the points that are being queried most often.

32
piartool Reference

Note: This monitoring requires significant computing resources and therefore is normally
turned off. Once the load on the system is identified, OSIsoft recommends that
you turn off the activity grid.

To start the activity grid:


piartool -aag start
To stop it, and remove all its memory:
piartool -aag stop
To temporarily stop the accounting yet allow querying of the current statistics:
piartool -aag pause
Each query requests the number of events retrieved or the number of retrieval calls made.
These can be arranged by points or by users. A yearly average might go through thousands of
events for a specified point, yet counts as a single call.
The following gets the number of events retrieved by point, from the time the activity grid
was started:
d:\pi\adm>piartool -aag point event
Name - Count - ID
SINUSOID 35 - 1
CDT158 100 - 3
CDM158 110 - 4
The following gets the number of event-retrieval calls, arranged by Connection ID:
d:\pi\adm>piartool -aag cnxn event access
Name Count ID
pidemo 3320 2

Specify an ID Conversion File (-id)

Use the -id option to specify an ID conversion file when you reprocess archives. For
example, when you move a PI archive to a different PI Server. The ID conversion file is a
binary file that maps the source archive point ID into the target system point ID. When the ID
conversion file is used, only points included in this file are converted.
This is always necessary when data is brought from another PI3 system.
The binary file is created from an input text using the piartool utility.
piartool -idci ID_conversion_input_file -idco
ID_conversion_binary_file
The ID_conversion_input_file is the full path and file name for the input text file.
The ID_conversion_binary_file is the full path and name for the binary file to be created.
piartool reports any point in the input file that does not exist in the target system.

ID Conversion Input File Format


Every record of the input file must have this format:

PI Server Reference Guide 33


Command-Line Utility Reference

Point ID, Recno, TagName


On a foreign PI3 system you can create this file as follows:
e:\pi\adm>piconfig
* (Ls - ) Piconfig> @table pipoint
* (Ls - PIPOINT) Piconfig> @ostru pointid, recno, tag
* (Ls - PIPOINT) Piconfig> @output pointidconv.txt
@ends

Note: The piartool -idci input file does not allow for comment characters. The comment
character (*) generated by piconfig must be removed.

Check Snapshot Values

To get a record dump of the Snapshot for a point, you use piartool -sd tagmask. For example,
to get the Snapshot information for sinusoid, you would type:
piartool -sd sinusoid
You would get back something that looks like this:
*** Point RecNo: 1, Tag: SINUSOID (1 / 1)
* Dump of Snapshot Record, Point ID: 1
-- Configuration:
type: Float32 (12), zero: 0, span: 100
archiving: 1, compressing 1, step: 0, filter code: 0
compression min: 0, max: 28800, deviation: 2
-- Security:
ACL ID: 2 [ 1:A(r,w)|5:A(r,w)|2:A(r) ]
-- Snapshot Event:
time: 16-Oct-09 17:04:48 (utc: 1255737888)
type: 12, value: S,O,A,S,Q [0,0,0,0,0]: 73.1651, 73.1651
-- Compressed Event:
time: 16-Oct-09 16:40:48 (utc: 1255736448)
type: 12, value: S,O,A,S,Q [0,0,0,0,0]: 81.8715, 81.8715
-- Compression State:
out-of-order: 1, compression slopes: -0.00743496, -0.00465718
updates: 0, 3ph: 0, buffered: 0
dirty: 1, bits: 0x8070c, delete pending snap/comp: 0/0
* End of Dump
*** 1 points successfully listed in 0.157 sec.

Note: You can also use the apisnap utility to check Snapshot values.

34
piconfig Reference
You can use the piconfig utility to maintain and configure PI Server databases such as the
Point Database and the Digital State table.
The piconfig command-line application runs on the PI Home node. You can work
interactively with piconfig or you may supply text files that contain commands and data. You
may use piconfig to configure point information in a spreadsheet or database tool, export it to
a text file, then apply it to the Point Database.
The piconfig utility can also be used for troubleshooting. For example, if you suspect that
you have some tags that are not configured correctly, you can search for tags that match a
certain list of attributes.

Summary of piconfig Commands and Parameters

Command Parameters Defaults Description


? None None Lists all commands
?atr None None Lists all attributes for current table
?tbl None None Lists all tables known to piconfig
Case Flag All (case- Sets case-sensitivity-ignore mode. Flag may be:
insensitive) Data, Names, or All.
This affects only timeout and firewall tables.
Cd Directory None Change directory for input/output files
Clear None None Clears Modify and Select specifications
Comchar C @ Changes the command character to c
Comment C * Changes the comment character to c
Delimiter C , Changes the delimiter to c
Echo Flag Data Specifies if input commands and data are echoed to
the output file. Flag may be: Data, Commands, All,
Verbose or None.
End-repeat None None Marks end of repeated field
Endrecord None None Terminates input of one data record. Required in
keyword format. May be used in other formats to
terminate input before all data fields were entered
Endsection None None Marks the end of processing section
Error File None Redirects error messages to file
Exit None None Exits piconfig. (Quit and Bye work the same way.)
Help None None Lists all commands
Input File None Redirects input from file.
Istructure Structure None Specifies format of input data.
Istype Flag D Selects input data format structure type: Fixed,
Delimited, or Keyword. (F,D,K)

PI Server Reference Guide 35


Command-Line Utility Reference

Command Parameters Defaults Description


Line N 1024 Inputs line buffer size
Login PI 3 node, PI None Connects to a remote PI 3 home node using the
username, given PIUser name, password, and TCP/IP port ID.
password, port
ID

localuser user name None Allows you to specify local user name when
CheckUtilityLogin Tuning Parameter is set to 1
(On).
localpass password None Allows you to specify local password when
CheckUtilityLogin Tuning Parameter is set to 1
(On).
Maxerr N 10 Sets the error tolerance. piconfig will exit when the
number of errors reaches n. However, piconfig
exits only when in non-interactive mode.
A Maxerr value of -1 causes piconfig to exit upon
the first error and display the line number of the
input file.
Mode Flag List Specifies mode of operation: Create, Edit, Delete,
List, Compare, Convert, Create, and Edit mode can
be modified to include both. Specify the mode flag
as Edit,t or Create,t.
For check only specify Edit,c or Create,c.
Modify Modification None Defines field modifications.
Ostructure Structure None Specifies format of output data. Only useful when in
list mode. A warning is issued if this command is
used in mode edit, create, or delete.
Ostype Flag D Selects output data format structure type: Fixed,
Delimited, or Keyword. (F,D,K)
Output File None Redirects output to file. If file is not specified, the
output is directed back to standard output.
Prompt Flag No Sets prompt mode: yes (for interactive sessions) or
no (for batch sessions)
Ptclassnam Classname Base Specifies the point class: base or classic. Pipoint
e Table only.
Quote C None Tells piconfig to enclose output fields with quote
Must be ' or “ character 'c' if they contain the delimiter character

Recsep Flag Yes Tells piconfig to separate multi-line output records


with a comment line.
Select Selection Key=* Defines record selection criteria.
Sigd N 5 In a number display, sets decimal digits (that is, the
number of digits below the decimal point) by setting
it to a number greater than or equal to 0, or
significant digits by setting to a negative number.
Status None None Reports piconfig current configuration: table, mode,
structure type, etc.

36
piconfig Reference

Command Parameters Defaults Description


Structure Structure None Specifies either input or output according to mode.
Output in list and convert modes. Input in all other
modes.
STYP Structure Type Delimited Sets structure type. Valid types are Delimited,
Keyword, and Fixed.
SYST System None Executes OS console command. For example “Syst
dir”
Table Table None Sets the PI table to Pipoint, Pids, etc.
Timformat Dig,TZ 5,F Time format. Number of decimals on sub-second
timestamps and whether or not to include time-zone
indication

How to Use Piconfig

Start and Stop piconfig


The piconfig utility is a console application. To start, enter piconfig at the command prompt.
$ piconfig
In general, piconfig should be used only when PI is running.
To end the piconfig session, use the exit command.
piconfig> @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: <"> Var:
<%>
Struc. Type IN: <Delim.> OUT: <Delim.>
Error count: 5 Max: 10 Last Error: Continue
Current table: <PIPOINT> Cur. Prim.: <#####> Def. Prim: < >
Nesting level : 0
Node: <127.0.0.1,piadmin>

Display Table Attributes


After you select a table, you may display the attributes of that table.
In this example, PIPOINT refers to the Point Database table. The first column shows the
attribute names and data types, the second column shows the default values, if any and the
third column, the values of the last retrieved record.
* (Ls - PIPOINT) piconfig> @?atr

1 - Tag String D: !#!#!# C:


2 - NewTag String D: C:
3 - archiving BYTE D: 1 C:
4 - changedate TimeStamp D: 31-Dec-0 9 16:00:00 C:
6
5 - changer String D: piadmin C:
6 - compdev Float32 D: 2 C:
7 - Compdevpercent Float32 D: 2 C:
8 - compmax Uint32 D: 28800 C:
9 - compmin Uint16 D: 0 C:
10 - compressing BYTE D: 1 C:
11 - creationdate TimeStamp D: 31-Dec-0 9 16:00:00 C:
6
12 - creator String D: piadmin C:
13 - DataAccess String D: o:rw g:r w:r C:
14 - DataGroup String D: piadmins C:
15 - DataOwner String D: piadmin C:
16 - datasecurity String D: piadmin: A(r,w) | pi C:
17 - descriptor String D: C:
18 - DigitalSet String D: system C:
19 - displaydigits BYTE D: -5 C:
20 - engunits String D: C:

PI Server Reference Guide 39


Command-Line Utility Reference

21 - excdev Float32 D: 1 C:
22 - Excdevpercent Float32 D: 1 C:
23 - excmax Uint32 D: 600 C:
24 - excmin Uint16 D: 0 C:
25 - exdesc String D: C:
26 - PointID Int32 D: 0 C:
27 - pointsource String D: Lab C:
28 - pointtype String D: Float32 C:
29 - PtAccess String D: o:rw g:r w:r C:
30 - ptclassid String D: 1 C:
31 - PtClassName String D: base C:
32 - ptclassrev String D: 1 C:
33 - PtGroup String D: piadmins C:
34 - PtOwner String D: piadmin C:
35 - ptsecurity String D: piadmin: A(r,w) | pi C:
36 - Recno Int32 D: 1 C:
37 - scan BYTE D: 1 C:
38 - shutdown BYTE D: 1 C:
39 - SourceTag String D: C:
40 - span Float32 D: 100 C:
41 - step BYTE D: 0 C:
42 - typicalvalue Float32 D: 50 C:
43 - zero Float32 D: 0 C:

Each of the table attributes can be viewed, set, or modified. Conceptually, each table in the
piconfig utility has several columns, where the column headers are the attributes. Each row is
a table record. For the PIPOINT table, each row corresponds to a particular tag.

RECORDS
piconfig views its tables as a collection of records. A record is a collection of fields or
attributes. One of these attributes is the primary key, which uniquely identifies the record
within the current table. This data representation is done for convenience and standardization.
It is not always an accurate image of the actual data.
Consider the following entries in the Snapshot table:
CDM158 Auto 14-Jun-03 10:39:34
SINUSOID 68.973 14-Jun-03 10:00:00
SINUSOIDU 11.184 14-Jun-03 11:04:00

40
piconfig Reference

In this example, there is a record for each Snapshot, and each record contains three attributes.
The attributes in this example are tag, value, and time.

PRIMARY KEY
Every record contains one attribute that is defined as the primary key, which uniquely
identifies the record. The primary key is the first attribute listed when using the ?atr
command.
When using the select command to specify a record, the primary key must always be used. If
it is not specified piconfig assumes * (all records). Other attributes may be selected in
conjunction.
For example, the primary key for the PI Point table is TAG. When selecting the subset of tags
with point source F, the primary key needs to be included as follows:
@select tag=*, pointsource=F

MODIFYING THE PRIMARY KEY


Most table attributes can be modified in edit mode, using modify and istructure commands.
The primary key is an exception. If you wish to change the primary key itself, you
must provide the new key value using a special attribute:
• Use the newtag attribute for the PIPOINT table
• Use the newset attribute for the PIDS table
For example, to rename the point sinusoid to mysinusoid, you would enter:
$ piconfig
* (Ls - ) piconfig> @table pipoint
* (Ls - PIPOINT) piconfig> @mode edit
* (Ed - PIPOINT) piconfig> @istructure tag,newtag
* (Ed - PIPOINT) piconfig> sinusoid,mysinusoid
The attribute for the new primary key is always:
newPrimary_Name

Note: Some tables do not support renaming of records, for example PIARC and PISNAP
tables. Tag is the primary key of these tables. Since Tag is actually a point
attribute, the rename must be down from the PIPOINT table. Other tables have
similar relationships.

Enter piconfig Commands


Once a table is selected, the next step is to use piconfig commands to retrieve and possibly
change the data in the table.
There are also piconfig commands that change the operational mode of piconfig. For
example, you can use the modify command to change from list mode (read only) to
create mode, delete mode, or edit mode.
To see a list of piconfig commands, use the help command, as shown:

PI Server Reference Guide 41


Command-Line Utility Reference

* (Ls - PIPOINT) piconfig> @help


*piconfig> ? - This menu
*piconfig> BYE - Exit piconfig
*piconfig> CASE - Case sensitivity
*piconfig> CD - Change working directory (for in/out files)
*piconfig> CLEA - Clear selection and modifications specs
*piconfig> COMM - Define comment character
*piconfig> COMC - Set the command character
*piconfig> DATA - Input data (redundant)
*piconfig> DELI - Set delimiter character
*piconfig> ECHO - Define echo: Data, Command, All, None
*piconfig> ENDR - Mark end-of-record
*piconfig> END-REPEAT - Mark end of data repetition
*piconfig> ENDS - End of processing section
*piconfig> ERROR - redirect error
*piconfig> EXIT - Exit piconfig
*piconfig> HELP - This page
*piconfig> INPU - redirect input
*piconfig> ISTR - Define input structure
*piconfig> ISTY - Input structure type
*piconfig> LINE - Increase input-line length
*piconfig> LOGI - Connect to another PI host
*piconfig> MAXE - Maximum errors allowed
*piconfig> MODE - Mode: Create, Edit, List, Compare, Convert, Delete
*piconfig> MODI - Modification specs
*piconfig> OUTP - redirect output
*piconfig> OSTY - Output structure type
*piconfig> OSTR - Define output structure
*piconfig> PROM - Prompt user for input
*piconfig> PTCL - Default Point class
*piconfig> QUIT - Exit piconfig
*piconfig> QUOT - Set Quotation character
*piconfig> RECS - Record separator Yes/No
*piconfig> SELE - Select (must include primary key specs.)
*piconfig> SIGD - Set number of significant digits for real numbers
*piconfig> STAT - Show current status: table, mode etc...
*piconfig> STRU - Define structure (input/output depending on mode)
*piconfig> STYP - structure type Delimited, Keyword, Fixed
*piconfig> SYST - Execute any OS command: dir, notepad, ps...
*piconfig> STYP - structure type Delimited, Keyword, Fixed
*piconfig> TABL - Set table (?TBL- to see all tables)
*piconfig> TIMF - Number of decimal digits and Time zone name in
timestamps
*piconfig> WAIT - Number of seconds delay - use for piconfig scripts
* (Ls - PIPOINT) piconfig>

Example: Listing Point Information


In this example, points are selected where the attribute tag starts with the letter S and have
the point source R. R is the default point source for the random interface. All the tags that
match these criteria will have their tag, point source, and point type displayed.
$ piconfig
* (Ls - ) piconfig> @table pipoint
* (Ls - PIPOINT) piconfig> @mode list
* (Ls - PIPOINT) piconfig> @stype delimited

42
piconfig Reference

* (Ls - PIPOINT) piconfig> @ostructure tag, pointsource, pointtype


* (Ls - PIPOINT) piconfig> @select tag=s*, pointsource=R
* (Ls - PIPOINT) piconfig> @endsection
SINUSOID,R,Float32
SINUSOIDU,R,Float32
SQF100,R,Float32
SQF101,R,Float32
* (Ls - PIPOINT) piconfig>
*> @exit
0 Data lines
7 Command lines
0 Records in error
4 Records Listed
Select the table that you want to view when you begin. In this case, select the PIPOINT table
to view the Point Database. The other commands are explained in the following sections.

Select a piconfig Mode


Within piconfig, there are six possible working modes, as follows:
(Ls) List mode (read only) Output formatted records from a table to screen or file
(Cr) Create mode (add) Create new records in a table
(Ed) Edit mode (modify) Modify or rename existing records
(Dl) Delete mode Delete records from a table
(Cv) Convert mode Convert input data from one format into another
(Cm) Compare mode Compare file data to table data

Combine Create and Edit Modes


Enter the character t, for true, with either create or edit mode to combine the modes; use
these combined modes to modify existing records and create non-existent records
simultaneously:
@mode create, t
@mode edit, t
The specified mode persists until the next mode command is issued.

Use the Check Only Modifier


Enter the character c, for check, with either create or edit mode to combine these modes
without making changes to the PIPOINT table:
@mode create, c
@mode edit, c

Note: The check-only modifier applies only to the PIPOINT table. For all other tables,
this mode is identical with the normal edit or create mode.

PI Server Reference Guide 43


Command-Line Utility Reference

Use this mode to validate points and report errors, but not make changes to the Point
Database.
Check mode can also be specified for create/edit.
@mode create, t, c
@mode edit, t, c
The specified mode persists until the next mode command is issued.

Data Structure Type


The structure type (stype) indicates the format of the data structure used to specify input
and output.
The possible structure types are:
• Delimited
• Fixed
• Keyword
The default structure type is delimited format.
If you want to specify an output structure type that differs from the input structure type, use
the ostype and istype commands instead of the stype command.
The specified structure type persists until the next stype, ostype, or istype command.

Structure Specifications Persistence


Structure specifications for both input and output remain in effect until the table is changed.
Before any data is processed, new structure specifications are added to previous
specifications. After some data was processed, new structure specifications replace the
previous ones.
You can check which structure specification is in effect as follows:
@ostructure ?
@istructure ?

Delimited Format
In delimited format, one or more lines of comma-separated attributes describe the format of
the data. One or more lines of comma-separated data values follow. These lines correspond to
the attributes. For example:
@istructure tag, pointsource,pointtype
SINUSOID,R,FLOAT32

Note: The command character @ distinguishes commands from data; Commands


must be preceded by @, or piconfig will interpret the string as data.

44
piconfig Reference

CHANGE THE DELIMITER


The default delimiter character is a comma ( , ). You may change the delimiter character to
be any single (non-alphanumeric) character. For example, use the delimiter command to
change the delimiter character to backslash ( \ ):
@delimiter \

Note: The same delimiter character is used between piconfig attributes, between
elements of a piconfig command and between both input and output data fields.

Fixed Format
In fixed format, data structure includes one or more lines specifying the attribute, line
number, starting position on the line (counting from 1), and field width. For example:
@istructure tag, 1, 1, 12
@istructure pointsource, 1, 14, 1
@istructure pointtype, 1, 19, 7
*
*234567890123456789
SINUSOID R FLOAT32
NEXTPOINT Lab FLOAT16

Note: The lines starting with the asterisk (*) are comment lines and are ignored.
Their only purpose is to improve readability.

The format lines come first and are all grouped together. This defines a record. If there are
more data lines than are specified in the record, piconfig interprets these as additional records
of the same format.

Note: Fixed format is also used in the OpenVMS PI System PIDIFF utility.

CHANGE THE COMMENT CHARACTER


You may configure the comment character to be something other than an asterisk. To do this,
use the comment command (comm).

Keyword Format
In keyword format, every input line contains only two parts: the attribute and the value for
that attribute, separated by the delimiter character. The default delimiter character is a
comma ( , ).
The istructure command is not used with this format, as each line contains both data and its
description. For example:
tag, SINUSOID
pointsource, R
pointtype, FLOAT32

PI Server Reference Guide 45


Command-Line Utility Reference

To select output attributes in keyword format, use the ostructure command. A single
attribute is specified on each line, as shown below:
@ostructure tag
@ostructure pointsource
@ostructure pointtype
To output all attributes for the current table, enter:
@ostructure *
This works in both keyword and delimited formats.

Note: The command @ostructure is meaningful only in list mode. A warning is issued if
this command is executed in create, edit or delete mode.

Select Database Records


The select command is used to select the records of interest. Any combination of attributes
may be used. In list mode only, the primary key specification defaults to * (all records). In
edit or delete modes the primary key must be included in select specifications. A record must
match all selection criteria to be selected.
Select specifications remain in effect until the mode or table is changed. Until a command is
processed, select specifications are added to previous specifications. After that, a new select
specification replaces the previous ones.
You can check the select specifications in effect at any time as follows:
@select ?

Operators
Use following comparison operators for the select command:
• equal
• <> not equal (!= also works)
• greater than
• >= greater than or equal to
• less than
• <= less than or equal to
These operators can be used for date, numeric or text fields. Text comparison is based on
ASCII values.

Wildcards
Wildcards, * and ?, may be used in text fields. * matches all characters; ? matches a single
character.

46
piconfig Reference

Display Repeating Attributes


Structure specifications may contain table attributes followed by an ellipsis (…). The ellipsis
indicates that the last attribute may be repeated a variable number of times within a single
record. If the ellipsis (…) is on a separate line, it indicates that the last (previous) structure
line may be repeated a variable number of times.
In most cases, Delimited format is more suitable for repeatable attributes.
In fixed format only complete lines can be repeated. A single field cannot be repeated on the
same line in fixed format because its field length is fixed.
The ellipsis construct can be used for both input and output.

Use the Ellipsis Construct (…)


List multiple states in the MODES state set in comma-separated format.
* (Ls - PIDS) piconfig> @ostructure set,state,...
* (Ls - PIDS) piconfig> @select set=modes
* (Ls - PIDS) piconfig> @endsection
MODES,Manual,Auto,Cascade,Program,Prog-Auto
The ellipsis is useful where the same attribute can occur more than once in a single record.
For example, a state set contains variable number of states. A point class contains a variable
number of attributes and their defaults.

Trigger Record Processing


The endsection command triggers the processing of selected records. It is not always
necessary to use an endsection command. An endsection is assumed when the end of file is
reached or when a command follows lines of data.
When an input structure is specified, every record is processed as data is entered.
The following example demonstrates how processing occurs in both ways:
d:\pi\adm>piconfig table pisnap
* (Ls - PISNAP) piconfig> ostru tag,value,time
*> ostru tag,value,time
* (Ls - PISNAP) piconfig> @sele tag=sinusoid
* (Ls - PISNAP) piconfig> @ends
SINUSOID,86.71634,20-Nov-02 16:25:30
* (Ls - PISNAP) piconfig> @istru tag
* (Ls - PISNAP) piconfig> sinusoid
*> sinusoid
sinusoid,86.71634,20-Nov-02 16:25:30

Exit
Exit is the command that terminates the piconfig session. It is not necessary to use this
command when running piconfig in batch mode because the end of file causes piconfig to
execute the current commands and then exit. Quit and Bye have the same effect.

PI Server Reference Guide 47


Command-Line Utility Reference

Batch Methods

Prepare Input Files


Entering commands by hand in interactive sessions can be prone to errors. It is often easier to
enter the commands in a text file, save it, and then use that file as input to later piconfig
sessions. This is particularly useful for maintaining the point database using a spreadsheet.
Comments can be added to the text file for better readability.
For example, suppose you decided to list points with names starting in S and
pointsource=R, including tagname, pointsource and pointtype. You could specify
delimited output structure.
To do all this, you could prepare and save an ASCII file named list.inp:
* list.inp *
* This piconfig script file lists the tagname, pointsource,
* and pointtype for all tags that start with "S" and
* that have point source R
*
@table pipoint
@mode list
@stype delimited
@ostructure tag, pointsource, pointtype
@select tag=s*, pointsource=R
@endsection
Start piconfig and run this input file using the input command:
$ piconfig
4 (Ls - ) piconfig> @input list.inp
The following output is generated:
SINUSOID,Float32,R
SINUSOIDU,Float32,R
SQF100,Float32,R
SQF101,Float32,R
4 (Ls - PIPOINT) piconfig>

Pass an Input File as a Parameter


An alternative is to pass the input file as a parameter on the command line. The piconfig
utility takes each pair of input parameters and treats the first as a command and the second as
the command parameter:
$ piconfig input list.inp
SINUSOID,Float32,R
SINUSOIDU,Float32,R
SQF100,Float32,R
SQF101,Float32,R
4 (Ls - PIPOINT) piconfig>

Redirect an Input File


Another alternative is to use the standard redirection from the command line:
$ piconfig < list.inp

48
piconfig Reference

SINUSOID,Float32,R
SINUSOIDU,Float32,R
SQF100,Float32,R
SQF101,Float32,R
piconfig 0 Data lines
6 Command lines
0 Records in error...
4 Records Listed
Input files may contain all data, all commands, or mixed commands and data. Input files may
be nested; that is, an input file can refer to other input files.

Capture Output and Errors in Files


The piconfig utility output and errors are displayed by default on the computer screen. Use
the output and error commands to redirect this output in a file.
$ piconfig
*>@output list.out
*>@error errors.out
By default piconfig echoes the input commands and input data in the file, as well as the
output data. If you wish to see only the output data in the file, use the echo command with the
data option:
*> @echo data

Pass Commands as Parameters


You can pass the commands on the piconfig command line. piconfig takes each pair of input
parameters and treats the first as a command and the second as the command parameter:
$ piconfig output list.out input list.inp

Redirect Output
An alternative is to use standard redirection from the command line:
$ piconfig < list.inp > list.out

Reuse an Output File as an Input File


Redirecting the output to a file is very useful because you can reuse the output file as an input
file with other piconfig commands. For example, suppose you want to create a tag that is
similar to another tag that already exists on the PI Server. For example, the tagname and the
hardware address are the only differences; the descriptor, zero, span, pointtype, pointsource,
and engineering units are the same.
To reuse an output file as an input file, list all of the point attributes of the existing tag to a
file. Then use a text editor to modify the tagname and hardware address. Use the file as input
to piconfig to create the new tag.

PI Server Reference Guide 49


Command-Line Utility Reference

Security on piconfig Sessions


Users of the piconfig utility can be required to login into the PI database by specifying a user
name and a password. This option is turned on by setting the PI Server Tuning Parameter
CheckUtilityLogin to 1.
By default this option is off.

Remote piconfig Sessions


The piconfig utility running on one PI Server or PI SDK node may connect a PI Server
running on a different computer. There are two ways to do this.

Use the Login Command to Change to Another Server


If you already have a piconfig session in progress, you can switch to a different PI Server
using the login command. The login command takes four parameters:
1. Remote PI Server host name, or IP address
2. Remote PI Server user name
3. Remote PI Server password
4. Remote PI Server port ID (usually 5450)
For example;
@login figaro, piadmin, myadminpassword, 5450
Once the login command is issued, all subsequent commands are executed on the remote PI
Server.

Run piconfig on a Remote Connection


To run the piconfig utility remotely, enter the option -node with these parameters:
• 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 PIUser account
name and -password password.

• Utility argument
For example, to use Windows authentication:
piconfig -node pi380tst -Windows
To authenticate with an explicit login:

50
piconfig Reference

piconfig –node pi380tst –explicit –username piuser –password march380


-al
You can also use the option -remote to run piconfig remotely. For example:
piconfig -remote
Enter these connection parameters when prompted:
ο PI Server home node host name or IP address
ο Port ID (defaults to 5450)
ο PIUser account name
ο PIUser account password
To enter the connection parameters when you start the utility:
piconfig -remote pi380tst -port 5450 -username piuser -password
march380

Note: You may specify the parameters -port, -username and -password in any order,
after -remote.

If you are passing any piconfig arguments on the command line, enter them before the
-remote option. For example:
piconfig input piarc.dif -remote -node figaro -port 5450 -username
piadmin -password myadminpassword

PI Server Tables

These are the PI tables that can be viewed and edited with piconfig:
Database Table Names Primary Key
Points PIPOINT TAG

Digital states PIDS SET

Digital State Strings PISTATE STATE

Users PIUSER USER

Groups PIGROUP GROUP

Snapshot PISNAP or PISNAP2 TAG

Archive PIARC TAG

Database Security DBSECURITY DBName

Batch Unit PIBAUNIT UNITNAME

Batch Alias PIBAALIAS ALIAS

Collective PICOLLECTIVE NAME

PI Server Reference Guide 51


Command-Line Utility Reference

Database Table Names Primary Key


Trust Logins PITRUST TRUST

Firewall PIFIREWALL HOSTMASK

Timeout Database PITIMEOUT NAME

Attribute Sets PIATRSET SET

Point Classes PIPTCLS CLASS

Point Source PIPTSRC PTSRC

PI Subsystem Information PISUBSYS,subsystem Not Applicable


PI Subsystem Statistics PISUBSYSSTATS,subsystem Not Applicable
PI Net Manager Statistics PINetMgrStats ID
Subsystem Threads PITHREAD,subsystem ID
Server PISERVER NAME
PI Identities PIIDENT Identity
PI Identity Mappings PIIDENTMAP IdentityMapping
Batch PIBATCH HANDLE

Note: As of release 3.3, the Proxy Database is no longer in use. During upgrade, its
contents are converted to PI Trust Database records.

Archive Table (PIARC)


The Archive table provides access to the PI Data Archive. The Archive is an historical record
of values for each point in the Point Database. The Archive contains the time-stamped values
for all the points in the Point Database, stored in a set of files. Events can be listed, added,
modified, and deleted.
The table name is PIARC. The primary key is TAG.
The following attributes are defined:
Attribute Description Comment
TAG the tagname (read only)
PointID the point ID (read only)
Type the point type (float32 …) (read only)
Value
TIME Event timestamp in the format DD-MMM-YY
hh:mm:ss.ssss
TimeNum Timestamp as a number in seconds past 01-Jan-70 (read only)
Status the value status (read only)
Flags (Q)uestionable (M)odifed (A)nnotated Only Q is read/write

52
piconfig Reference

Attribute Description Comment


Annot Annotation
NewValue New value for specific replacement

These attributes are the same as the PISNAP attributes. In addition there are some auxiliary
attributes that affect retrieval and editing:
Attribute Description
Count Maximum number of events to retrieve in list mode
Mode Archive editing mode (page 54)
Starttime Start time for events retrieval
Endtime End time for events retrieval

Starttime and endtime can define both a forward and a backward search.
Events can be added to the Snapshot using the PIARC table. Events are placed in the
Snapshot if they are more recent than the current Snapshot event; otherwise, they bypass
compression and go straight to the Archive according to the archiving mode specified. When
a new Snapshot event is stored, the previous Snapshot event is sent to the archive,
compressed according to the compression specifications.

List Mode Attribute for Piarc


In list mode, the PIARC table mode attribute can be one of the following:
Attribute Description
COMP Compressed events
EVEN Interpolated events. The number of evenly spaced events returned between
starttime and endtime is given by the “Count” parameter.

List Archive Values


The piconfig input file PI\adm\piarc.dif is provided with every PI Server. It is a quick
way to view archive data using piconfig:
@input piarc.dif
Next, enter data with the format:
tagname, starttime, endtime, count
For example, to view four hours of data for the tag sinusoid, with a maximum of 100
values, enter:
@input piarc.dif
sinusoid, *-4h, *, 100
@endsection
The PIARC table can be used also to view interpolated data by specifying the “even” mode.
In this example, five evenly spaced values will be retrieved:
* (Ls - PIARC) piconfig> @table piarc
* (Ls - PIARC) piconfig> @istru tag, starttime, endtime, count, mode

PI Server Reference Guide 53


Command-Line Utility Reference

* (Ls - PIARC) piconfig> @ostr value,status,time


* (Ls - PIARC) piconfig> @ostr ...
* (Ls - PIARC) piconfig> sinusoid,*,*-4h,5,even
*> sinusoid,*,*-4h,5,even
71.32876,GOOD,20-Nov-02 17:52:51
77.07982,GOOD,20-Nov-02 16:52:51
Digital State,Shutdown,20-Nov-02 15:52:51
Digital State,Shutdown,20-Nov-02 14:52:51
Digital State,Shutdown,20-Nov-02 13:52:51
* End Repeat...

Edit Mode Attribute for PIARC Table


In edit mode, the MODE attribute can be one of the following:
Attribute Description
noreplace add unless event(s) exist at same time (PI 2.x)
append add event regardless of existing events
replace add event, replace if event at same time
replacex Replace existing event (fail if no event at time)
replaceSp Replace a specified value when multiple values at the same time
remove Remove existing event
appendx as append + no compression; that is, if this is the Snapshot, force into Archive

Note: Do not confuse the PIARC table MODE attribute with the piconfig mode command.
To delete archive events, use the PIARC table MODE attribute=remove in
piconfig edit mode.

Change and Delete Events in PIArc Table


The following commands can be used to add, edit, and delete events.
In remove mode, both value and time must exactly match the existing event. If the timestamp
contains sub-seconds, it might be necessary to expand time resolution with the timf command
in order to make an exact match. See Use the TimeFormat Command (page 56) for details.
Similarly, the number of decimal digits might need to be increased for floating point values
using the sigd command.
@table piarc
@mode edit,t
@istructure tag, value, time, mode
string1,some text,11:45, append
realtag,12.5,10:44, replace
inttag, 10, t, remove
When adding a new archive event with the edit modes above, you must use:
@mode edit,t
or
@mode create,t

54
piconfig Reference

The piconfig selection and modification may be used. For example one might create an input
file (input.txt) with the following command lines
@istructure tag, starttime, endtime, count
@ostructure tag, value, status, time
@ostructure ...
@output labevents.txt
labtag,t,y,100
then redirect this input file into piconfig in order to list some events to an output file called
labevents.txt:
* (Ls - PIARC) piconfig < input.txt
Now one can change or delete all these events. For example:
@mode edit
@istructure tag, value, status, time
@modify value*= 1.1, mode=replace
@input labevents.txt
This will increment all the previously selected events by 10%.
To delete all events for a specified time range (last 7 days in this example) for a given tag you
can place the script below in a file called delevents.dif. The script in this example will
delete up to 10000 events, but this value can be changed in the script.
@table piarc
@mode list
@istructure tag, starttime, endtime, count
@ostructure tag, time, value
@ostructure ...
@timf 9
@sigd 9
@output tmpdelevents.dat
%1%,%2%,%3%,10000
@output
*@exit - uncomment this to exit and review before deleting
@mode ed,t
@modify mode=remove
@istructure tag, time
@input tmpdelevents.dat
@exit
Then invoke piconfig as follows:
* (Ls - PIARC) piconfig input delevents.dif,mytag,t-7d,t
It is important that no spaces be included between parameters, so that the input file and it's
parameters are taken as one parameter.

Change Events when there are Multiple Events at the Same Time
The following commands show how to modify a specific value out of several at the same
time using replacesp mode. Note the use of NewValue attribute.
The replace mode would cause the last value at the time to be replaced.
* (Ed - PIARC) PIconfig> @input piarc.dif

PI Server Reference Guide 55


Command-Line Utility Reference

* (Ls - PIARC) PIconfig> rpflt1,*,y,100


*> rpflt1,*,y,100
123.,GOOD,24-Jun-03 17:43:01
1123.,GOOD,24-Jun-03 01:00:00
112.,GOOD,24-Jun-03 01:00:00
11.,GOOD,24-Jun-03 01:00:00
1.,GOOD,24-Jun-03 01:00:00
* End Repeat...
* (Ls - PIARC) PIconfig> @mode edit,t
* (Ed - PIARC) PIconfig> @istru tag,value,newvalue,time,mode
* (Ed - PIARC) PIconfig> rpflt1,11,0.11,t+1h,replacesp
*> rpflt1,11,0.11,t+1h, replacesp
* (Ed - PIARC) PIconfig> @input piarc.dif
* (Ls - PIARC) PIconfig> rpflt1,*,y,100
*> rpflt1,*,y,100
123.,GOOD,24-Jun-03 17:43:01
1123.,GOOD,24-Jun-03 01:00:00
112.,GOOD,24-Jun-03 01:00:00
0.11,GOOD,24-Jun-03 01:00:00
1.,GOOD,24-Jun-03 01:00:00
* End Repeat...

Use the TimeFormat Command


The TimeFormat command can be used to adjust the number of sub-second digits displayed
in timestamps, and whether or not time zone information is displayed. The default number of
sub-second digits to display is 5. No time zone information is normally displayed. This
command affects the display of timestamps from the Snapshot and Archive only.
To set the number of sub-second digits to 4 and turn on time zone information display, you
would enter the command:
@timf 4,t
The time zone information displayed with every Snapshot and archive timestamp is the short
label of time zone and current standard/daylight status. For example, in Pacific Standard
Time, this label would be PST. You can check the labels for your time zone with the pidiag
-tz command.
If you issue the timeformat command with the number of sub-second digits only, time zone
information display is turned off.

Use Sub-second Timestamps


You can put events with sub-second timestamps in the Snapshot and Data Archive using the
piconfig utility. The Time attribute has the format
DD-MMM-YY hh:mm:ss.sssss
The Timenum attribute is the equivalent floating point representation of the time in number
of seconds past January 1, 1970 00:00:00.0000. The archive preserves the timestamp with
accuracy of 15.25 microseconds.

Note: The default time accuracy of 5 digits might compromise a sub-second time-stamp.
Expand to 6 or 7 digits before editing or deleting such events.

56
piconfig Reference

Use Annotations
Since PI Server 3.3, piconfig supports annotation to archive values, in both PISnap and
PIARC tables. We recommend using piconfig only for reading annotations. Annotations
should be added using PI SDK applications that are designed for that purpose.

Attribute Set Table (PIATRSET)


The Attribute Set table contains sets of attributes used to build point classes. An attribute
defines a point attribute; it is comprised of a name, data type and default value. An attribute
set contains a list of attributes. Attribute sets are the building blocks of point classes. Point
classes are made up of a list of attribute sets.

Note: Changing existing attribute sets - except for changing default values, should be
done with great care, in standalone mode.

The table name is PIATRSET. It has the following attributes:


Attribute Description
SET name of attribute set
ATTRIB Attribute name; a set has many of these
DEFAULT Default value of the attribute
TYPE... Data type of the attribute. For example, String, Float32

Note: An attribute set has many of the “Attrib, Default, Type” triplet. The ellipsis (…)
following “TYPE” indicates those three may be repeated.

The following piconfig session demonstrates listing the attribute sets on the PI Server:
* (Ls - PIATRSET) PIconfig> @table piatrset
* (Ls - PIATRSET) PIconfig> @ostr set
* (Ls - PIATRSET) PIconfig> @ends
*PIConfig Err> Wild-card specs. missing, default to '*'.
alarmparam
base
classic
sqcalm_parameters
totals
* (Ls - PIATRSET) PIconfig>
Now listing the entire classic then base attribute sets; note use of the ellipsis to repeat the
output:
* (Ls - PIATRSET) PIconfig> @table piatrset
* (Ls - PIATRSET) PIconfig> @ostr attrib, default, type
* (Ls - PIATRSET) PIconfig> @ostr ...
* (Ls - PIATRSET) PIconfig> @istr set
* (Ls - PIATRSET) PIconfig> classic
*> classic
location1,0,Int32

PI Server Reference Guide 57


Command-Line Utility Reference

location2,0,Int32
location3,0,Int32
location4,0,Int32
location5,0,Int32
filtercode,0,Int16
squareroot,0,Int16
totalcode,0,Int16
convers,1.,Float32
srcptid,0,Int32
instrumenttag,,String
userint1,0,Int32
userint2,0,Int32
userreal1,0.,Float32
userreal2,0.,Float32
* End Repeat...
* (Ls - PIATRSET) PIconfig> base
*> base
descriptor,,String
exdesc,,String
typicalvalue,50.,Float32
engunits,,String
zero,0.,Float32
span,100.,Float32
pointtype,12,UBYTE
pointsource,Lab,String
scan,1,BYTE
excmin,0,Uint16
excmax,600,Uint32
excdev,1.,Float32
shutdown,1,BYTE
archiving,1,BYTE
compressing,1,BYTE
step,0,BYTE
compmin,0,Uint16
compmax,28800,Uint32
compdev,2.,Float32
creationdate,31-Dec-69 16:00:00,TimeStamp
creator,0,Uint16
changedate,31-Dec-69 16:00:00,TimeStamp
changer,0,Uint16
displaydigits,-5,BYTE
* End Repeat...
Users familiar with classic PI Points will recognize all these attributes. These two attribute
sets, Classic and Base, make up the classic point class.

Batch Table (PIBATCH)


The PI Batch Table is the database for the PI Batch objects such as PI Campaigns, PI
Batches, PI UnitBatches, and PI Transfer Records. This database is independent of the
PI Batch Subsystem and the databases it maintains. The PI Batch Table is actually part of the
PI Archive and is therefore maintained by the PI Archive Subsystem. The Batch Subsystem
records information about each batch in this table, whether the batches are in progress or

58
piconfig Reference

terminated. See the PI Server Applications Guide for details on how to access data in this
table.
The table name is PIBATCH. The primary key is Handle. It is rarely used in batch searches.
The following attributes are defined:
Attribute Description
UnitName Unit name to search
Handle Unique identifier for a single batch entry
BID Batch ID
ProdID Product ID
StartTime Batch start time
StartStatus Status of batch start time
StopTime Batch end time
StopStatus Status of batch end time
BIDsearch Wild card search string for batch IDs
ProdIDsearch Wild card search string for product IDs
SearchStart Time to search from
SearchStop Time to search to
Count Maximum number of batches to retrieve
NEWUnitName Changing the unit on which a batch is run by altering attribute is not supported.

Note: The PI Batch Subsystem refers to the older PI Server Batch support. The PI
Module and PI Batch Database approach is replacing the PI Batch Subsystem.
Refer the PI SDK Help files for details about the Module and Batch Databases.

Batch Alias Table (PIBAALIAS)


Aliases are defined and maintained by the PI Batch Subsystem. An alias is used to define a PI
tag that corresponds to an attribute (generally, the name of some measured quantity) of a
process unit. The table is simple-it consists of two columns-an alias name and a PI tag name.
The alias name has two components: a unit name and an attribute name. Alias syntax is:
\\unit name\common name
For example:
\\Reactor1\temperature
The unit name must be a defined PI Batch unit, that is, an entry for it must exist in the
PIBAUNIT Table. The PI tag name must also be valid.
See the PI Server Applications Guide for details on how to manage data in this table.
The table name is PIBAALIAS. The primary key is Alias.

PI Server Reference Guide 59


Command-Line Utility Reference

Attribute Description
Alias Unit name and attribute. The syntax for alias names in this table is:
\\unitname\attribute.
Tag PI tag corresponding to the attribute.
NEWAlias Used to rename an existing alias.

Batch Unit Table (PIBAUNIT)


The Batch Subsystem monitors batches that run on units in a manufacturing plant. This table
contains configuration of the units. See the PI Server Applications Guide for details on how
to manage data in this table.
The table name is PIBAUNIT. The primary key is Unitname.
The following attributes are defined:
Attribute Definition
UNITNAME Defines the UNIT name. UNITNAME is the primary index of the PIBAUNIT
table.
Cannot include the \ character.
NEWUnitName Used to rename an existing unit.
ActiveTag PI Tag which indicates batch activity on Unit.
ActiveType Interpretation of ActiveTag values. Pulse, the default, starts on batch on
transition from 0 to 1 or greater. Step, starts a new batch on any value
change.
BIDEXPR Defines an expression consisting of PI Tags and text to generate a
BATCHID when a batch begins on a unit.
The value of the evaluated expression cannot contain a \ character.
DataAccess Security attribute, which specifies access to batches created on the unit.
DataGroup Group membership of the batches created by the unit.
DataOwner Owner of batches created by the unit.
Description Description of unit.
EvalDelay Specifies delay, from batch start, before evaluating product and batch ID
expressions.
MergeConsecutive If non-zero, treats short batch stop and restarts as one contiguous batch.
PRODEXPR Defines an expression consisting of PI Tags and text. This expression is
used to generate a PRODUCT name when the batch begins on a unit.
The value of the evaluated expression cannot contain a \ character.
UnitAccess Security attribute, which specifies access to the unit.
UnitGroup Unit group membership.
UnitOwner Unit owner.

Collective Table (PICOLLECTIVE)


Several PI Servers can be configured for replication and provide High Availability (HA) and
Load Distribution. This grouping of PI Servers is called a Collective. The Server and

60
piconfig Reference

Collective Tables store configuration information about the Collective, as well as status
information for each member of the Collective.
The PI Collective Table has information about the name of the Collective, the CollectiveID,
the description of the Collective, and the status of the Collective. Since a server can belong to
only one Collective at a time, only one entry is normally found in this table.
If the status of the Collective is good, this indicates that the status of every member of the
Collective is good. If the status is bad, this generally indicates that at least one member of
the Collective has a bad CommStatus or SyncStatus.
The collective name is used to link the entries in the PIServer table to the PICollective table.
Every PI Server presents the Collective ID as the Server ID to each application using the PI
SDK to connect to a server in the collective. This allows all displays and applications that
depend on the Sever ID to connect to any PI Server in the collective without change. For
information on how to configure the PIServer and PI Collective tables, see High Availability
and PI Server Replication.
Attribute Description
Name The name of the collective that the server belongs to; must
match collective name defined in the PIServer table
CollectiveID A UID representing the unique PI Collective identification
Description Optional description for the collective
LastCollectiveConfigChangeTime Last time stamp for change in collective configuration
Status The status of the collective (0 is good)
NewName Used to rename an existing collective

Database Security Table (DBSECURITY)


Database level security controls the access rights of users and groups to the various system
databases; for example, create a point. Earlier releases required user piadmin to edit a
database.
Database security is accessed through the DBSecurity table. This is a general database
security table; its structure applies to all databases. The record structure looks like this:

PI Database Security Table Attributes

Attribute Description
DBName Database name
Access Security attribute, which specifies access to the table
Group Group name
Owner PI user name declared to be the owner of the table. Defaults to Piadmin.
Security Access control list which specifies access to the table
status

The following examples show how to access and modify the DBsecurity table.
C:\pi\adm>PIconfig table dbsecurity
* (Ls - DBSECURITY) PIconfig> @ostru dbname, owner,group,access

PI Server Reference Guide 61


Command-Line Utility Reference

* (Ls - DBSECURITY) PIconfig> @ends


*PIconfig Err> Wild-card specs. missing, default to '*'.
PIARCADMIN,piadmin,piadmins,o:rw g:r w:r
PIARCDATA,piadmin,piadmins,o:rw g:r w:r
PIBatch,piadmin,piadmins,o:rw g:r w:r
PICampaign,piadmin,piadmins,o:rw g:r w:r
PIDBSEC,piadmin,piadmins,o:rw g:r w:r
PIDS,piadmin,piadmins,o:rw g:r w:r
PIHeadingSets,piadmin,piadmins,o:rw g:r w:r
PIModules,piadmin,piadmins,o:rw g:r w:r
PIPOINT,piadmin,piadmins,o:rw g:r w:r
pisnapss,piadmin,piadmins,o:rw g:r w:r
PITransferRecords,piadmin,piadmins,o:rw g:r w:r
PIUSER,piadmin,piadmins,o:rw g:r w:r
Modify the access to archive data and allow the piusers Identity:
* (Ls - DBSECURITY) PIconfig> @mode edit
* (Ed - DBSECURITY) PIconfig> @istru dbname,owner,group,access
* (Ed - DBSECURITY) PIconfig> PIARCDATA,piadmin,piusers,o:rw g:rw w:
*> PIARCDATA,piadmin,piusers,o:rw g:rw w:
Modify the access to base subsystem auditing and thread table:
* (Ed - DBSECURITY) PIconfig> pibasess,piadmin,piusers,o:rw g:rw w:r
*> pibasess,piadmin,operators,o:rw g:rw w:r
Modify the access to Update Manager thread table (there is no auditing in Update Manager):
* (Ed - DBSECURITY) PIconfig> piupdmgr,piadmin,piusers,o:rw g:rw w:r
*> piupdmgr,piadmin,piusers,o:rw g:rw w:r
* (Ed - DBSECURITY) PIconfig> @mode list
* (Ls - DBSECURITY) PIconfig> @ends
*PIconfig Err> Wild-card specs. missing, default to '*'.
PIARCADMIN,piadmin,piadmins,o:rw g:r w:r
PIARCDATA,piadmin,piusers,o:rw g:rw w:
pibasess,piadmin,piusers,o:rw g:rw w:r
PIBatch,piadmin,piadmins,o:rw g:r w:r
PICampaign,piadmin,piadmins,o:rw g:r w:r
PIDBSEC,piadmin,piadmins,o:rw g:r w:r
PIDS,piadmin,piadmins,o:rw g:r w:r
PIHeadingSets,piadmin,piadmins,o:rw g:r w:r
PIModules,piadmin,piadmins,o:rw g:r w:r
PIPOINT,piadmin,piadmins,o:rw g:r w:r
pisnapss,piadmin,piadmins,o:rw g:r w:r
PITransferRecords,piadmin,piadmins,o:rw g:r w:r
piupdmgr,piadmin,piusers,o:rw g:rw w:r
PIUSER,piadmin,piadmins,o:rw g:r w:r
* (Ls - DBSECURITY) PIconfig>
For a detailed discussion of database security, see Configuring PI Server Security.

Digital States Table (PIDS)


The Digital State table contains the digital state sets. A state set has a name and a list of states
(digital state strings). The system is limited to 16383 sets with up to 16383 states in each set.
The table name is PIDS. The primary key is SET. The following attributes are defined:

62
piconfig Reference

Attribute Description
SET name of digital state set
SETNO digital state set number (read only)
STATE… digital state strings in the set

The default set is called system and contains all the default system states found in a PI2.x
Digital State table. The System Digital State Set number, SetNo, is 0 (zero).
Once created, a digital state set cannot be deleted.

List State Sets in the Digital State Table


The next example shows how to list all state sets in the Digital State table. The defaults are
list mode and delimited format.
In the example below, piconfig is used to list the attributes of the PIDS table. Next, piconfig
is used to list all of the sets in the table; four are listed.
$ piconfig
(Ls - ) piconfig> @table pids
(Ls - PIDS) piconfig> @?atr
1 - SET (D) Setxxx
2 - SETNO (D) 0
3 - STATE (D) Statexxx
4 - OLDCODE (D) 0
5 - NEWSET (D)
(Ls - PIDS) piconfig> @ostructure set
(Ls - PIDS) piconfig> @select set=*
(Ls - PIDS) piconfig> @endsection
SYSTEM
BATCHACT
PHASES
MODES

List Digital States in a Digital State Set


This example shows how to list all digital states included in the system digital state set:
C:Program Files\pi\adm>piconfig table pids
* (Ls - PIDS) PIconfig> @ostru set, state,...
* (Ls - PIDS) PIconfig> @sele set=system
* (Ls - PIDS) PIconfig> @ends

Add a Digital State Set


To add a digital state set to the Digital State table, use piconfig as shown in this example:
1. Select the Digital State table
(Ls - PIDS) piconfig> @table pids
2. Prepare to write to the table
(Ls - PIDS) piconfig> @mode create
3. Specify an input data format of a digital state set name followed by any number of states
in the set. Follow this with a data line.

PI Server Reference Guide 63


Command-Line Utility Reference

(Cr - PIDS) piconfig> @istructure set, state, ...


(Cr - PIDS) piconfig> ValveStateSet, Open, Closed
4. Next, list the new state set in order to verify that it was properly created. Select only
those sets that start with “V.” Use an endsection command to force processing:
(Cr - PIDS) piconfig> @mode list
(Ls - PIDS) piconfig> @ostructure set, state, ...
(Ls - PIDS) piconfig> @select set=V*
(Ls - PIDS) piconfig> @endsection
VALVESTATESET,Open,Closed
(Ls - PIDS) piconfig>

Note: The endsection command is not needed when creating the state set because
data lines are processed as they are entered.

Add a Digital State Set Using Multiple iStructure Lines


This method uses multiple istructure command lines.
1. Select the Digital State table
(Ls - PIDS) piconfig> @table pids
2. Prepare to write to the table
(Ls - PIDS) piconfig> @mode create
3. Specify an input data format that consists of a digital state set name followed by any
number of states in the set.
(Cr - PIDS) piconfig> @istructure set
(Cr - PIDS) piconfig> @istructure state
(Cr - PIDS) piconfig> @istructure ...
The input lines are the set name followed by any number of states:
• ValveStateSet
• Open
• Closed
Subsequent lines are treated as input until the next piconfig command is issued.

Modify a Digital State Set


If you want to modify an existing digital state set by adding a state, deleting a state, or
renaming a state, you must specify all of the states in the state set. Individual states cannot be
edited.
For example, add another state to the ValveStateSet as follows:
1. Select the Digital State table
(Ls - PIDS) piconfig> @table pids
2. Prepare to write to the table
(Ls - PIDS) piconfig> @mode edit

64
piconfig Reference

3. Specify an input data format that consists of a digital state set name followed by any
number of states in the set.
(Ed - PIDS) piconfig> @istructure set, state, ...
4. Input data (with no commands)
(Ed - PIDS) piconfig> ValveStateSet, Open, Closed, Stuck
5. Next, list the new state set in order to verify that it was properly created:
(Ed - PIDS) piconfig> @mode list
(Ls - PIDS) piconfig> @ostructure set, state, ...
6. Select only those sets that start with “V”
(Ls - PIDS) piconfig> @select set=V*
7. Start processing
(Ls - PIDS) piconfig> @endsection
VALVESTATESET,Open,Closed,Stuck
(Ls - PIDS) piconfig>

Note: For sets with more than a few states it is advisable to use an output file, edit the
file, and then use it as input file. As mentioned above, the state must be added or
edited as a whole. See Modify the System State Set (page 65).

Modify the System State Set


The System State Set is always set number 0. It cannot be deleted. Renaming it is
allowed, but not recommended. As with any other set, it must be edited in its entirety.
The System State Set usually includes some blank states. To preserve these, make sure that
blank state are enclosed in quotes, or use the oldcode attribute. The oldcode attribute can
help maintain reference to state offsets within a set during editing. It has no other use.
@istru set
@istru oldcode,state
@istru ...
system
0,??????????
1,
2,?2
3,
4,?4
@istru set
@istru state
@istru ...
system
??????????
""
?2
""
?4
Both examples show only the first 5 states in the system set, and in both cases states 1 and 3
are blank.

PI Server Reference Guide 65


Command-Line Utility Reference

Change the Digital State Set Name


In the Digital State table, the primary key is SET, so the NEWSET attribute is used to change
the value of the primary key:
(Ls - ) piconfig> @table pids
(Ls - PIDS) piconfig> @mode list
(Ls - PIDS) piconfig> @ostructure set
(Ls - PIDS) piconfig> @select set=*
(Ls - PIDS) piconfig> @endsection
SYSTEM
BATCHACT
PHASES
MODES
VALVESTATESET
(Ls - PIDS) piconfig> @mode edit
(Ed - PIDS) piconfig> @istru set,newset
(Ed - PIDS) piconfig> ValveStateSet,NewValveStateSet
(Ed - PIDS) piconfig> @mode list
(Ls - PIDS) piconfig> @ostructure set
(Ls - PIDS) piconfig> @select set=*
(Ls - PIDS) piconfig> @endsection
SYSTEM
BATCHACT
PHASES
MODES
NEWVALVESTATESET

Create a Digital Tag


A digital tag is defined by specifying point type Digital in the Point Database.
The digital state set will default to System. To specify a different state set, enter the digital
state set name in the tag's DigitalSet attribute in the Point Database.
In the example below, the tagname, the point type, and the digital state set are explicitly
defined, while all the other point attributes use the defaults.
1. Select the Point Database table.
(Ls - ) piconfig> @table pipoint
2. Prepare it for writing
(Ls - PIPOINT) piconfig> @mode create
3. Specify the input data format
(Cr - PIPOINT) piconfig> @istructure tag, pointtype, digitalset
*> istructure tag, pointtype, digitalset
4. Specify the data
(Cr - PIPOINT) piconfig> ValveStateTag, Digital, ValveStateSet
*> ValveStateTag, Digital, ValveStateSet
5. List the new state set in order to verify that it was properly created:
(Cr - PIPOINT) piconfig> @mode list

66
piconfig Reference

(Ls - PIPOINT) piconfig> @ostructure tag, pointtype, digitalset


6. Select only those tags that start with “V”
(Ls - PIPOINT) piconfig> @select tag=V*
7. Now force processing
(Ls - PIPOINT) piconfig> @endsection
ValveStateTag, Digital, ValveStateSet

Send a Digital State to the Snapshot Database


Next, send a digital state Value to the Snapshot to verify that the new tag you have created
can retrieve the value.
1. Select the Snapshot table
(Ls - ) piconfig> @table pisnap
2. Prepare for writing
(Ls - PISNAP) piconfig> @mode edit
3. Specify the input data format:
(Ed - PISNAP) piconfig> @istructure tag, time, value
4. Specify the data. The timestamp is *, which indicates that the current time should be
used.
(Ed - PISNAP) piconfig> ValveStateTag, *, Open
5. List the new state set in order and verify that it was properly created:
(Ed - PISNAP) piconfig> @mode list
(Ls - PISNAP) piconfig> @ostructure tag, time, value
6. Select only those tags that start with “V:”
(Ls - PISNAP) piconfig> @select tag=V*
7. Now start processing:
(Ls - PISNAP) piconfig> @endsection
ValveStateTag, 26-SEP-03 15:45:32, Open

Digital State Strings (PISTATE)


PI maintains a list of all digital state strings in use. This means that if a given digital state
string is used in more than one digital state set, both sets refer to the same state string.
System managers need the ability to edit the digital string in the event that an error is made
when the string is first added to PI. The PISTATE table is used for this purpose. For
example, to correct the digital state string error “AUto” to “Auto”, you would issue the
following piconfig commands:
(Ls - ) piconfig> @table pistate
(Ls - PISTATE) piconfig> @mode edit
(Ed - PISTATE) piconfig> @istr state,newstate
(Ed - PISTATE) piconfig> AUto,Auto
AUto,Auto
(Ed - PISTATE) piconfig>

PI Server Reference Guide 67


Command-Line Utility Reference

The only processing mode supported by the PISTATE table is edit, which means that you
cannot use this table to create, delete or list digital state strings. To modify or list digital state
sets or the strings that belong to them, use the PIDS table.
You should not use the PISTATE table to substantially change the meaning of any digital
state string. This would affect any digital state set that uses the state string.

Firewall Table (PIFIREWALL)


The PI Firewall is a security feature that allows the PI Network Manager to control access to
the PI Server at the IP network address level. System administrators can use the PI Firewall to
allow or deny specific computers to connect. This table is used by the System Manager to
control general access to the PI Server by network address.
Select this table using the command:
@table pifirewall
The primary key is HOSTMASK. The table attributes are:
Attribute Description
HostMask The name or IP address of a client computer
Value ALLOW or DISALLOW
NEWHostMask Used to rename an existing HostMask

The PI Firewall Database cannot be modified remotely.

Group Table (PIGROUP)


With PI Server 3.4.380, data from the PI Group Table is moved to the PI Identity table.
However, the PI Group table is preserved for backwards-compatibility purposes; it provides a
list of PI Groups, as they existed in previous releases. The PI Group Table must still be used
to edit group memberships.
For details about how to configure and use PI Groups and PI Identities, see Configuring PI
Server Security. This table defines groups to which PI users may be assigned.
The table name is PIGROUP. The primary key is GROUP. The table attributes are:
Attribute Description
Group Group name
Description User description
Users List of users belonging to the group
NEWGroup Used to rename an existing group

Identity Table (PIIDENT)


The PI Identity Table stores configuration data that defines PI Identities. PI Identities
represent the privileges that users obtain when they connect to the PI Server. PI Identities are

68
piconfig Reference

used to describe access level to PI Server secure objects, such as PI points and PI modules.
The PI Identity Table was added in PI Server 3.4.380.
When you upgrade from a version prior to 3.4.380, data from the PI User and PI Group
databases is preserved for backwards compatibility and moved to the PI Identity Table; the PI
User and PI Group tables are merged with the PI Identity Table.
For details about PI Identities, see the Configuring PI Server Security.

Identity Mappings Table (PIIDENTMAP)


The PI Identity Mappings Table stores the information that associates Windows users and
groups to PI Identities. When a Windows group is mapped to a PI Identity, Windows users
from that group can access the PI Server based on access rights that were given to the PI
identity.
For details about how to map PI Identities and how to set security for PI Server resources, see
Configuring PI Server Security.

Network Manager Statistics Table (PINETMGRSTATS)


The PI Network Manager Statistics table displays information on active connections as well
as some information specific to PI Network Manager.
The table name is PINetMgrStats. The Connection ID is assigned based on order of
connection. Since connection names are not required to be unique, the ID is the primary key.
This table is read-only.
The attributes of this table are:

PINet Manager Statistics Table Attributes

Attribute Description
ID Connection ID. This is the primary key.
Name Connection name
Operating System information
OSBuild Operating system build
OSSysName Operating system name
OSUser Operating system user
OSVersion Operating system version
PID The ID of the process that made the connection. This is applicable to all
entries besides pinetmgr.
PIPath PI Server root directory on the server. This item is the same for all
connections.
Network-level data
ConStatus Connection status
ConTime Time connection was established
BytesRecv Bytes received by the connection

PI Server Reference Guide 69


Command-Line Utility Reference

BytesSent Bytes sent by the connection


MsgRecv Messages received by connection
MsgSent Messages sent by connection
PeerPort The port being used by the remote process for the connection to the PI
Network Manager. This information is especially useful when troubleshooting
firewalls and network routing.
PeerAddress IP Address of connecting machine

PeerName 1 Host name of connecting machine

RecvErrors Number of receive errors on the connection


SendErrors Number of send errors on the connection
NetType Connection network type
WIN32 named pipes, UNIX, or TCP/IP
ElapsedTime The number of seconds that the connection was active
pinetmgr only
APICount The number of API connection that are connected to the PI Server

IsStandAlone2 1 if the server is in standalone mode, 0 if it is not

IsTCPListenerOpen 1 if the PI Network Manager is accepting requests via TCP, 0 if it is not


2

NumConnections2 The number of SDK and API connections to the Network Manager

SDKCount The number of SDK connections


ServerID Internal ID of the server
Protocol information
PI Version Version of PI Network Manager
ConType Connection type:
 PI API connection: PI API or VMS PINet node
 Local connection: PI SDK or PI Subsystem directly connected to pinetmgr
 Remote Router: Connection from PINS to PI server
 Remote Resolver: Connection to a PINS (other end of the above
connection)
ProtocolVersion PI Protocol version of connecting application
LastCall The timestamp for the time that the last call was made to the PI server by that
connection
Licensing
RegAppID The public ID for a particular application
RegAppName Registered application name
Trust information
Trust The name of the trust that is in use by the connection
User The user that the connection is logged in with

70
piconfig Reference

1
A timeout parameter DoRDNSForMessaging needs to be set to 1 in order for piconfig to
view this attribute. Note that you need to stop and restart PI server for the change of
DoRDNSForMessaging to be effective.
2
pconfig does not have access to this attribute; this means you can view it only with the
Network Manager Statistics tool in SMT.

View PI Connection Information


Specifying the ID as pinetmgr accesses statistics associated with pinetmgr. Specifying
ID as * will list all connection statistics and pinetmgr statistics. ID, Name, and
ProtocolVersion are the only attributes that apply to pinetmgr. ConTime refers to
startup time of pinetmgr.
The following example lists all attributes of all current connections:
* (Ls - PINETMGRSTATS) piconfig> @ostr ID, BytesRecv, BytesSent,
ConStatus
* (Ls - PINETMGRSTATS) piconfig> @ostr contime, contype, msgsent, name
* (Ls - PINETMGRSTATS) piconfig> @ostr nettype, peeraddress, peername
* (Ls - PINETMGRSTATS) piconfig> @ostr
protocolversion,recverrors,senderrors
* (Ls - PINETMGRSTATS) piconfig> @selec id=*
* (Ls - PINETMGRSTATS) piconfig> @ends
6,24,132447,[0] Success
4-Sep-02 17:08:05,Local connection,759,pimsgss
WIN32 Named pipe,,
3.1,0,0
*----------
7,24,108008716,[0] Success
4-Sep-02 17:08:12,Local connection,1794287,piupdmgr
WIN32 Named pipe,,
3.1,0,0
*----------
8,24,3710706,[0] Success
4-Sep-02 17:08:19,Local connection,64851,pisnapss
WIN32 Named pipe,,
3.1,0,0
*----------
9,24,1974873,[0] Success
4-Sep-02 17:08:27,Local connection,24266,piarchss
WIN32 Named pipe,,
3.1,0,0
*----------
10,24,102724,[0] Success
4-Sep-02 17:08:34,Local connection,1072,pibasess
WIN32 Named pipe,,
3.1,0,0
*----------
16,24,372707,[0] Success
4-Sep-02 17:09:13,Local connection,2059,PIPESCHD
WIN32 Named pipe,,
3.1,0,0
*----------
12,24,60055,[0] Success

PI Server Reference Guide 71


Command-Line Utility Reference

4-Sep-02 17:08:49,Local connection,672,pisqlss


WIN32 Named pipe,,
3.1,0,0
*----------
13,24,9420677,[0] Success
4-Sep-02 17:08:57,Local connection,198466,pitotal
WIN32 Named pipe,,
3.1,0,0
*----------
14,24,154881,[0] Success
4-Sep-02 17:09:04,Local connection,2828,pibatch
WIN32 Named pipe,,
3.1,0,0
*----------
15,20,12987712,[0] Success
4-Sep-02 17:09:12,Local connection,1618340,PipeE
WIN32 Named pipe,127.0.0.1,localhost
1.8,0,0
*----------
20,20,33340,[0] Success
4-Sep-02 17:43:44,Local connection,2715,RmpSE
WIN32 Named pipe,127.0.0.1,localhost
1.8,0,0
*----------
21,20,50446,[0] Success
4-Sep-02 17:43:45,Local connection,3349,RandE
WIN32 Named pipe,127.0.0.1,localhost
1.8,0,0
*----------
23,24,38287,[0] Success
5-Sep-02 15:01:35,Local connection,6,piconfig
WIN32 Named pipe,,
3.1,0,0
*----------
PINetMgr, , ,
, , ,PINetMgr
, ,
3.1, ,
*----------

Delete Connections
You can delete connections through piconfig with the PINetMgrStats table. To delete a
connection, first list the connections to get the appropriate ID. Then, in delete mode, specify
the ID. The following piconfig session demonstrates this feature:
* (Ls - ) PIconfig> @table pinetmgrstats
* (Ls - PINETMGRSTATS) PIconfig> @ostr id,name,contime
* (Ls - PINETMGRSTATS) PIconfig> @select id=*
* (Ls - PINETMGRSTATS) PIconfig> @ends
0,pigetmsg,8-Mar-05 07:55:09
1,pilicmgr,8-Mar-05 07:55:10
2,pitotal,8-Mar-05 07:55:10
3,piarchss,8-Mar-05 07:55:10
4,piupdmgr,8-Mar-05 07:55:10
5,pisqlss,8-Mar-05 07:55:10

72
piconfig Reference

* (Ls - PINETMGRSTATS) PIconfig> @mode delete


* (Dl - PINETMGRSTATS) PIconfig> @istr id
* (Dl - PINETMGRSTATS) PIconfig> 0
*> 0
* (Dl - PINETMGRSTATS) PIconfig>
Resulting message log message:
0 pinetmgr 8-Mar-05 14:02:06
>> Deleting connection: pigetmsg(2700), Administrator requested
closing connection pigetmsg(2700) (1121), ID: 0

Point Class (PIPTCLS)


The Point Class Database contains all the point classes defined on a PI Server. A point class
defines the attributes of a PIPOINT. This approach allows points to have attributes specific
to the point's role. For example, Totalizer points use a point class designed specifically for the
Totalizer needs.

Note: Use great care when editing existing Point Classes, and edit them in standalone
mode.

The table name is PIPTCLS. It has the following attributes:


Attribute Description
Class name of the class
SET The attribute set where attribute in the class were defined. This attribute is only
used in create mode. It is used to specify the attribute sets which comprise the
point class.
ATTRIB Attribute name; a class has many of these
DEFAULT Default value of the attribute
TYPE... Data type of the attribute. For example, String, Float32

The following piconfig session lists the point classes on the server:
* (Ls - PIPTCLS) PIconfig> @ostr class
* (Ls - PIPTCLS) PIconfig> @ends
*PIConfig Err> Wild-card specs. missing, default to '*'.
Alarm
base
classic
SQC_Alarm
Totalizer
Now listing classic point class; this class is built from the classic and base attribute sets:
* (Ls - PIPTCLS) PIconfig> @tabl piptcls
* (Ls - PIPTCLS) PIconfig> @mode list
* (Ls - PIPTCLS) PIconfig> @ostr attrib,default,type
* (Ls - PIPTCLS) PIconfig> @ostr ...
* (Ls - PIPTCLS) PIconfig> @istr class
* (Ls - PIPTCLS) PIconfig> classic
*> classic
descriptor,,String
exdesc,,String

PI Server Reference Guide 73


Command-Line Utility Reference

typicalvalue,50.,Float32
engunits,,String
zero,0.,Float32
span,100.,Float32
pointtype,12,UBYTE
pointsource,Lab,String
scan,1,BYTE
excmin,0,Uint16
excmax,600,Uint32
excdev,1.,Float32
shutdown,1,BYTE
archiving,1,BYTE
compressing,1,BYTE
step,0,BYTE
compmin,0,Uint16
compmax,28800,Uint32
compdev,2.,Float32
creationdate,31-Dec-69 16:00:00,TimeStamp
creator,0,Uint16
changedate,31-Dec-69 16:00:00,TimeStamp
changer,0,Uint16
displaydigits,-5,BYTE
location1,0,Int32
location2,0,Int32
location3,0,Int32
location4,0,Int32
location5,0,Int32
filtercode,0,Int16
squareroot,0,Int16
totalcode,0,Int16
convers,1.,Float32
srcptid,0,Int32
instrumenttag,,String
userint1,0,Int32
userint2,0,Int32
userreal1,0.,Float32
userreal2,0.,Float32
* End Repeat...
* (Ls - PIPTCLS) PIconfig>

Point Database Table (PIPOINT)


The most important configuration database is the Point Database. It contains the list of points
that are recorded in the PI Archive (or mapped to points in foreign data systems when COM
Connectors are used).
The Point Database stores configuration information for each point as a list of point
attributes. For a complete explanation of the PI point classes and point attributes, see the PI
Server System Management Guide.
The point database is tightly coupled with the Archive and the Snapshot Table. The Point
Database table name is PIPOINT. The primary key is TAG.

74
piconfig Reference

Access Point Class Attributes


To access the attributes of another point class, change the point class using the
ptclassname command. For example, to change to the Classic point class:
@ptclassname classic
Optionally the ptclass can be specified at PIPOINT table load; the syntax is:
@table pipoint,ptclass
This example selects the PIPOINT table and classic ptclass:
@table pipoint,classic
When listing classic point attributes of non-classic points, attributes unique to classic will
appear to be blank.

Access Point Class Attributes


Use the piconfig ptclass command to access the attributes belonging to a particular point
class. For example, to display the attributes of the Classic point class, type:
@table pipoint
@ptclass classic
@?atr
As a shortcut, you can specify the point class name while setting the pipoint table with a
single piconfig command:
@table pipoint,classic
The piconfig command ptclass is not to be confused with the attribute PtClassName.

List Attributes in the Classic Point Class Example


To see which additional attributes are available using the Classic point class, select the
Classic point class with the ptclass command and list the attributes using the ?atr command.
(Ls - ) piconfig> @table pipoint
(Ls - PIPOINT) piconfig> @?atr
(Ls - PIPOINT) piconfig> @ptclassname classic
(Ls - PIPOINT) piconfig> @?atr

Modify an Attribute in the Point Database


With the exception of point class and point type, the user-configurable point attributes in the
Point Database may be modified using piconfig. The syntax is:
@modify attribute=newvalue,attrib2=newvalue2,...

Example: Modify the Span Point Attribute


In this example, the modify command is used to change the span for all tags starting with
MyTag:
@table pipoint
@mode edit
@modify Span=150

PI Server Reference Guide 75


Command-Line Utility Reference

@select tag=MyTag*
@endsection

Example: Use Operators to Modify Point Attributes


Values may be modified arithmetically by using the following operators:
• attribute += value
• attribute -= value
• attribute *= value
• attribute /= value
This example changes all tags with a point source of X to have a zero that is 10 units less than
its current value and increases the span to 110 percent of its current value:
@table pipoint
@mode edit
@select tag=*, pointsource=X
@modify zero-=10, span*=1.1
@endsection
Modify specifications remain in effect until a table is changed. New modify specifications are
added to previous specifications until data is processed. After this, new specifications replace
previous ones.

Modify a Nonexistent Attribute


If you attempt to modify an attribute that a point does not have, such as a Classic attribute for
a point in the Base class, the following error message appears:
*Piconfig Error> Unknown parameter name in Modification name

Add Tags to the Point Database Using Excel


The TagConfigurator is a utility that should be used to configure PI points using Microsoft
Excel. It can be obtained from the OSIsoft Technical Support Web site
(http://techsupport.osisoft.com/).
This section outlines a technique that can be used if you wish to develop a point configuration
spreadsheet yourself.
The spreadsheet must contain a row for each tag and a column for each attribute, such as
tag, Pointsource, and pointtype.
Save the spreadsheet as an ASCII file with comma-separated values. Precede any non-data
lines in the file with a * comment character. That way, piconfig ignores them.
Here’s an example data file, taglist.dat, generated from a spreadsheet in Comma-Separated
Variable (CSV) format:
RealTag1,Lab,float16
RealTag2,Lab,float16
Modify the following example structure file so that the attributes listed in the structure line
match the contents of the ASCII data file. Note that the tagname, as specified by the tag

76
piconfig Reference

attribute, is the only attribute that is required. Attributes that are not specified are given
default values.
Use create mode to create new tags; use edit mode to modify existing tags. Use create, t or
edit, t mode to create the tag if it does not exist and to modify it if it does exist.
*Example piconfig input structure file
*File name: example3.str
*
*Create or modify tags from input file
taglist.dat
*
@table pipoint
@mode create, t
@istructure tag, pointsource, pointtype
@input taglist.dat
@endsection
*
*List tags to verify creation or modification
*
@mode list
@ostructure tag, pointsource, pointtype
@select tag=*, pointsource=Lab, pointtype=float16
@endsection
@exit
Run piconfig using the structure file as input.
piconfig < example3.str

Change a Point Type


This example uses piconfig to change a point type to float 32:
@mode edit
@istru tag,pointtype
MyTag,float32
@ends

Point Source Table (PIPTSRC)


The Point Source Table provides a view into the Point Database. It provides an option to add
a description to every point source and to view how many points are in each point source.
You can view the Point Source Table using the piconfig utility and PI System Management
Tools (PI SMT). The only attribute that can be edited is the description.
The Point Source Database is actually a view into the point source index of the point
database. It provides the ability to add a descriptor for each point source and to quickly view
the number of points per point source.
The table name is PIPTSRC. It has the following attributes:
Attribute Description
Ptsrc The point source character or string
Code The internal code, used for point source update signup
Count Number of points in this point source

PI Server Reference Guide 77


Command-Line Utility Reference

Attribute Description
Desc… Free format descriptor

The following piconfig session lists the point sources on the server:
* (Ls - PIPTSRC) PIconfig> @ostru ptsrc,code,count,desc
* (Ls - PIPTSRC) PIconfig> @ends
*PIconfig Err> Wild-card specs. missing, default to '*'.
#,15,26,
*,13,1,
1,7,5589,
9,2,11,
?,14,1,
@,10,4,
C,4,22,
G,9,18,
L,3,15,
Lab,5,4056,
PIBatch-InternalUse-1,11,2,
PICampaign-InternalUse-1,19,1,
PITest,16,1,
PIUnitBatch-InternalUse-1,8,109,
R,1,9865,
T,6,15,Totalizer Points
U,12,2,

Snapshot Table (PISNAP and PISNAP2)


The Snapshot and Snapshot2 tables provide access to the PI Snapshot, both for listing or
editing. The Snapshot is the most recent event for a point. It can be viewed as a buffer that is
only one element deep. When a new event arrives, it becomes the new Snapshot, unless it has
a timestamp older than the Snapshot. The previous Snapshot is evaluated according to the
compression specifications and is either sent to the Event Queue or discarded.
Events that have a timestamp older than the snapshot does are sent to the Archive Subsystem
through the Event Queue. These events are referred to as out-of-order events. Out-of-order
events are never evaluated for compression.
Event values are always stored in full precision in the Snapshot. Scaling, if applicable, is
applied when the event is stored into the Archive. For more information on scaling, see the
section on point types in PI Server Databases (page 125).
When the Archive events for a point are listed or trended by PI ProcessBook and other tools,
the Snapshot is included in the list if the requested listing covers the snapshot time.
The Snapshot Table resides in memory. It is flushed to disk by the Snapshot Subsystem at
least every 15 minutes, where it is stored in the piarcmem.dat file.
The table name is PISNAP. The primary key is TAG.
The following attributes are defined:

78
piconfig Reference

Attributes for the Snapshot and Snapshot2 Tables

Attribute Description Comment


TAG The tagname (Read only)
PointID The point ID (Read only)
Type The point type (float32 …) (Read only)
Value
TIME Event timestamp in the format DD-MMM-YY hh:mm:ss.ssss
TimeNum Timestamp as a number in seconds past 01-Jan-70 (Read only)
Status The value status (Read only)
Flags (Q)uestionable (M)odifed (A)nnotated Only Q is
read/write
Annot Annotation

To read Snapshot data, use list mode. To change the data, use edit mode. Other modes
are not applicable.
If a numerical Snapshot value is invalid, the PI Server shows the value as “Digital State” and
the status attribute shows the digital state that describes the status. If a numerical value is
valid, the actual value is shown and the status attribute shows the digital state “GOOD.”
To change a digital point value, you can specify either the digital state name or the numeric
offset (digital state number).
The file pisnap.dif is included with every system. It is a quick way to list Snapshot
values.
$ piconfig input pisnap.dif
* (Ls - PISNAP) piconfig> @sele tag=c*
* (Ls - PISNAP) piconfig> @ends
CDEP158,2,GOOD,20-Nov-02 17:02:00
CDF144,Digital State,No Data,20-Nov-02 17:11:42
CDM158,Manual,GOOD,20-Nov-02 17:09:30
CDT158,53.03498,GOOD,20-Nov-02 17:10:00
A second table named PISNAP2 is useful for debugging classic PI API applications. It uses
the PI 2.x concepts rval and istat instead of Value and Status:
Attribute Description
RVAL real values; or 0 for other point types
ISTAT Positive integer value for integers, status for invalid real values, or set and state
number for digitals.

In PI 2.x, istat for digital tags is the negative of the state number. In the PISNAP2 table,
istat contains a 32-bit number that represents both set and state. The set number is in the
most significant 16 bits and the state number is in the least significant 16 bits. The system set
number is 0. Be aware that some PI API functions truncate the most significant 16 bits. String
values cannot be used in PISNAP2 table.

PI Server Reference Guide 79


Command-Line Utility Reference

Add Events to the Data Archive Using the Snapshot Table


Although events, also known as value/time pairs, are normally added to the PI Data Archive
through interfaces, you may want use the Snapshot table to add events to the Data Archive for
testing purposes. The Snapshot contains the most recent event for each tag. If you add an
event to a tag in the Snapshot table, the previous event is archived if it passes the
compression tests. Events with timestamps earlier than the current Snapshot timestamp
bypass the Snapshot table and are sent directly to the Archive. You can only view the most
recent event in the Snapshot table.
The tagname, time stamp, and value must all be specified. The time can be in any of the valid
PI time formats specified in the PI Server System Management Guide.
• Select the Snapshot table and prepare for editing.
(Ls - ) piconfig> @table pisnap
(Ls - PISNAP) piconfig> @mode edit
• Specify the format of the input data.
(Ed - PISNAP) piconfig> @istruc tag, time, value
• The following lines are input data.
RealTag, 13-Aug-03 10:00, 3.81
RealTag, 13-Aug-03 10:05, 2.45
IntTag, *, 5
DigTag, T+8h, CLOSED

Add Data Using Pisnap2 Table


In the PISNAP2 table, use the rval and istat attributes instead of the value attribute:
In this example, a good and a bad value are added to PI:
(Ls - ) piconfig> @table pisnap2
* (Ls - PISNAP2) piconfig> @mode edit
* (Ed - PISNAP2) piconfig> @istru tag,time,rval,istat
* (Ed - PISNAP2) piconfig> sinusoid,*,50.0,0
> sinusoid,,50.0,0
* (Ed - PISNAP2) piconfig> sinusoid,*,0,-254
> sinusoid,*, 0,-254
Using the PISNAP2 table to add values to integer and digital tags would require setting the
istat attribute.

Subsystem Table (PISUBSYS)


The PI Subsystem table shows subsystem-specific attributes and statistics. This read-only
table is useful for troubleshooting. To load this table, the subsystem in question must be
specified. The table name is PISubSys. For example, to view attributes associated with
pisnapss, enter the following command:
piconfig> @table pisubsys,pisnapss

Note: This table has no real primary key since there is only one record.

80
piconfig Reference

The set of attributes available on this table varies with the platform type. The table attributes
are listed in the following table.
Attribute Description Operating System
PISubsysName Subsystem Name All
IDNumber Unique ID of Computer UNIX (Not all versions of UNIX support this
attribute)
Machine Hardware ID UNIX
OSNodeName TCP/IP host name UNIX
OSRelease Operating system release UNIX
OSBuild Operating system build Windows
OSSysName Operating system name All
OSVersion Operating system version All
PIStartupTime Subsystem startup time All
PIVersion Subsystem version All

View PI Subsystem Information


Here's an example listing attributes of the Subsystem table.
To list the record, use the ostructure command and specify pisubsysname as *
(Ls - PISUBSYS) piconfig> @ostr pisubsysname
(Ls - PISUBSYS) piconfig> @ostr osbuild, osversion
(Ls - PISUBSYS) piconfig> @ostr pistartuptime, piversion
(Ls - PISUBSYS) piconfig> @selec pisubsysname=*
(Ls - PISUBSYS) piconfig> @ends
pisnapss
Service Pack 6,4.0.1381
4-May-03 17:08:20,PI 3.3.361.43
The operating system attribute names may vary because they are operating system dependent.

Subsystem Statistics Table (PISUBSYSSTATS)


The PI Subsystem Statistics table shows detailed subsystem statistics. This read-only table
also requires subsystem specification. The table name is PISubSysStats. For example, to
view statistics for pisnapss enter the following command:
piconfig> @table pisubsysstats,pisnapss
The attributes are listed in the following table.
Attribute Description
PISubsysName Subsystem Name
BytesRecv Number of bytes received since startup.
BytesSent Number of bytes sent since startup.
MsgRecv Number of messages received since startup.
MsgSent Number of messages sent since startup.

PI Server Reference Guide 81


Command-Line Utility Reference

Attribute Description
RecvErrors Number of receive errors since startup.
SendErrors Number of send errors since startup.
StartTime Subsystem startup time.

The bytes and messages received and sent refer to all inter-process communications.

View PI Subsystem Statistics


The following example lists the statistics for pisnapss. There is no primary key, so specify
PISubSysName name as *
(Ls - PISUBSYSSTATS) piconfig> @ostr PIsubsysname
(Ls - PISUBSYSSTATS) piconfig> @ostr bytesrecv, bytessent
(Ls - PISUBSYSSTATS) piconfig> @ostr msgrecv, msgsent
(Ls - PISUBSYSSTATS) piconfig> @ostr recverrors, senderrors
(Ls - PISUBSYSSTATS) piconfig> @ostr starttime
(Ls - PISUBSYSSTATS) piconfig> @select pisubsysname=*
(Ls - PISUBSYSSTATS) piconfig> @ends
pisnapss
99626,57637
434,432
0,0
4-Sep-02 17:08:19
Some PISubSyssStats tables also contain subsystem specific data. This data is usually
presented for troubleshooting purposes. After setting a PISubSysStats table, always
show the available attributes with the @?atr command.

Server Table (PISERVER)


The PI Server table holds information about the PI Server itself. It lists the attributes of all
servers, whether members of collectives or standalone servers.If a PI Server is part of a
Collective this table will hold information about each member of the Collective.
The information stored in the Server Table can be divided into these categories:
• Basic configuration information includes the Name of the PI Server, the network path
clients use to connect to the server, ServerID, Description and Role, which indicates
whether the server is in a Collective or not, and if so, whether it is a Primary or
Secondary server.
• Basic Status information includes whether the server is available, and if it is not, the
reason the server is unavailable.
• If a server is a member of a Collective, additional information includes the name of the
Collective the server belongs to; the frequency that a Secondary server will update its
status to the Primary server and the frequency it will synchronize its configuration with
the Primary server.
Status information for each server in a Collective includes details about the status of
communications between the Secondary and the Primary and the status of Replication
between the Secondary and the Primary.

82
piconfig Reference

Attribute Description
Name The computer hostname (non-qualified); unique key in the PI Server
table; each server uses this to find its own entry in the table
Collective The name of the collective that the server belongs to; must match
collective name defined in the PICollective table
CommPeriod Period for secondary PI Server to send status to primary, receive status
of collective members, and retrieve configuration changes
CommStatus Status of the last secondary PI Server communication with the primary
server (0 is good)
Description Optional description for the server
FQDN FQDN or IP address used to connect to collective servers
IsAvailable 1 if available for client access, 0 otherwise; derived from all other status
fields in the table
IsConnectedToPrimary 1 indicates that the secondary PI Server is connected to the primary PI
Server; always 1 on a primary PI Server
IsCurrentServer 1 on the responding PI Server, 0 for all others
IsTCPListenerOpen 1 indicates this PI Server TCP listener is open
LastCommTime Last time the secondary PI Server communicated status to the primary
PI Server
LastSyncRecordID Number of changes each PI Server applied to the replicated tables
LastSyncTime Last time synchronization succeeded on secondary PI Servers
NumConnections Total number of connections on the specific PI Server
PIVersion Version of PI Base Subsystem
Port The TCP/IP port number for communicating to the PI Server
Role 0 for non-replicated; 1 for primary; 2 for secondary
ServerID A UID representing the unique PI Server identification
SyncFailReason Reason that synchronization did not succeed
SyncPeriod Synchronization period in seconds; 0 means synchronize on demand
only; set on primary PI Server to affect behavior of secondary PI Server
SyncStatus On secondary servers; the status the last time synchronization was
attempted (0 is good)
Unavailable Reason
NewName Used to rename an existing server

Thread Table (PITHREAD)

PI Thread Table Attributes

Attribute Description
ID Operating system thread ID
Action Edit only. See the following table
ActValue Edit only. Value for the action performed

PI Server Reference Guide 83


Command-Line Utility Reference

Attribute Description
Calls Number of calls served by the thread
Handle Subsystem handle
PoolName Every thread belongs to a thread-pool. We are mainly interested in the RPC
thread pool, which serves client calls to a subsystem.
Priority The thread priority
State The thread state - generally “Wait” or “InUse”

PI Thread Table Actions

Action Description Action Value


Priority Change thread priority 1 to increase -1 to decrease
Suspend Temporary suspensions of thread execution
Resume Resume a thread previously suspended
Terminate End this thread

* (Ls - ) PIconfig> @table pithread,piarchss


* (Ls - PITHREAD) PIconfig> @ostru
id,calls,handle,poolname,priority,state
* (Ls - PITHREAD) PIconfig> @ends
1500,7,212,RPC,0,Wait
1596,9,216,RPC,0,Wait
1504,11,220,RPC,0,Wait
1116,18,224,RPC,0,InUse
2124,9,228,RPC,0,Wait
3664,8,232,RPC,0,Wait
2592,9,236,RPC,0,Wait
3812,7,240,RPC,0,Wait
1216,0,816,EVQ,0,Wait
2488,0,820,EVQ,0,Wait
2736,0,824,EVQ,0,Wait
3140,0,828,EVQ,0,Wait
3012,0,832,EVQ,0,Wait
2356,0,840,Shift,0,Wait
3336,655015,0,Main, ,
3888,166401,248,Message, ,
3016,190,260,Read, ,

Note: The PITHREAD table is primarily a monitoring tool. We recommend using it only
with in-depth understanding of threads. Specifically, avoid using it for any
modification or thread creation.

Timeout Table (PITIMEOUT)


PI Server configuration and tuning parameters are stored in the Timeout Table. You can view
and edit these parameters with PI SMT or piconfig.

84
piconfig Reference

The PI Server is designed to work optimally using the default settings for these parameters.
OSIsoft recommends that you use the default values unless you are directed to do otherwise
by Technical Support, Field Service, or other OSIsoft personnel.

Note: Tuning Parameter values are preserved during PI Server upgrades. When you
upgrade the PI Server, review any values that you changed from the default.

This table contains the PI Server timing parameters as well as many other configurable
parameters. Adjustment of these parameters should be done by the PI Server Administrator.
Select this table using the command:
@table pitimeout
The primary key is NAME. The attributes are listed in the following table.
Attribute Description
Name Timing attribute name
Value Timing value as a string
NEWName Used to rename an existing name

The PI Timeout database cannot be modified remotely.

Trust Table (PITRUST)


This table is used to allow a client application to connect to the PI Server as a specific PI user
without requiring that the client application enter a username and password. Such access is
necessary for applications that run unattended, such as PI Interfaces. When you configure
trusts, credential attributes such as Domain name, IP host name, IP address, Application
name, and Operating System Username are stored in the Trust table.

Note: Although you can create trusts to support single sign-on, OSIsoft recommends
that you instead use PI Identities and PI Identity mappings for this purpose.

The client and PI Server obtain the client's credentials from the operating system, domain
controller, and network software. These include any of the following: domain name, IP host
name, IP address, and username.
Select this table using the command:
@table PITRUST
The primary key is TRUST. The table attributes are:

Trust Table Attributes

Attribute Description
Trust A name for this trust relationship
Domain The domain name for the client machine
IPAddr IP address of client machine
NetMask Network address mask in the format (255.255.255.255)

PI Server Reference Guide 85


Command-Line Utility Reference

Attribute Description
IPHost Name of client machine
OSUser User name under which the client is running
AppName Application name
PIUser Associated PI user

Any field specified as NULL string (“”), is ignored when incoming connection are matched
against the table.
• Domain, IPHost, AppName, and OSUser must be specified exactly or not at all.
• IPAddr and NetMask must be specified together. If you provide a value for one, you
must also provide the other.
• PIUser must always be specified as either a currently existing PI user in the User
Database or as a dollar sign ($). The dollar sign must be paired with a $ in either OSUser
or IPHost. If the trust matches incoming credentials and there is no PIUser with the same
name, an error occurs at run-time. This method of specification matches any user or any
machine that passes the domain controller validation of their login credentials.

Users Table (PIUSER)


With PI Server 3.4.380 and later, data from the PI User and PI Group Tables is moved to the
PI Identity Table. However, the PI User table is preserved for backward compatibility; it
provides a list of PI Users, as they existed in previous releases.

Note: With PI Server 3.4.380, OSIsoft recommends that you use the PI Identity Table to
create and access all PI Identities. However, the PI User table continues to
function as it did in previous releases and can be used view and update PI Users.
The PI User Table must still be used to edit group memberships.

For details about how to use PI Identities of type PI User, see Configuring PI Server Security.
This table defines PI users and records their assignment to groups. The table name is
PIUSER. The primary key is User. The table attributes are:
Attribute Description
User User name
Description User description
Groups List of groups to which the user belongs
Context Reserved for future use
NEWUser Used to rename an existing user

The description attribute is used to specify any type of user information, such as address or
title. The user may be added to multiple groups.

Note: Users are assigned to groups using the PIUSER table. Attempting to change the
group membership of users via the PIGROUP table has no effect.

86
piconfig Reference

Helpful Hints

Abbreviations
All piconfig commands can be abbreviated to four characters.

Case Sensitivity
Windows program and file names are case preserving, but not case-sensitive.
The piconfig commands, attribute names and table names are not case-sensitive, but the data
are case-sensitive. The case-sensitivity on Timeout, Firewall, and Trust tables may be
changed for both of these parameters by using the case command.

Command Input Files


The piconfig commands and data can be placed in any number of files and executed using the
input command.
If the input file contains many lines, all of which have the same command, the following
construct may be useful:
@command @command_file
In this construct, the command specified is prepended to every line in the command file. This
is useful, for example, when a file with input structure lines have been generated from
another program, such as PIDIFF, or when the same complex structure is used for both input
and output.

Input Line Length


By default, piconfig reads from its input up to 1024 characters. This is sufficient in almost all
cases.
If the input contains lines longer than 1024, reset the input buffer using the line command, for
example:
@line 4000

Using Quoted Strings


There are two main reasons to use quotes (single or double) with piconfig data:
• The data contains an embedded delimiter character that will confuse correct parsing
either on input or on output that is used in the future by piconfig itself or by other
applications (such as Microsoft Excel).
• The specific table requires certain data to be enclosed in quotes (single or double) for its
own further processing. Examples include the Pibatch Tables and the Performance
Equations expressions configured in the extended-descriptor of a point.

PI Server Reference Guide 87


Command-Line Utility Reference

piconfig attempts to parse incoming data into fields using the delimited character. If a field
starts with a quote (either single or double) piconfig ignores any delimiter until a matching
quote is found.
When an already quoted string must contain embedded quotes, there are two options:
• Enclose strings containing double quotes in single quotes and vice versa
• Escape the embedded quotes with a backslash (\)

Note: A field containing the delimiter character must be quoted. A field that starts with a
quote should be quoted using the other type of quote. A field that starts with one
type of quote and contains the other type as well should be quoted, and the
embedded quotes must be escaped.

For example, a field containing:


unit,function
should be specified as
"unit,function"
Or
'unit,function'
The expression
'sinusoid' > 'tag33'
should be specified as
"'sinusoid' > '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> * This is a comment.
*piconfig> * Change the comment character to !
*piconfig> @comment !
*piconfig> ! Now we have a new comment character.
*piconfig> !Change back to the original comment character.
*piconfig> @comment *
*piconfig> * 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: <Delim.> OUT: <Delim.>
Error count: 3 Max: 10
Curent table: <PIPOINT> Cur. Prim.: <> Def. Prim: < >
Nesting level : 0
Node: <127.0.0.1,piadmin>

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> @isty fixed


* (Cv - ) piconfig> @osty delim
* (Cv - ) piconfig> @istru tag,1,1,10
* (Cv - ) piconfig> @istru zero,1,10,5
* (Cv - ) piconfig> @istru span,1,20,5
* (Cv - ) piconfig> @ostru zero,span,tag
* (Cv - ) piconfig> @echo none
* (Cv - ) piconfig> @input fixed.dat
0 , 200,Tag1
-5 , 655,tag2

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] Recover (fix) file base data file index by copying
[-compress] [-header] recoverable records to an output file. -fbf requires an
output file and the input file is opened read only.
-gap path [-time=secs] Estimate gaps in data for an archive. By default it
[-sample=percent] samples the most active 10 percent of tags where the gap
is at least 300 seconds long and is uniform across 90
[-matching=percent] percent of the sampled tags.

-getpipcpath Display the PIPC home directory. With the -filepath


[-filepath filename] 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 Compare a machine or cluster signature file to the local
filename [filename] 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 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 Register or unregister COM component by running .rgs
[ReplaceableParameter= script in path
"<Value>"]
-t time [U] Convert timestamp to string.

94
pidiag Reference

Option Description
-tz [ -if path | -ifrule [path] ] Specify special DST settings
[-of path]
-tz [time [TZ]] [ -check | -dump Show time zone information
[-brief] |-full]
-udf path Reset the piadmin (userid #1) password to blank
-qd [HeaderOnly Header| Dump header or all/filtered events from Event Queue file
RecNo=n | PointId=ID] path
-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] Export audit records. For details, see Audit the PI Server.
[-uid uniqueID]
[-xh schemaURL]
[-dbMask mask] [-wash]

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: 99.4%
1: record id: 130811, start: 30-Oct-05 15:33:27, events: 142, fr: 99.7%
2: record id: 130515, start: 12-Nov-05 09:29:36, events: 142, fr: 99.9%
3: record id: 130210, start: 22-Nov-05 04:44:08, events: 142, fr: 99.9%
4: record id: 128814, start: 15-Dec-05 13:31:42, events: 68, fr: 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 6
3.4.364
3.4.370 and 7
3.4.375
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: 417 st: 16-Aug-09 23:08:54 et: 16-Aug-09


23:15:51
Duration: 659593 st: 16-Aug-09 23:15:54 et: 24-Aug-09
14:29:07
Duration: 480 st: 24-Aug-09 14:30:07 et: 24-Aug-09
14:38:07
Duration: 1431 st: 24-Aug-09 14:40:54 et: 24-Aug-09
15:04:45

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: 182380


Current Queue Events: 263244
Overflow Queues: 0
Total Overflow Events: 0
Current Queue Id: 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 - Service Pack
2
CPU Level : 6 - 15
CPU Rev : 3851 - 1032
CPU count : 4 - 0
Logical CPU count : 4 - 1
Memory : 2048 - 512
Fixed Disk Count : 1 - 0
Total Disk Space (MB) : 476817 - 10227
Multi-Thread : 0 - 7
MAC Address : 4-005056c00008 -
0-000c290b1612
MAC Address 2 : 3-005056c00001 -
ComputerName : VMTEST-XP2 - VMTEST-XP4
IPaddr : 192.168.5.182 -
192.168.4.132
OSProductID : 55274-640-7804556-23379 -
76487-640-7804556-23915
Percent Match: 0

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 <OSI>
Machine <Test755>
User <user1>
IP Addr <192.168.5.182>
FQDN <Test755.osisoft.int>
Primary Domain Controller: <\\controller03.osisoft.int
IPV6 Compatible host address resolution:
Reverse name lookup setting: 1

Name: Test755.osisoft.int
Address: 192.168.5.182

PI Server Reference Guide 109


Command-Line Utility Reference

Family: PF_INET

Name: Test755.osisoft.int
Address: 192.168.5.182
Family: PF_INET

Name: Test755.osisoft.int
Address: 192.168.5.182
Family: PF_INET

Reverse name lookup setting: 0

Name: 192.168.5.182
Address: 192.168.5.182
Family: PF_INET

Name: 192.168.5.182
Address: 192.168.5.182
Family: PF_INET

Name: 192.168.5.182
Address: 192.168.5.182
This command also tests the availability of the Domain Controller. The command should
complete in a fraction of a second; if it hangs or takes more than a few seconds to return it
indicates the Domain Controller access may not be fast or consistent. Failure to have prompt
access to the Domain Controller results in poor PI System performance.

Export and Import Certificates


Authentication among the members of a PI Server Collective relies on certificates stored in
the Windows certificate store. If a member of a collective is a Microsoft Cluster, each node of
the cluster must have the certificate. During PI Server installation or upgrade, you need to
export the certificate from the first node and import it to each other node. For details, please
refer to PI High Availability on Microsoft Cluster Services.
The command to export the certificate from a cluster node to a file is:
pidiag –ecert [path]
The optional path is the name of the file to store the certificate. If it is not provided, the
certificate is stored in PI\adm\piserver.cer.
The command to import the certificate file to a cluster node is:
pidiag –icert [path]
The optional path is the name of the certificate file. If it is not provided,
PI\adm\piserver.cer is used.

Determine PIPC Home Directory


pidiag -getpipcpath

110
pidiag Reference

On 32-bit Windows, this command displays the PIPC home directory. On 64-bit Windows, it
displays the PIPC home directories for both 32-bit applications and 64-bit applications.
Example 1, on 32-bit Windows:
C:\Program Files\PIPC\adm>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 Set up a file for the batch queue
tasktime command
-dbg executable path Windows debug symbols
symbol_path
-wsd procid Get working set params
-wss procid minws Set working set params
maxws
-appendini INIFileName Utilities to interface to Windows ini file
Section Key [Value]
-getinivalue
INIFileName Section
Key
-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 Source of the message (matching the process name, Source 1, 2 or 3)
-src1  -src1 Source 1
-src2  -src2 Source 2
-src3  -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 minimum severity level-- choose the appropriate option for the minimum severity level you
-sw want to see
-se -si = information
-sc -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 <nodename>

-Port <port> (5450)

-Windows

-Trust

-Explicit

-Username Remote PI Server username


<username>
-Password Remote PI Server password
<password>
-PackageParam
<package
parameter>

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:
• 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.

118
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 <S> 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 Base


Server replication
DigitalSets digital sets Base

BDBUpdates batch database updates Archive

PIBatchUpdates batch updates Archive

PIUnitBatchUpdates unit batches Archive

PIUnitBatchOnUnitUpdates Unit batch updates for a Archive


specific unit
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 Pending
ptupdates Pibatch|1 0 0 0
ptupdates Pitotal|2 0 0 0
ptupdates PipeE|14|3 0 0 0
ptupdates RandE|16|4 0 0 0
ptupdates RmpSE|17|5 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 Flag Pending
-------- -------- ---- ---- -------
ptupdates pitotal|1 0 0 0
snapshots pialarm|2 1 0 0
ptupdates pialarm|2 0 0 0
ptupdates RmpSE|36|3 0 0 0
ptupdates RandE|37|4 0 0 0
ptupdates PipeE|254|9 0 0 0
ptupdates Procbook:zheng2:376:1|89 0 0 0
snapshots Procbook:zheng2:376:2|90 1 0 0
snapshots Procbook:zheng2:376:2|90 4 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 Event Queue file(s)
(or pimq####.dat)
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 Rate at which archive cache records are created.
Created/sec
Cache Records Rate at which archive cache records are deleted.
Deleted/sec
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 Rate of archive cache disk reads.
Reads/sec
Cache Record Memory Rate of archive cache memory hits.
Reads/sec
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 Rate at which archive cache records are removed from memory.
Operations/sec
Cache Flush Rate at which points are flushed to disk.
Operations/sec
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

Attribute Description
Connector Read Rate of calls to read events for mapped points through COM
Operations/sec Connectors. This rate is NOT included in the Read Operations/sec
counter.
Connector Events Rate of events read for mapped points through COM Connectors.
Read/sec 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 Time elapsed in milliseconds for one Events Read for a COM
Exec Time Connector point.
Connector Event Read Time elapsed in milliseconds for one Event Read for a COM
Exec Time Connector point.
Connector Summaries Time elapsed in milliseconds for one summaries call for a COM
Exec Time 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 Maximum number of cache records in the read-only pool.
Pool
Current Cache Record Current maximum number of cache records, this may be lower that
Pool the configured value due to low memory resources.
Config. Max Unflushed Maximum number of unflushed events per point.
Events/pt
Current Max Unflushed Current maximum number of unflushed events per point, this may be
Events/pt 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 Rate of PI Transfer Record creation.
Created/sec

132
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 Rate of PI Transfer Record edits.
Edited/sec
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 Rate of PI Transfer Record access.
Read/sec
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 Rate of PI Transfer Record deletion.
/sec

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 Total number of VSS, non-component mode backups that have
non-Component 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 Number of megabytes copied in last backup. This counter is not
Copied incremented for a non-component mode backup.
Last Backup PrepareBackup Number of seconds between PrepareBackup and Freeze events.
To Freeze Duration 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 Total files identified for last backup. Should be equal to copied +
Count 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


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 Rate at which digital state strings are translated to offsets.
Translations/sec
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 The total number of records in the module database.
Count
Module Create or Edit/sec Rate at which modules are created or edited.
Heading Set Create or Rate at which heading sets are created or edited.
Edit/sec
Heading Create or Edit/sec Rate at which headings are created or edited.
Module Database Create or Rate at which MDB records are created or edited.
Edit/sec

134
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 Rate at which module database information is accessed, not
Accesses/sec 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 Last time the configuration of the collective was modified
Time
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


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 The number of messages received by the PI Network Manager.
Received/sec
Bytes Sent/sec The number of bytes sent to the PI Network Manager.

136
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 The number of connections currently being processed for deletion
Deletions
PINet3 Asynch Call Delay in milliseconds between when a PINet call was scheduled and
Delay 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

Tag Explain Text


PERF.LOCALHOST.Logical Free Megabytes displays the unallocated space on the disk drive in
Disk(_Total).Free Megabytes MB. One MB = 1,048,576 bytes.
PERF.LOCALHOST.Memory % Committed Bytes In Use is the ratio of Memory: Committed
.% Committed Bytes In Use 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 is the overall rate that faulted pages are handled
.Page Faults/sec 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 Is the status normal for all members of the collective?
tive Statistics
PERF.LOCALHOST.Physical Disk Write Queue Length
Disk.Avg 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 % Processor Time is the percentage of time that the processor is
or(0).% Processor Time 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 Segments Retransmitted/sec is the rate at which segments are
gments Retransmitted/sec retransmitted, that is, segments transmitted containing one or more
previously transmitted bytes.

138
PI Server LocalHost Statistics

Tag Explain Text


PERF.LOCALHOST.TCP.Se Segments Sent/sec is the rate at which segments are sent,
gments Sent/sec including those on current connections, but excluding those
containing only retransmitted bytes.
PERF.LOCALHOST.Process % Processor Time is the percentage of elapsed time that all of the
(piarchss).% Processor Time threads of this process used the processor to execute instructions.
PERF.LOCALHOST.Process An instruction is the basic unit of execution in a computer, a thread
(pibasess).% Processor Time is the object that executes instructions, and a process is the object
created when a program is run. Code executed to handle some
PERF.LOCALHOST.Process hardware interrupts and trap conditions are included in this count.
(pinetmgr).% Processor Time On Multi-processor machines the maximum value of the counter is
PERF.LOCALHOST.Process 100 % times the number of processors.
(pisnapss).% Processor Time
PERF.LOCALHOST.PI Rate of archive events read.
Archive.Read Events
operations/sec
PERF.LOCALHOST.PI Archive cache disk reads.
Archive.Cache Record Disk
Reads/sec
PERF.LOCALHOST.PI Archive cache memory hits.
Archive.Cache Record
Memory Reads/sec
PERF.LOCALHOST.PI Base Total number of defined points. This number includes the
Subsystem.Point Count Connector Point Count.
PERF.LOCALHOST.PI The number of connections to the PI Network Manager. This
Network counter only applies to instance _Total.
Manager(_Total).Connection
s
PERF.LOCALHOST.PI The number of messages sent to the PI Network Manager.
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
PERF.LOCALHOST.PI Out of order events sent to the snapshot.
Snapshot.OutOfOrderSnapsh
ots/sec
PERF.LOCALHOST.PI Events sent to Event Queue.
Snapshot.Queued
Events/sec
PERF.LOCALHOST.PI Events sent to the snapshot.
Snapshot.Snapshots/sec

PI Server Reference Guide 139


PI Performance Counters

Tag Explain Text


PERF.LOCALHOST.PI Total Events pending in the PI Update Manager database.
Update-Manager.Pending
events
PERF.LOCALHOST.CALCU PI Compression Ratio is a performance equation that calculates
LATED.PI Compression amount of data that is compressed.
Ratio
PERF.LOCALHOST.CALCU PI Archive.Cache Hit Rate is a performance equation that
LATED.PI Archive.Cache Hit measures the rate at which data is accessed from memory as
Rate 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 The frequency the server is configured to communicate with the collective
Period
Sync Period The frequency this server is configured to sync with the collective
Last Communication Last time the server communicated with the collective
Time
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
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.

140
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 Rate of digital strings translated into offsets.


Translations/sec
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 Rate at which events are read from mapped points through COM
GetSnapshots/sec 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 Time elapsed in milliseconds for Snapshot Put for COM Connector a
Elapsed Time point.
Connector Snapshot Read Time elapsed in milliseconds for Snapshot Read for a COM
Elapsed Time Connector point.
Connector Updates Time elapsed in milliseconds for Updates for COM Connector points.
Elapsed Time
Events in Primary Queue Number of events in the primary queue file.

Number of Overflow Number of overflow queue files (0 if only the primary queue is active).
Queues
Events in Overflow Queues Total of events in the overflow queue files.

Estimated Remaining Estimated maximum number of events with current queue file.
Capacity
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 Rate of data page shifts in primary queue file.
Shifts/sec
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 Rate of full evaluations of the WHERE clause of a SELECT
Evaluations/sec 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 Rate of RPC calls made to the PI Archive Subsystem for summarized
c values (such as average, total, and standard deviation).
Dot Variable Rate of "dot" variable evaluations made within the PI SQL Library. A
Evaluations/sec 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 Rate at which points are returned by the PI Base Subsystem in
Calls/sec 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
Attribute Description
Message Queue Length Number of incoming messages in queue.
Pending Transactions Number of pending transactions.
Actual Pending Only for internal debugging purpose. You should use it only under the
Transactions suggestion of OSIsoft Technical Support.
Message Pickup Time Latency of incoming messages (time in message queue).
Message Execution Execution time of incoming message (RPC).
Time

142
PI Subsystem Statistics

Attribute Description
Message Complete Time Total message handling time (including results sending).
Callback Execution Time Execution time of transaction callback.
Transaction Number of transactions completed per second.
Completed/sec
Transaction Number of transactions cancelled per second.
Cancelled/sec
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 Number of milliseconds subsystem was frozen for the last backup
Duration
Backup Freeze Last Number of milliseconds required to put the subsystem into a frozen
Transition state for the last backup
Backup Freeze Last Number of freeze operations for the last backup. Multiple freeze
Count operations may be required for non-VSS backups
Backup Freeze Failures Number of failed freeze operations
Backup Freeze In If the subsystem is frozen, this counter is set to 1. Otherwise, it is set to
Progress 0.
Backup Freeze Max Maximum milliseconds that subsystem has been frozen for a backup
Duration
Backup Freeze Avg Average milliseconds that subsystem is frozen for backups
Duration

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


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.

144
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: ; OS 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: ; OS User:
; IP: ; AppID: 0 ; AppName: piartool (disconnecting)

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 <UNKNE|8> 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 <0
-9 PI_ATT_BADINTVALUE Illegal Status Value or Integer Value
-10 PI_ATT_OTHERPROC Cannot Create Tag Because Other Procedure is
Creating Tag
-11 PI_ATT_BADDIGCODERANGE Digital Code is Out of Range

-12 PI_ATT_NODSSTRING Digital state string not found

-13 PI_ATT_BADDSCODERANGE Digital State Code Out of Range For This Tag

-15 PI_ATT_NOSOURCETAG Source tag not found

-19 PI_ATT_PTATTZERO Point Attribute Zero Error or Disk Error for Point
Database
-20 PI_ATT_BADZEROSPAN Bad Zero or Span For Integer Point

-21 PI_ATT_NEGSPAN Span not greater than zero

-22 PI_ATT_BADTYPVALUE Typical Value Not Between Zero and Top of Range

PI Server Reference Guide 163


PI Error Code Reference

Code Code Identifier Message


-23 PI_ATT_BADDSCODE Illegal digital state code

-24 PI_ATT_BADNUMDS Bad Number of Digital States

-25 PI_ATT_BADPTTYPE Illegal point type

-26 PI_ATT_BADPTSOURCE Illegal point source

-27 PI_ATT_BADENGUNIT Illegal engineering unit code

-28 PI_ATT_BADLOC1 Bad Location Parameter 1 (Range Depends on


Point Source)
-29 PI_ATT_BADLOC2 Bad Location Parameter 2 (Range Depends on
Point Source)
-30 PI_ATT_BADLOC3 Bad Location Parameter 3 (Range Depends on
Point Source)
-31 PI_ATT_BADLOC4 Bad Location Parameter 4 (Range Depends on
Point Source)
-32 PI_ATT_BADLOC5 Bad Location Parameter 5 (Range Depends on
Point Source)
-33 PI_ATT_BADTOTPTTYPE Point Type of Totalized Point is Not Real

-34 PI_ATT_BADRATEPT Rate Point Type Must Be Real or Integer

-35 PI_ATT_BADRESCODE Illegal resolution code

-36 PI_ATT_BADARCHONOFF Illegal archiving on/off value

-37 PI_ATT_BADCOMPONOFF Illegal compressing on/off value

-38 PI_ATT_BADCOMPDEV Illegal compression deviation specification

-39 PI_ATT_BADCOMPMINTIME Illegal compression minimum time specification

-40 PI_ATT_BADCOMPMAXTIME Illegal compression maximum time specification

-41 PI_ATT_BADEXCDEV Illegal exception deviation specification

-42 PI_ATT_BADEXCMINTIME Illegal exception minimum time specification

-43 PI_ATT_BADEXCMAXTIME Illegal exception maximum time specification

-44 PI_ATT_BADFILTCODE Illegal filter code

-45 PI_ATT_BADTOTCODE Illegal totalization code

-46 PI_ATT_BADTOTCONV Illegal totalization conversion factor

164
Error Codes 1-99, With Messages

Code Code Identifier Message


-49 PI_ATT_BADSQRTCODE Illegal square root code

-50 PI_ATT_BADSCANONOFF Illegal scan on/off value

-51 PI_ATT_RESCODECONST Cannot change resolution code

-52 PI_ATT_BADTIMEFORMAT Illegal time/date string format

-53 PI_ATT_POINTNOTTOTAL Point is Not a Total

-54 PI_ATT_TOTDBFULL Totalization data base full

-55 PI_ATT_PTNOTINTOTDB Point Not Defined in Totalization Data Base

-56 PI_ATT_SINGLEQUOTE Tagname Should Be in Single Quotes, not Double


Quotes
-57 PI_ATT_MISSINGTAG Filter or Trigger Tag Does Not Exist

-58 PI_ATT_EXTDESCSYNTAX Syntax Error in Extended Descriptor

-59 PI_ATT_BADEXTDESCKEYWD Unrecognized Keyword in Extended Descriptor

-60 PI_ATT_NOPIDAVAIL No more pid slots for retrieving point update lists

-61 PI_ATT_NOTAGCHANGE No More Tags Created, Edited, or Deleted


-62 PI_ATT_NOPTUPDATE Not signed up for point updates
-63 PI_ATT_BADDISPDIG Display Digits <-20 or >10
-64 PI_ATT_BADCLAMPCODE Illegal Clamping Code (<0 or >3)
-65 PI_ATT_BADSCHEDCODE Illegal Scheduling Code (<0 or >2)
-66 PI_ATT_NONATSCHED Natural Scheduling is Not Allowed For
Post-Processed Tags
-67 PI_ATT_BADGROUPPSIZE Illegal group size for moving average (<2)
-68 PI_ATT_BADPERIOD Illegal period
-69 PI_ATT_BADOFFSET Illegal Offset (<0 or >86399)
-70 PI_EVM_BADNUMPOINTS Illegal Number of Points (<1)
-71 PI_EVM_BADPOINTNUM Point Number Out of Range
-72 PI_EVM_NOMOREEXCEPT No more room for programs requesting exceptions
-73 PI_EVM_TOOMANYPTS No room for this many points for this list
-74 PI_EVM_NOMOREPTS No room for more points
-75 PI_EVM_NOPTSESTAB No points established
-76 PI_EVM_PTSNOTDISESTAB Some points not disestablished
-78 PI_EVM_TIMEOUT Timed out
-79 PI_EVM_BADTIMEOUT Bad timeout value

PI Server Reference Guide 165


PI Error Code Reference

Code Code Identifier Message


-80 PI_EVM_SWITCHSERVER Server changed before exception buffer emptied

Error Codes 100-199, With Messages


Code Code Identifier Message
-101 PI_ARCH_DATENOTONLINE Date not on-line
-102 PI_ARCH_RECORDNOTFOUND Record not found (empty)
-103 PI_ARCH_NODATA No Data For This Point at This Time
-105 PI_ARCH_BADSTARTENDTIME End Time Not After Start Time, or Start Time <0
-106 PI_ARCH_NOGOODDATA No Good Data For This Point at This Time
-107 PI_ARCH_NEGSQUAREROOT Cannot Calculate Square Root of Negative Number
-108 PI_ARCH_BADEDITTIME Time is Before the Editing Time Limit
-109 PI_ARCH_VALUEEXISTS Value at This Time Already Exists
-110 PI_ARCH_SLOWARCHIVE Archive program not keeping up with events
-111 PI_ARCH_30SECRULE Event Not Processed by Archive Program Within
30 Seconds
-112 PI_ARCH_ARCH1OFFLINE Point not created because archive one not on-line
-113 PI_ARCH_TOOFEWVALUES “Number of Values” Argument to Archive Retrieval
Routine is Bad

Error Codes 200-299, With Messages


Code Code Identifier Message
-201 PI_PE_CORRUPTFILE Performance Equation file corrupted
-202 PI_PE_CANTDELETEPETAG Cannot delete tag that is used in PE
-203 PI_PE_CANTDELETETOTTAG Cannot delete tag that is used in totalization
-204 PI_PE_CANTDELETESQCTAG Cannot delete tag that is used in SQC calc
-251 PI_SQL_MEMERR SQL: memory allocation error
-252 PI_SQL_SYNERR SQL: syntax error
-253 PI_SQL_INVSTMT SQL: invalid statement
-254 PI_SQL_INTERR SQL: severe internal error
-255 PI_SQL_NOSUPPORT SQL: unsupported statement
-256 PI_SQL_TIMERR SQL: invalid time
-257 PI_SQL_TAGERR SQL: tag not found
-258 PI_SQL_TYPERR SQL: invalid data type
-259 PI_SQL_CALCERR SQL: calculation error
-260 PI_SQL_INVWHERE SQL: invalid WHERE clause

166
Error Codes 300-399, With Messages

Code Code Identifier Message


-261 PI_SQL_COLERR SQL: column count error
-262 PI_SQL_NOSELECT SQL: statement is not a SELECT
-263 PI_SQL_SYSTEMERR SQL: system error occurred
-264 PI_SQL_TIMESTEPERR SQL: TIMESTEP error
-265 PI_SQL_NOQUERY SQL: no query found in string
-266 PI_SQL_USERABORT SQL: use aborted execution
-267 PI_SQL_INVARG SQL: invalid function argument
-268 PI_SQL_NOTSAFE SQL: execution too expensive
-269 PI_SQL_INVTABLE SQL: invalid table name
-270 PI_SQL_INVALIAS SQL: invalid table alias name
-271 PI_SQL_BADINI SQL: invalid INI file entries
-272 PI_SQL_TRUNC SQL: returned string truncated
-273 PI_SQL_TIMEOUT SQL: query timed out
-274 PI_SQL_NOPARAM SQL: run-time parameter missing
-275 PI_SQL_BUSY SQL: handle is busy with another operation
-280 PI_GRID_MEMERR Pigrid: memory allocation error
-281 PI_GRID_RANGERR Pigrid: column index out of range
-282 PI_GRID_NOCOLTYPE Pigrid: column not defined
-283 PI_GRID_NOCOLSIZE Pigrid: data size not set
-284 PI_GRID_INVDTYPE Pigrid: invalid data type
-285 PI_GRID_INVDSIZE Pigrid: invalid data size

Error Codes 300-399, With Messages


Code Code Identifier Message
-301 PI_DC_CORRUPTFILE Display file corrupted
-302 PI_DC_CANTDELETEPETAG Cannot delete tag that is used on a display

Error Codes 500-599, With Messages


Code Code Identifier Message
-501 PI_SQC_BADCHARTTYPE Sqc: illegal chart type
-502 PI_SQC_BADALARMGROUP Sqc: illegal alarm group number
-503 PI_SQC_CALCDBFULL Sqc: calculation data base full
-504 PI_SQC_BADSAMPLESIZE Sqc: Illegal Sample Size (<0 or >32767)
-505 PI_SQC_BADSAMPLEPERIOD Sqc: illegal sample period

PI Server Reference Guide 167


PI Error Code Reference

Code Code Identifier Message


-506 PI_SQC_BADCALCPERIOD Sqc: calculation period less than sample period
-507 PI_SQC_BADPERIODSTART Sqc: illegal start period time
-508 PI_SQC_BADIGNORESAMP Sqc: Illegal Number of Samples to Ignore After
Trigger
-509 PI_SQC_BADMOVAVGWT Sqc: illegal geometric moving average weight
-510 PI_SQC_CUSUMKNEG Sqc: CUSUM k Less Than Zero
-511 PI_SQC_CUSUMHNEG Sqc: CUSUM h Less Than Zero
-512 PI_SQC_BADINITCUSUM Sqc: Illegal Initial CUSUM (<0 or >h)
-513 PI_SQC_BADTESTGROUP Sqc: Illegal Test Group Number (<1 or >256)
-515 PI_SQC_CALCMISSING Sqc: calculation not found
-516 PI_SQC_RAWTAGMISSING Sqc: raw data tag for SQC calculation not found
-517 PI_SQC_TRIGTAGMISSING Sqc: Trigger Tag for SQC Calculation Not Found
-518 PI_SQC_CHARTTAGDEFD Sqc: Chart Tag Already Defined in SQC Database
-519 PI_SQC_CHARTEQUALSRAW Sqc: Chart Tag is the Same as the Raw Tag
-520 PI_SQC_INPUTFILEMISSING Sqc: input file does not exist
-521 PI_SQC_BADINPUTFILEFMT Sqc: Input File is Not Properly Formatted
-522 PI_SQC_BADRANGEVALUE Sqc: Value is Out of Range
-523 PI_SQC_BADRANGEALARM Sqc: Alarm Number is Out of Range
-524 PI_SQC_CANTWRITEFILE Sqc: cannot open file for writing
-525 PI_SQC_COMMENTMISSING Sqc: Comment Not Found in Comment File
-526 PI_SQC_INVARRAYINDEX Sqc: Array Index is Out of Valid Range
-527 PI_SQC_CTLLIMTAGMISSING Sqc: Control Limit Tag is Not in SQC Structure
-528 PI_SQC_CTLLIMNOTINFILE Sqc: Control Limits Not Found in Control Limit File

Error Codes 800-899, With Messages


Code Code Identifier Message
-801 PI_EP_BADCONST Expression parser: illegal constant
-802 PI_EP_BADNUM Expression parser: illegal number
-803 PI_EP_TOOMANYTAGS Expression parser: too many constants/tags
-804 PI_EP_TOOCOMPLEX Expression parser: expression too complex
-805 PI_EP_BADKEYWORD Expression parser: illegal keyword
-806 PI_EP_BADCHAR Expression parser: illegal character
-807 PI_EP_TOOMANYUNARIES Expression parser: too many unary operators
-808 PI_EP_BADBOOLEANS Expression Parser: Illegal Combination of Boolean
Operators
-809 PI_EP_UNBALPARENS Expression parser: unbalanced parentheses

168
Error Codes 900-999, With Messages

Code Code Identifier Message


-810 PI_EP_TOOMANYRTPARENS Expression parser: too many right parentheses
-811 PI_EP_NOPARENS Expression Parser: Nothing in Parentheses
-812 PI_EP_BADIF Expression parser: illegal if-then-else structure
-813 PI_EP_CMDSTACKOVERFLOW Expression parser: command stack overflow
-814 PI_EP_NULLEQUATION Expression Parser: Null Equation for Expression
-815 PI_EP_REDSTACKOVERFLOW Expression Parser: Reduction Stack Overflow for
Expression
-816 PI_EP_BADTOKEN Expression parser: illegal token
-817 PI_EP_SYNTAX Expression parser: syntax error
-818 PI_EP_CALCSTACKOVERFLOW Expression parser: calculation stack overflow
-819 PI_EP_DISKERR Expression parser: disk error reading constant files
-820 PI_EP_CALCOVERFLOW Expression parser: calculation overflow
-821

PI_EP_DIVZERO Expression Parser: Division by Zero


-822 PI_EP_BADARGUMENT Expression parser: illegal function argument
-823 PI_EP_BADEXPONENT Expression Parser: Non-integer exponent
-824 PI_EP_BADCONSTANT Expression parser: undefined constant

Error Codes 900-999, With Messages

Code Code Identifier Message


-900 PI_EE_BADTAG Expression evaluation: illegal tag
-912 PI_EE_BADIF Expression evaluation: illegal if-then-else structure
-914 PI_EE_NULLEQUATION Expression Evaluation: Null Equation for
Expression
-916 PI_EE_BADTOKEN Expression evaluation: illegal token
-917 PI_EE_SYNTAX Expression evaluation: syntax error
-918 PI_EE_CALCSTACKOVERFLOW Expression evaluation: calculation stack overflow
-920 PI_EE_CALCOVERFLOW Expression evaluation: calculation overflow
-921 PI_EE_DIVZERO Expression Evaluation: Division by Zero
-922 PI_EE_BADARGUMENT Expression evaluation: illegal function argument
-923 PI_EE_BADEXPONENT Expression Evaluation: Non-integer exponent
-925 PI_EE_BADVALUE Expression evaluation: illogical current value
-981 PI_NET2_BADTABLEID Table ID Specified is Not Supported
-982 PI_NET2_BADTABLECODE Specified Table Code is Not Supported
-983 PI_NET2_BADTRANSMODE Requested Transaction Mode is Not Supported

PI Server Reference Guide 169


PI Error Code Reference

-991 PI_NET2_BADFUNCCODE PINet Function Code is Not Valid


-992 PI_NET2_BADLENGTH Specified Length is Not Consistent
-993 PI_NET2_BADCOUNT Specified Count is Not Valid
-994 PI_NET2_BADPINETVER Incompatible PINet version
-995 PI_NET2_BADMSGSEQ Bad PINet message sequence
-996 PI_NET2_MSGTOOBIG Message Too Big for PINet
-998 PI_NET2_MEMALLOCERR Memory allocation error
-999 PI_NET2_LOGINREQD Request not permitted without login

Error Codes 1000-1099, With Messages


Code Code Identifier Message
-1000 PI_NET2_BADGRID Grid not implemented
-1001 PI_NET2_NODEFHOST Default host not found
-1002 PI_NET2_NOBATSUBSYS No Batch Subsystem on PI2 server

Error Codes 10000-10999, With Messages


Code Code Identifier Message
-10000 PI_ERR_MALLOC Failed memory allocation
-10001 PI_ERR_NEW Failed new operation
-10002 PI_ERR_ACTIVATE Unable to Activate Object
-10003 PI_ERR_PASSIVATE Unable to Passivate Object
-10004 PI_ERR_IMPOSS Internal error (impossible)
-10005 PI_ERR_UNDERRANGE Subscript under range
-10006 PI_ERR_OVERRANGE Subscript over range
-10007 PI_ERR_BADPOINTER Bad or Null Pointer
-10008 PI_ERR_UNSUPPORTED Unsupported or Unimplemented Call
-10009 PI_SHUTDOWN PI system shutting down
-10010 PI_ERR_TIMEOUT PI system timed out
-10011 PI_ERR_ACCESSLOCK Target Object in Use or Locked
-10225 PI_AUTHINFO_NOTEXIST AuthInfo does not exist
-10226 PI_AUTHINFO_INVTYPE AuthInfo type is invalid
-10227 PI_AUTHINFO_TYPE_REQUIRED AuthInfo type is required
-10228 PI_AUTHINFO_TYPE_ID_MISMATC AuthInfo type/identifier mismatch
H
-10229 PI_AUTHINFO_ID_REQUIRED AuthInfo identifier is required

170
Error Codes 10000-10999, With Messages

Code Code Identifier Message


-10250 PI_ACL_ACE_EMPTY ACL is invalid
ACE is empty
-10251 PI_ACL_ACE_NOIDENT ACL is invalid
ACE requires an existing Identity
-10252 PI_ACL_ACE_INVTYPE ACL is invalid
ACE type is missing or invalid
-10253 PI_ACL_ACE_INCVERBLIST ACL is invalid
ACE security verb list is incomplete
-10254 PI_ACL_ACE_VERBMISSING ACL is invalid
ACE security verb is missing
-10255 PI_ACL_ACE_INVVERB ACL is invalid
ACE security verb is invalid
-10256 PI_ACL_ACE_UNEXPCONTENT ACL is invalid
Additional ACE content is unexpected
-10257 PI_ACL_ACE_INVIDENT ACL is invalid
ACE Identity is invalid
-10258 PI_ACL_ACE_INVPRIVS ACL is invalid
ACE privileges are invalid
-10259 PI_ACL_ACESCONFLICT ACL is invalid
Conflicting ACEs are not supported

-10300 PI_IDENT_INVNAME Identity name is invalid


cannot be empty, contain chars '|' and ', or
be a positive integer
-10301 PI_IDENT_INVTYPE Identity type is invalid

-10302 PI_IDENT_NOTYPEEDIT Identity type cannot be edited

-10303 PI_IDENT_INVFLAGS Identity config flags are invalid

-10304 PI_IDENT_INVFLAGS_4PIADMIN piadmin config flags are invalid

-10305 PI_IDENT_INVFLAGS_4PIWORLD PIWorld config flags are invalid

-10306 PI_IDENT_INVFLAGS_4STUB Built-inIdentity config flags are invalid

-10307 PI_IDENT_DISABLED Identity is disabled

-10308 PI_IDENT_DISABLED_4TRUST Identity is disabled for Trusts

-10309 PI_IDENT_DISABLED_4MAPPING Identity is disabled forIdentityMappings

PI Server Reference Guide 171


PI Error Code Reference

Code Code Identifier Message


-10310 PI_IDENT_NOTEXIST Identity does not exist

-10311 PI_IDENT_DISABLED_4EXPLICIT Identity is disabled for explicit login

-10312 PI_IDENT_INVFLAGS_4PIADMINS Piadmins config flags are invalid

-10313 PI_IDENT_INVFLAGS_4PIUSERS piusers config flags are invalid

-10314 PI_IDENT_NOEDIT_4DYNUSER A dynamically created PI User cannot be


modified
-10350 PI_IDMAP_NOTEXIST IdentityMapping does not exist
-10351 PI_IDMAP_INVTYPE IdentityMapping type is invalid
-10352 PI_IDMAP_NOTYPEEDIT IdentityMapping type cannot be edited
-10353 PI_IDMAP_INVFLAGS IdentityMapping flags are invalid
-10354 PI_IDMAP_IDENTREQUIRED IdentityMapping requires an existing Identity
-10355 PI_IDMAP_PRINCIPREQUIRED IdentityMapping requires a unique security
principal
-10356 PI_IDMAP_CACHE_NOTAVAIL IdentityMapping cache is not available
-10357 PI_IDMAP_CACHE_INVOPER IdentityMapping cache operation is invalid
-10421 PI_XS_SECOBJ_ACLUSEUNEXPEC Secure object
TED version is not supported - downgrade
required
-10422 PI_XS_SECOBJ_ACLUSEEXPECTE Secure object
D version is not supported - upgrade required
-10423 PI_XS_SECOBJ_NOACLINCACHE Secure object
associated ACL not found in cache
-10424 PI_XS_SECOBJ_SPECAMBIGUOUS Secure object
spec is ambiguous - use either the Security
attribute OR all the Owner, Group, Access
attributes
-10425 PI_XS_SECOBJ_NOTCOMPATIBLE Secure object
spec requires use of Security attribute
exclusively
-10426 PI_XS_SECOBJ_PTSPEC_NOTCOM Secure object
PAT spec requires use of PtSecurity attribute
exclusively
-10427 PI_XS_SECOBJ_DATASPEC_NOTC Secure object
OMPAT spec requires use of DataSecurity attribute
exclusively
-10428 PI_XS_SECOBJ_PTSPEC_AMBIGU Secure object
OUS spec is ambiguous - use either the
PtSecurity attribute OR all the PtOwner,
PtGroup, PtAccess attributes

172
Error Codes 10000-10999, With Messages

Code Code Identifier Message


-10429 PI_XS_SECOBJ_DATASPEC_AMBIG Secure object
UOUS spec is ambiguous - use either the
DataSecurity
attribute OR all the DataOwner, DataGroup,
DataAccess attributes
-10430 PI_XS_UNSUPPORTEDTOKEN Security token is not supported -
mismatched client / server version
-10431 PI_XS_AUTHMETHDISABLED Authentication method is disabled by current
server policy
-10432 PI_XS_DBSEC_BUILTIN_NODELETE Built-in DBSecurity entry cannot be deleted
-10433 PI_XS_NOMAPPING No identity mapping for this request
-10434 PI_XS_DBSEC_EDIT_INPROGRESS Previous edit to DBSecurity entry is still
pending
-10435 PI_XS_FAILED_AUTH_RECORD Failed to acquire authentication identifier
-10436 PI_TRUST_INVFLAGS Trust flags are invalid
-10400 PI_XS_NOREAD No read access - secure object
-10401 PI_XS_NOWRITE No write access - secure object
-10402 PI_XS_BADSTRING Badly formed access string
-10403 PI_XS_BADUGVER Version Mismatch in Usergroup Activate
-10404 PI_XS_BADUSERVER Version Mismatch in User Activate
-10405 PI_XS_CTXIDINUSE User Context ID in Use
-10406 PI_XS_GROUPINUSE Group ID in Use
-10407 PI_XS_NOACCESS No access - secure object
-10408 PI_XS_BADUSERSTR Invalid security user/owner string
-10409 PI_XS_BADGRPSTR Invalid security group string
-10410 PI_XS_BADDBNAME Invalid security database name
-10411 PI_XS_MISMATCH security or trust relation mismatch
-10412 PI_XS_TRUSTUNSUP Trust relation not supported on server
-10413 PI_XS_NOTRUST No trust relation for this request
-10414 PI_XS_SIMILARTRUST Trust records must differ more than name
and Piuser
-10415 PI_XS_IPANDMASK Must specify both IP address and Net Mask
-10416 PI_XS_NONULLTRUST Trust definition must include more than
name and Piuser.
-10417 PI_XS_NOPIADMIN User must be piadmin for this operation
-10418 PI_XS_DBSECNOTINIT DB Security not initialized
-10419 PI_XS_NULLSECOBJ Unable to retrieve secure object

PI Server Reference Guide 173


PI Error Code Reference

Code Code Identifier Message


-10420 PI_XS_NOWRITESECONDARY Direct write operations disallowed on
secondary server of collective
-10450 PI_FB_BADCREATEFILE Create new file failed
-10451 PI_FB_BADOPENFILE Open existing file failed
-10452 PI_FB_BADFILECLOSE Close file failed
-10453 PI_FB_BADFILEREMOVE Delete file failed
-10454 PI_FB_BADFILETRUNCATE Truncate file failed
-10455 PI_FB_INVALIDFILE Fstat Failed
-10456 PI_FB_BADFILELOCK Fcntl Failed to Get Lock
-10457 PI_FB_BADFILEUNLOCK Fcntl Failed to Free Lock
-10458 PI_FB_BADHEADER Illegal file header parameters
-10459 PI_FB_FILEOPEN File open
-10460 PI_FB_FILECLOSED File closed
-10461 PI_FB_BADFILEREAD Read from file failed
-10462 PI_FB_BADFILEWRITE Write to file failed
-10463 PI_FB_BADRECNOVALUE Recno Greater Than Directory Size
-10464 PI_FB_RECNOINUSE Recno In Use
-10466 PI_FB_RECNONOTFOUND No Record Available for Passed recno
-10467 PI_FB_BADRECLEN Reclen Greater Than Maximum Allowed
Size
-10468 PI_FB_TIMETOGROWDIR Getting New recno, Directory is Full
-10469 PI_FB_BADBUFFERSIZE Passed Buffer Too Small to Hold Record
-10470 PI_FB_BADFILESEEK Lseek Failed
-10471 PI_FB_BADFILEHEADER Fatally corrupted file header
-10472 PI_FB_DIRTYHEADER Dirty header
-10473 PI_FB_INVUSERBLOCK Invalid user block size
-10474 PI_FB_BADVERSION Version mismatch
-10475 PI_FB_CNTMISMATCH Record count mismatch between header
and index
-10476 PI_FB_LOWDISKSPACE low disk space, file size cannot be increased
-10477 PI_FB_PATHNOTDIRECTORY The path is valid, but the path is not a
directory
-10478 PI_FB_NULLPATHSTRING Cannot extract file and path from null string
-10479 PI_FB_FILEPATH_TOOLONG File path and name exceed 300 characters
-10480 PI_FB_UPGRADE_REQUIRED File version is not supported - upgrade
required
-10550 PI_PD_TAGEXISTS Tag Already Exists in Table

174
Error Codes 10000-10999, With Messages

Code Code Identifier Message


-10551 PI_PD_INVTAG Invalid Characters in Tag
-10552 PI_PD_BADCHAIN Broken Context Chain in Table
-10553 PI_PD_INVPTID Ptid is Not a Valid Point
-10554 PI_PD_CTXEXISTS Tag Already Exists for Context
-10555 PI_PD_NOTAG Tag Does Not Exist in Table
-10556 PI_PD_ENDSEARCH End of Table Reached
-10557 PI_PD_BADASVER Bad ptattributeset Version
-10558 PI_PD_BADPTCLVER Bad ptclass Version
-10559 PI_PD_BADPOINTVER Bad point version
-10560 PI_PD_POINTINUSE Point Already Has a ptclass
-10561 PI_PD_PTCLASSINUSE Point class already defined
-10562 PI_PD_CLASSESINUSE Ptclasses Already Defined
-10563 PI_PD_BADPTCLASSREV Point class revision mismatch
-10564 PI_PD_NOPTCLASS Point class not defined
-10565 PI_PD_NOMOREPTS No More Points in Search
-10566 PI_PD_VALIDFAIL Point validation failed
-10567 PI_PD_AMBIGUOUS Point ID does not match Tag or Tag rename
to same name
-10568 PI_PD_NOMATCHINGPOINTS No points found in search
-10569 PI_PD_BADATTRIBUTE Point does not contain specified attribute
-10570 PI_PD_NOEDIT Attempt to edit or set internally set point
attribute
-10571 PI_PD_INVALIDATT Attempt to create attribute set with invalid
attribute name
-10572 PI_PD_INVALIDNAME Invalid name for point class or attribute set
-10573 PI_PD_NOBASEATT Base attribute set not included in point class
definition
-10574 PI_PD_NODELBASEATT Attribute set delete not allowed.
-10575 PI_PD_ATTSETINUSE Attribute set is in use.
-10576 PI_PD_MISSINGREQATTRIBUTES Required attribute missing in the attribute
set
-10577 PI_PD_BASEATTNAME Attribute name being used by base attribute
set
-10578 PI_PD_BUILTINATTNAME Attribute name being used by built-in
-10579 PI_PD_BADPTTYPECHANGE Unsupported point type change
-10580 PI_PD_RESERVEDNAME Name reserved for internal use
-10581 PI_PD_INVALIDBASEATTNAME Invalid attribute name for base attribute set

PI Server Reference Guide 175


PI Error Code Reference

Code Code Identifier Message


-10582 PI_PD_NOATTSETRENAME Rename not allowed for this attribute set
-10583 PI_PD_CLASSINUSE Point class is in use
-10584 PI_PD_BADPTCLASSESREV PIptclasses revision mismatch
-10585 PI_PD_NOEDITBASECLASS Base point class edit/delete not allowed
-10586 PI_PD_INVALIDATTTYPE Unsupported attribute type
-10587 PI_PD_NOEDITBASEATT Base attribute set edit not allowed except for
default change
-10588 PI_PD_MISSINGREQATTRIBUTESE Required attribute set missing in the point
TS class
-10589 PI_PD_NODELSET Delete not allowed for this attribute set
-10590 PI_PD_NODELCLASS Delete not allowed for this point class
-10591 PI_PD_NOPTCLSRENAME Rename not allowed for this point class
-10592 PI_PD_ATRTYPECHANGEINPREDE Attribute type change in this attribute set not
FORINUSEATRSET allowed
-10593 PI_PD_ATTRIBDELINPREDEFORIN Attribute delete in this attribute set not
USEATTRIBSET allowed
-10594 PI_PD_ATTRIBSETDELINPREDEFO Attribute set delete in this point class not
RINUSEPTCLASS allowed
-10595 PI_PD_STANDALONEMODEREQUIR This operation requires Standalone mode
ED
-10596 PI_PD_PTCLSNOCOMCHNG Disallow Changes in point class affecting
com connector status
-10597 PI_PD_RECNOMISMATCH Recno Mismatch on secondary
-10598 PI_PD_ATTRIBUTEINUSE Attribute in use. Cannot remove from a set
or class
-10599 PI_PD_DUPLICATE_RECNO Multiple points detected with the same
recno
-10650 PI_UD_INVALIDGRPUSRNM Invalid Group or User Name
-10651 PI_UD_INVGRPSLFREF Invalid Group self reference
-10652 PI_UD_INVGRPLAYER Super Group cannot be member Super
Group
-10700 PI_DS_NAMEEXISTS State Already Exists in Table
-10701 PI_DS_SETNOTFOUND Set not found
-10702 PI_DS_STATENOTFOUND State not found
-10703 PI_DS_ILLEGALSETDEFINITION Illegal set definition: no states defined
-10704 PI_DS_CANTDELETESYSSET Cannot delete system state-set
-10705 PI_DS_TOOMANYSETS Maximum number of Sets Exceeded
-10706 PI_DS_TOOMANYSTATES Maximum number of States Exceeded
-10707 PI_DS_SETMISMATCH Digital set number mismatch during type
coercion

176
Error Codes 10000-10999, With Messages

Code Code Identifier Message


-10708 PI_DS_NEGATIVEOFFSET Negative state number in digital type
coercion
-10709 PI_DS_INVALIDSETNO Event does not match point digital set
-107-10 PI_DS_NOTADIGITALPOINT Digital event was received for a non-digital
point
-10721 PI_NET_ABORT PINet: client aborted connection
-10722 PI_NET_TIMEOUT PINet: Timeout on PI RPC or System Call
-10723 PI_NET_NOCONNECTION PINet: no connection
-10724 PI_NET_QUEOVERFLOW PINet: queue overflow
-10725 PI_NET_SYNCHRONOUS PINet: synchronous
-10726 PI_NET_ASYNCHRONOUS PINet: asynchronous
-10727 PI_NET_RPC_NONEXISTENT PINet: RPC is Non-Existent
-10728 PI_NET_SEND_ERROR PINet: send error
-10729 PI_NET_RECV_ERROR PINet: receive error
-10730 PI_NET_NO_MESSAGE PINet: no message
-10731 PI_NET_INCOMPLETE_MESSAGE PINet: incomplete message
-10732 PI_NET_CORRUPTED_MESSAGE PINet: corrupted message
-10733 PI_NET_RPCRESOLVEROFFLINE PINet: RPC Resolver is Off-Line
-10734 PI_NET_BROKENCONNECTION PINet: broken connection
-10735 PI_NET_TRANSACTIONLISTFULL PINet: session manager transaction list full
-10736 PI_NET_ILLEGALRPCID PINet: RPC Table ID or Entry ID set to
illegal value of 0.
-10737 PI_NET_PENDING PINet: Asynchronous connection to
pinetmgr is Pending
-10738 PI_NET_DISABLED PINet: connection disabled
-10739 PI_NET_INVALIDRPCSERVERTABL PINet: Invalid or Null RPC Server Table List
ELIST
-10740 PI_NET_INVALIDHOST PINet: invalid host
-10741 PI_NET_RPCRESOLVERNOTAVAIL PINet: RPC Resolver chooses to not service
ABLE request
-10742 PI_NET_CONNECTIONLISTFULL PINet: Connection list full
-10743 PI_NET_RPCRESOLVERTMPOFFLI PINet: RPC Resolver temporarily Off-Line
NE
-10744 PI_NET_TRANSLATORINUSE PINet: PI API client attempted two or more
simultaneous calls.
-10745 PI_NET_MESSAGEVERIFICATIONF PINet: Message verification failure.
AILURE
-10746 PI_NET_MESSAGETOOLARGE PINet: Attempt to send or receive message
larger than maximum allowable

PI Server Reference Guide 177


PI Error Code Reference

Code Code Identifier Message


-10747 PI_NET_TRANSLATORVERIFICATIO PINet: PIAPI translator verification failure.
NFAILURE
-10748 PI_NET_NOROUTEENTRY PINet: No routing entry exists for RPC
-10749 PI_NET_NORPCCODE PINet: No RPC entry for table/function code
-10750 PI_NET_NORPCNAME PINet: No RPC entry for table/function name
-10751 PI_NET_NORPCCALLBACK PINet: No callback function for RPC entry
-10752 PI_NET_EXCESSIVEZEROBYTEREA PINet: Connection broken by peer
DS
-10753 PI_NET_INVALIDSESSIONID PINET: Invalid session ID
-10754 PI_NET_RPCTABLEGENMISMATCH PINET: RPC Table Generation mismatch
-10755 PI_NET_COMPLETIONPORTERROR PINET: Completion Port Error
-10756 PI_NEWERSERVERVERSIONREQUI PINET: Newer server version required
RED
-10757 PI_NOREMOTECONNECTION PINET: No remote connection
-10758 PI_NET_FAILEDREMOTECONNECTI PINET: Failed remote connection
ON
-10759 PI_NET_NO_BYTES recv() returned zero bytes
-10760 PI_NET_EXCESSIVEREADRETRIES Read retry limit exceeded.
-10761 PI_NET_FORCEDDISCONNECT Connection deleted by request of
administrator
-10762 PI_NET_MAXCONNIDLETIME Maximum Connection Idle time reached:
Connection Closed
-10763 PI_NET_INVALIDPINETMGRCONTR Invalid PINetMgr Control Mode
OLMODE
-10764 PI_NET_NOTLOCALSESSION Access only allowed by local PI Server
connection
-10765 PI_NET_USERCANCELEDCONNEC ser canceled session login
TION
-10766 PI_NET_TRANSACTIONABORTED PINET: Transaction aborted by local
session thread
-10767 PI_NET_CONCURMSGABOVELIMIT Client exceeded maximum concurrent
queries in RPC thread pool
-10768 PI_NET_UPLOADCLIENTTABLE Not all client tables were updated

Error Codes 11000-11999, With Messages


Code Code Identifier Message
-11001 PI_AR_RCHDVMM Record header version mismatch.
-11002 PI_AR_RCHDDMM Record header data mismatch.
-11003 PI_AR_RCHDSMM Record header size mismatch.

178
Error Codes 11000-11999, With Messages

Code Code Identifier Message


-11004 PI_AR_RCHDBADPTRECID Record header bad (0) point record ID.
-11005 PI_AR_RCHDBADRECID Record header bad (0) record ID.
-11006 PI_AR_RCHDBADSIZE Record header bad set size byte count.
-11007 PI_AR_RCHDOVERWRITE Record header stream overwrite.
-11008 PI_AR_RCBADDATATYPE Attempted to Add Event With Invalid Data Type.
-11009 PI_AR_RCOBJTOOBIG Event Contents Are Too Big to Fit in Any Record.
-11010 PI_AR_NOTTYPEDIG Record not type=digital.
-11011 PI_AR_NOTTYPEFLOAT2 Record not type=float2 – zero/span do not apply.
-11012 PI_AR_INVRECCNT Invalid record count for creating archive.
-11013 PI_AR_INVRECSIZE Invalid record size for creating archive.
-11014 PI_AR_BADSTREAMATT Failed to Attach Archive File to Stream.
-11015 PI_AR_ARCFILEVMM Archive file version mismatch.
-11016 PI_AR_ARCFILERAB Archive File in Unrecognized State.
-11017 PI_AR_CRPTTIME Corrupt Time Values in Archive Header.
-11018 PI_AR_CRPTPTRS Corrupt Overflow or Primary Record Pointers.
-11019 PI_AR_ARCNOTMNTD Archive file not mounted.
-11020 PI_AR_INVPTCNT Point Count Out of Range.
-11021 PI_AR_CRPTCACHEREC Cache record corrupt.
-11022 PI_AR_PTRECIDBND Invalid Value for Requested ptrecid.
-11023 PI_AR_BOUNDS Archive record full.
-11024 PI_AR_BADCACHELOAD Cache->loadrecord Failed.
-11025 PI_AR_BADGETTARREC Arcmgr::gettargetrecord Failed.
-11026 PI_AR_BADOVERFLOW Arcfile::overflowrecord Failed.
-11027 PI_AR_BADARLOADREC Arcfile::loadrecord Failed.
-11028 PI_AR_DUPARCFAIL Requested to Load Archive File Already Loaded.
-11029 PI_AR_BADSETINDEX An Index Record Does Not Have an Index.
-11030 PI_AR_BADINDEXSRC Set Index Did Not Receive an Index Record.
-11031 PI_AR_EMPTYRECORD No Events in Record.
-11032 PI_AR_NOEVENTAFTER No Events After Passed Eventide.
-11033 PI_AR_NOEVENTBEFORE No Events Before Passed Eventid
-11034 PI_AR_BADPTRECID Invalid ptrecid Passed.
-11035 PI_AR_STOREOPEN Underlying Storage is Open.
-11036 PI_AR_BADARCRECORD Invalid archive record pointer passed.
-11037 PI_AR_BADARCFILE Invalid archive file pointer passed.
-11038 PI_AR_NOARCHIVEBEFORE No archive before passed archive.
-11039 PI_AR_NOARCHIVEAFTER No archive after passed archive.
-11040 PI_AR_NORECORDBEFORE No record before passed record.

PI Server Reference Guide 179


PI Error Code Reference

Code Code Identifier Message


-11041 PI_AR_NORECORDAFTER No record after passed record.
-11042 PI_AR_RECNOTINCACHE Target Record Not in Cache.
-11043 PI_AR_DATENOTONLINE No archive online for target time.
-11044 PI_AR_EVENTOUTOFORDER Attempting to Add an Event Before Last Event.
-11045 PI_AR_INDEXRECMISMATCH Add event index mismatch.
-11046 PI_AR_DATEINFUTURE Target Date in Future.
-11047 PI_AR_INVMAXCOUNT Invalid maximum count.
-11048 PI_AR_INVINTERVAL Invalid intervals for archive call.
-11049 PI_AR_INVTIMES Invalid times for archive call.
-11050 PI_AR_INVRECTYPE Invalid record type.
-11051 PI_AR_COUNTTOOSMALL Count not large enough for interval.
-11052 PI_AR_SNAPMISMATCH Count mismatch loading snapshot.
-11053 PI_AR_ARCHIVEFULL No More Available Records in This Archive.
-11054 PI_AR_INVALIDSTATE Invalid Archive State For Mounting or
Dismounting.
-11055 PI_AR_INVSTIME Invalid start time.
-11056 PI_AR_INVETIME Invalid end time.
-11057 PI_AR_NOTENOUGHVALS Not enough good values for calculation.
-11058 PI_AR_INVSUMMARYCODE Invalid code for summary function.
-11059 PI_AR_NOGOODDATA No good data for this time.
-11060 PI_AR_CALCFAILED Calculation Failed (e.g. Division by Zero).
-11061 PI_AR_INVMODEADD Invalid mode for archive add event.
-11062 PI_AR_INVMODEEDIT Invalid mode for archive edit event.
-11063 PI_AR_INVMODEDEL Invalid mode for archive delete event.
-11064 PI_AR_RCHDRMM Mismatch in record header record ID.
-11065 PI_AR_RCHDPMM Mismatch in record header chain pointer.
-11066 PI_AR_EMPTYDRECORD Empty data archive record.
-11067 PI_AR_EMPTYIRECORD Empty index archive record.
-11068 PI_AR_BADPRIMARY Failed to get primary archive.
-11069 PI_AR_CREATEFLAG Archive creation flag already set.
-11070 PI_AR_NOARCHMOUNT No archives mounted.
-11071 PI_AR_NOSHIFTARC No archive qualified for shift.
-11072 PI_AR_REMNER No events in record for removal.
-11073 PI_AR_REMENF Target event for removal not found in record.
-11074 PI_AR_REPNER No events in record to replace.
-11075 PI_AR_REPENF Target event for replacement not found in record.
-11076 PI_AR_NAVBEFORE Target time before archive start time.

180
Error Codes 11000-11999, With Messages

Code Code Identifier Message


-11077 PI_AR_NAVAFTER Target time after archive end time.
-11078 PI_AR_NOTWRITEABLE Target archive is not writeable.
-11079 PI_AR_NOTSHIFTABLE Target archive is not shiftable.
-11080 PI_AR_DUPPRIMARY Attempted to register two primary archives.
-11081 PI_AR_OVERLAP Attempted to register overlapping archives.
-11082 PI_AR_RECLOCKFAIL Attempted to lock a locked archive record.
-11083 PI_AR_RECUNLOCKFAIL Attempted to unlock an unlocked archive record.
-11090 PI_AR_EMPTYFILE Attempting operation on an empty archive file.
-11091 PI_AR_TOOMANYEVENTS Event collection exceeded maximum allowed.
-11092 PI_AR_NOANNOTATION Annotation not found in archive.
-11093 PI_AR_ANNOTMISMATCH Annotation mismatch (archive).
-11094 PI_AR_ANNOTEXIST Annotation already exist in archive.
-11095 PI_AR_SHIFTINPROG: Archive Shift already in progress.
-11096 PI_AR_BCKUPINPROG: Archive Backup already in progress.
-11097 PI_AR_BCKMODEMISMTCH: Backup End must follow Start and vice versa.
-11098 PI_AR_BADDIGDATA: Cannot convert to a Digital State.
-11099 PI_AR_SAMETIMEREC: Start time equal end time in archive record.
-11100 PI_AR_SAMETIMEARG: Start time equal end time argument in archive call.
-11101 PI_AR_SCALLFILTER: All data events are filtered in summary calculation.
-11102 PI_AR_SCNOEVENT: No events found within the time range of summary
calculation.
-11103 PI_AR_SCOOSCALL: Out of sequence calls in summary calculation.
-11104 PI_AR_SCOOSEVENT: Out of sequence data events in summary
calculation.
-11105 PI_AR_NULLLOADREC: Invalid record pointer for loading.
-11106 PI_AR_PTLOCKFAIL: Failed to lock archive-cache point.
-11107 PI_AR_NAVUNEXPECTED: Unexpected error navigating the archive.
-11108 PI_AR_ARCITERINVALID: Archive event iterator not properly initialized.
-11109 PI_AR_INVSAMPMODE: Invalid sample mode.
-11110 PI_AR_INVSAMPTIMES: Error with sample time array specification.
-11111 PI_AR_INVTIMECONST: Error with summary calculation time array.
-11112 PI_AR_INVNUMINTERVALS: Error with the summary calculation numInterval
array.
-11113 PI_AR_SCNINVCB: Invalid CalculationBasis.
-11114 PI_AR_SCNINVTYPE: Invalid Summary CalcType.
-11115 PI_AR_SCNINVTIMES: Error with time constraint array in Sumnav object.
-11116 PI_AR_SCNINVFILTER: Error with the filter constraint array in Sumnav
object.

PI Server Reference Guide 181


PI Error Code Reference

Code Code Identifier Message


-11117 PI_AR_SCNOOSRESCALL: Calling getresult before done in sumnav object.
-11118 PI_AR_SCNBADRE Internal error with result in sumnav object.
-11119 PI_AR_SCNINVARG: Invalid parameter in sumnav object.
-11120 PI_AR_SCNINTERPERR: Error interpolating data in sumnav object.
-11121 PI_AR_SCNOOSCALL: Out of sequence call in sumnav object.
-11122 PI_AR_SCNOOSEVENT: Out of sequence data event in sumnav object.
-11123 PI_AR_RCOVERFLOW: Point query exceeded maximum cache record
count.
-11124 PI_AR_NONNUMERICSUM: Non-numeric tag in summary calculation.
-11125 PI_AR_LOWDISKSPACE: Low disk space, file cannot be created.
-11126 PI_AR_ANNGUIDMISMATCH: Annotation file ID is not matching archive file.
-11127 PI_AR_NODOWNGRADE: Archive file downgrade to requested version not
supported.
-11128 PI_AR_TOOMANYREQEVENTS: Number of requested events exceeded the
maximum allowed.
-11129 PI_AR_NOTARCHIVING: Archive subsystem not in archiving state.
-11130 PI_AR_NEEDARCSIZE: Missing size information for new archive file
creation.
-11131 PI_AR_RCEXCEEDSLIMIT Point has more cache records than maximum
configured
-11132 PI_AR_CACHEUSECOUNT Cache record found with invalid reference count
on clean operation
-11133 PI_AR_RECEIVEDNEWSNAP New snapshot event received while pending
delete
-11134 PI_AR_SHIFTIMMINENT Archive Shift predicted withing backup lead time
-11135 PI_AR_FLUSHQLIMIT Reached maximum write cache events in lock
contention
-11136 PI_AR_FLUSHEVTIMEOUT Timeout waiting for point flush operation
-11137 PI_AR_PRIMARYREADONLY Primary archive is Read-only. Archiving and
archive shifts disabled
-11138 PI_AR_INVMODEADDCACHE Invalid mode for adding event to cache
-11140 PI_AR_MAXQUERYEXEC Archive query exceeded maximum execution time
(see Archive_MaxQueryExecutionSec)
-11141 PI_AR_RECLOADCOUNT Too many events on record load - most likely a
corruption
-11200 PI_3PHUNAVAIL PI Server is not installed properly or is not running
-11201 PI_RDR_HISTTIMEDVALUEFAIL PI Redirector could not get archived value from
foreign system
-11202 PI_ RDR PI Redirector could not get archived data from
_HISTTIMEDVALUESFAIL foreign system
-11203 PI_ RDR PI Redirector could not get snapshot value from
_SNAPTIMEDVALUEFAIL foreign system

182
Error Codes 11000-11999, With Messages

Code Code Identifier Message


-11204 PI_ RDR _SNAPISLOCALFAIL PI Redirector could not determine whether to
cache snapshot values from foreign system
-11205 PI_ RDR _SNAPSSIGNUP PI Redirector could not signup for updates with
foreign system.
-11206 PI_ RDR _SNAPSUPDATESFAIL PI Redirector could not get updates from foreign
system.
-11207 PI_ RDR PI Redirector could not write snapshots to foreign
_SNAPPUTTIMEDVALUEFAIL system.
-11208 PI_ RDR PI Redirector could not load connector or set PI
_ADDCONNECTORFAIL Server system name.
-11209 PI_ RDR _ARCSUMMARYFAIL PI Redirector could not get
arcsummary/summaries directly from foreign
system.
-11210 PI_RDR_NOARCSIGNUP PI-Redirector does not support signup for archive
updates
-11300 PI_V_NOANNOTATION Annotation not found in Pivalue.
-11301 PI_V_ANNOTMISMATCH Annotation mismatch.
-11302 PI_V_ANNOTEXIST Annotation already exist.
-11303 PI_V_ANNOTTOOLONG Annotation exceeds size limit.
-11304 PI_V_INVALID_VARIANT_TYPE Invalid variant type code.
-11305 PI_V_MISMATCH PIvalue mismatch
-11306 PI_V_NOTATIME Variant type is not a time
-11307 PI_V_NOTAUID Variant type is not a UID
-11400 PI_BUFSS_CREATEBUFMGR Failed to initialize buffer manager class
-11401 PI_BUFSS_CREATEPTERRHAS Unable to create point error hash table
H
-11402 PI_BUFSS_CREATEMEMFILEB Error creating shared memory buffers or disk
UF buffer file
-11403 PI_BUFSS_LOWDISKSPACE Insufficient disk space for maximum buffer size
-11404 PI_BUFSS_SHUTDOWNSIGNAL BufServ shutdown signal received
-11405 PI_BUFSS_NODATA No data from API processes
-11406 PI_BUFSS_INVALIDSRVID Invalid server ID while loading buffer table
-11407 PI_BUFSS_INVALIDHOST Invalid hostname, connection is impossible
-11408 PI_BUFSS_SESSIONFAILED Error opening session to PI Server
-11409 PI_BUFSS_BADHEADERCODE Error loading snapshot table header
-11410 PI_BUFSS_UNKOWNREGID Invalid registration ID from buffered source
-11411 PI_BUFSS_DUPLICATEREGID Duplicate ID when on buffered source registration
-11412 PI_BUFSS_SESSIONINIT Fatal error initializing buffer session
-11413 PI_BUFSS_NOCLIENTINI Can't find PICLIENT.INI
-11414 PI_BUFSS_EVENTBUFPOINT Buffered point does not accept new events
-11415 PI_BUFSS_PISYSQUERY Error getting system information from PI Server

PI Server Reference Guide 183


PI Error Code Reference

Code Code Identifier Message


-11416 PI_BUFSS_EMPTYBSL Empty or invalid BUFFERSERVERLIST in
PICLIENT.INI
-11417 PI_BUFSS_BUFFERINGOFF Buffering is turned off, process exiting
-11419 PI_BUFSS_1SERVERONLY Buffering is supported for only one PI Server or
Collective
-11420 PI_BUFSS_BSLVALIDATION Error validating first-time configuration, no server
connection
-11421 PI_BUFSS_BADSERVERVERSI Remote PI Server is not compatible (minimum
ON version: 3.4.375)
-11422 PI_BUFSS_PINSNODEONLY This version of the PI Buffer Subsystem runs only
on PINS nodes
-11423 PI_BUFSS_NOTREGISTERED Buffer Subsystem not registered with Snapshot

-11424 PI_BUFSS_UNREGISTERFAILE Error while un-registering from Snapshot


D
-11425 PI_BUFSS_INVALIDSRVCFG Unable to retrieve server configuration, please
check PI trust definition
-11426 PI_BUFSS_SESSIONNOTRUNNI Buffer session is not running
NG
-11427 PI_BUFSS_THREADNOTSTOPP Session thread did not respond to shutdown
ING signal
-11428 PI_BUFSS_INVALIDSESSION Buffer session is invalid

-11429 PI_BUFSS_OOOEVSKIPPED Out-of-order event discarded from buffered source

-11430 PI_BUFSS_INVALIDAPIEVENT Unexpected API event from shared-memory


buffer
-11431 PI_BUFSS_TRACENODATA Trace has no data in buffer

-11432 PI_BUFSS_TRACEERROR Trace is not started or timed out

-11433 PI_BUFSS_INVALIDCTRLCMD Unknown or invalid control command

-11434 PI_BUFSS_SESSIONBADSTATE Invalid buffer session state

-11901 PI_OFFL_BADOPENFILE Error opening offline file

-11902 PI_OFFL_BADRECNO Bad record number for offline input

-11903 PI_OFFL_BADIDCONV Bad Id conversion table

-11904 PI_OFFL_BADFILEREAD Failed to read input file (PI2)

-11905 PI_OFFL_NOTINIDCONV Point ID not found in ID conversion table

-11906 PI_OFFL_PTIDMM Point ID mismatch in offline loading

184
Error Codes 12000-12999, With Messages

Code Code Identifier Message


-11907 PI_OFFL_NOTARGETREC Cannot post events, no target record
-11908 PI_OFFL_INVTIMES Invalid Times For Offline loading
-11909 PI_OFFL_BADARCTYPE Invalid archive type for processing
-11910 PI_OFFL_NOEVENTS No events from input file were added to output
archive
-11911 PI_OFFL_ABORTED Operation aborted by user

Error Codes 12000-12999, With Messages


Code Code Identifier Message
-12000 PI_TABLEFROZEN Pint is Frozen from Changes
-12001 PI_TABLENONAME Name Not Found in pint
-12002 PI_TABLENOCODE Code Not Found in pint
-12003 PI_TABLEDUPNAME Name Already in Use in pint
-12004 PI_TABLEDUPCODE Code Already in Use in pint
-12005 PI_TABLEINVNAME Invalid Name for Use in pint
-12006 PI_TABLEINVSLOT Invalid Slot for Use in pint
-12007 PI_TABLEINUSE Table already contains entries
-12008 PI_TABLELOADMIS Count Mismatch on Load
-12009 PI_TABLEFILEUSE Underlying File Store in Use
-12010 PI_TABLEMAXENTRIESEXCEEDED Attempt to activate or create table larger than
allowed
-12011 PI_TABLENOIDENTIFIER Identifier not found in PInttemplate
-12012 PI_TABLEINVIDENTIFIER Identifier in PInttemplate is not valid
-12013 PI_TABLENORECORDDEFINITION Record definition of generic table is empty
-12050 PI_ARG_N OOWNLIST Arglist is Not Owned
-12051 PI_ARG_OWNLIST Arglist is Owned
-12052 PI_ARG_FROZEN Operation is Invalid on a Frozen List
-12053 PI_ARG_BADMERGE Failed merge
-12100 PI_GRID_BADSETCOLINF Pigrid: setcolinfo Failed
-12101 PI_GRID_BADSETNUMROW Pigrid: setnumrows Failed
-12102 PI_GRID_BADVERSION Pigrid: Version Mismatch in Activate
-12103 PI_GRID_BADSETNUMCOL Pigrid: setnumcols Failed
-12150 PI_UPD_NOTREG Not registered in updmgr
-12151 PI_UPD_NOCONS Consumer not registered in updmgr
-12152 PI_UPD_NOPROD Producer not registered in updmgr
-12153 PI_UPD_MISMATCH Id mismatch

PI Server Reference Guide 185


PI Error Code Reference

Code Code Identifier Message


-12154 PI_UPD_ARRSIZE Incoming arrays (RPC) not same size
-12155 PI_UPD_SIGNUPID Signup authorization id mismatch
-12156 PI_UPD_FLAGS Flags update or signup mismatch
-12157 PI_UPD_MMQWRITEFAILED Failed to add update to memory-mapped
queue file
-12200 PILIC_NOLICFILE no license file
-12201 PILIC_ERROPENFILE error open license file
-12202 PILIC_BADKEY invalid license key
-12203 PILIC_INVSPECS invalid license specs
-12204 PILIC_NOSUCHLIC no such license
-12205 PILIC_NOTREGISTERED user not registered
-12206 PILIC_LICEXCEDED usage exceeded licensed amount
-12207 PILIC_LICEXPIRED license expired
-12208 PILIC_BADUSERKEY user mismatch
-12209 PILIC_MISMATCH amount or another mismatch
-12210 PILIC_NOLICFILE10 license error 10
-12211 PILIC_SERVIDFILEEXISTS Server ID file creation failure; file already
exists.
-12212 PILIC_SDKCONNECTIONS Maximum licensed SDK Application
connections exceeded. Connection refused.
-12213 PILIC_APICONNECTIONS Maximum licensed API Application
connections exceeded. Connection refused.
-12214 PILIC_POINTCOUNT Maximum licensed Point Count exceeded.
-12215 PILIC_MODULECOUNT Maximum licensed Module Count exceeded.
-12216 PILIC_POINTMODULECOUNT Maximum licensed aggregate Point/Module
Count exceeded.
-12217 PILIC_BDB Not licensed to use Batch Database.
-12218 PILIC_MDB Not licensed to use Module Database.
-12219 PILIC_COMCONNECTORS Not licensed to use COM Connector-mapped
points.
-12220 PILIC_SERVERAPP Not licensed to use this server or UDS
application.
-12221 PILIC_CLIENTAPP Not licensed to use this client application.
-12222 PILIC_MAXHISTORY Not licensed to access Archive for passed
dates.
-12223 PILIC_ERRGETMAC Error getting Machine info
-12224 PILIC_NOLICMGR License Manager not accesible
-12225 PILIC_NOKNOWNAPPS Did not receive Known Application data
-12226 PILIC_OLDLICFILE License file too old to parse
-12227 PILIC_INTERFACE Not licensed to use this interface

186
Error Codes 12000-12999, With Messages

Code Code Identifier Message


-12228 PILIC_MIDDLEWARE Not licensed to use this middle-ware
application
-12229 PILIC_NONCCPOINTCOUNT Maximum licensed non-COM Connector Point
Count exceeded
-12230 PILIC_ANONYMOUSAPP Maximum licensed Anonymous Application
connections exceeded. Connection refused.
-12231 PILIC_ANONYMOUSSDK Maximum licensed Anonymous SDK
Application connections exceeded.
Connection refused.
-12232 PILIC_ANONYMOUSAPI Maximum licensed Anonymous API
Application connections exceeded.
Connection refused.
-12233 PILIC_ERRGETCLUS Error getting Cluster info.
-12234 PILIC_POINTSOURCE Disallowed Point Source
-12235 PILIC_PTSOURCECOUNT Exceeded Point Count allowance for
Point-Source
-12236 PILIC_NOTINCLUDED_CLIENTAPP This client application is not explicitly allowed
in the license file.
-12237 PILIC_NOTINCLUDED_INTERFACE This interface is not explicitly allowed in the
license file.
-12238 PILIC_NOTINCLUDED_MIDDLEWAR This middle-ware application is not explicitly
E allowed in the license file.
-12239 PILIC_NOTINCLUDED_SERVERAPP This server or UDS application is not explicitly
allowed in the license file.
-12240 PILIC_NOTINCLUDED_3RDPARTY This application is not explicitly allowed in the
license file.
-12241 PILIC_3RDPARTY Not licensed to use this application.
-12250 PI_BA_DUPACTIVETAG Batch active tag is already being used by
another unit
-12251 PI_BA_BADSIZE Number of arguments in PIarray is incorrect
-12252 PI_BA_BADACTIVETAGTYPE Batch Active Tag Type is not STEP or
PULSE.
-12253 PI_BA_UNITARCHIVETAGMISSING Invalid unit identifier.
-12254 PI_BA_WAIT Wait for in use object.
-12255 PI_BA_BADSYNTAXBATCHID Batch ID expression Syntax Error.
-12256 PI_BA_BADSYNTAXPRODUCTID Product ID expression Syntax Error.
-12257 PI_BA_BADPTBATCHID Invalid tag in Batch ID expression.
-12258 PI_BA_BADPTPRODUCTID Invalid tag in Product ID expression.
-12259 PI_BA_UNSUPPORTEDACTIVETAG Batch active tag is not integer, real, or digital.
TYPE
-12260 PI_BA_NOBATCHINEVENT PIevent does not contain a batch record
(PIblob len 0 ).
-12261 PI_BA_PIBANEXISTS Could not create a unique archive tag name
for unit.

PI Server Reference Guide 187


PI Error Code Reference

Code Code Identifier Message


-12262 PI_BA_STARTTIMESTATUSINVALID Status of start time for a batch is invalid.
-12263 PI_BA_STOPTIMESTATUSINVALID Status of stop time for a batch is invalid.
-12264 PI_BA_BATCHEND This is an end of batch event.
-12265 PI_BA_BATCHSTART This is a start of batch event.
-12266 PI_BA_TIMENOTFOUND Time was outside boundaries of PIbaIndex
Directory.
-12267 PI_BA_INVALIDINDEX Index for PIbaIndex Directory is invalid.
-12268 PI_BA_INVALIDTIMESPAN Time span within search contains no indexes.
-12269 PI_BA_NO_UNITS_MATCHED Unit mask matches none of the current units.
-12270 PI_BA_NO_END_EVENT_EXISTS No end event exists for this batch handle.
-12271 PI_BA_BATCHOREVENT_EXISTS Attempt to archive batch over existing batch.
-12272 PI_BA_INVALIDPIBLOB Archived batch record invalid.
-12273 PI_BA_CANTDELETE Attempt to delete an active batch or batch
with null end timestamp
-12274 PI_BA_NOBATCHES No matching batches were found.
-12275 PI_BA_INVALIDHANDLE Invalid or missing batch handle. Batch edit
requires specifying a valid batch handle.
-12299 PI_BA_DUPACTIVETAG Batch active tag is already being used by
another unit
-12300 PI_PE_ERROR Performance equation error
-12301 PI_PE_PARSEERROR Performance equation parsing error
-12302 PI_PE_DIVIDEBYZERO Performance equation divide by zero error
-12303 PI_PE_OVERFLOW Performance equation overflow error
-12304 PI_PE_LEX_FILE_NOT_FOUND Performance Equation: File PExxx.llr not
found in DAT directory
-12305 PI_PE_RULE_FILE_NOT_FOUND Performance Equation: File PExxx.dfa not
found in DAT directory
-12306 PI_PE_RESOURCES_NOT_FOUND Performance Equation: File pisystem.res not
found in DAT directory
-12307 PI_PE_INVALID_CONNECTION Performance Equation: Invalid Connection
-12308 PI_PE_BAD_TREE_AT_GENCODE Performance Equation: Bad parse tree during
code generation
-12309 PI_PE_BAD_TREE_AT_TYPECHEC Performance Equation: Bad parse tree during
K type check
-12310 PI_PE_FUNC_WRONG_NUMBER_O Performance Equation: Function has wrong
F_ARGS number of arguments
-12311 PI_PE_FUNC_NEEDS_ONE_ARG Performance Equation: Function needs at
least one argument
-12312 PI_PE_FUNC_TO_MANY_ARGS Performance Equation: Function has too
many arguments
-12313 PI_PE_FUNC_ARG1_NOT_DIGITAL Performance Equation: First argument for
function is not digital

188
Error Codes 13000-13999, With Messages

Code Code Identifier Message


-12314 PI_PE_FUNC_ARG1_NOT_TIME Performance Equation: First argument for
function is not a time
-12315 PI_PE_FUNC_BAD_ARG_TYPES Performance Equation: Function has bad
argument data type
-12316 PI_PE_FUNC_NEEDS_MORE_ARG Performance Equation: Wrong number of
S arguments for function
-12317 PI_PE_FUNC_ARG1_INVALID Performance Equation: Invalid first argument
-12318 PI_PE_FUNC_ARG2_INVALID Performance Equation: Invalid second
argument
-12319 PI_PE_FUNC_ARG3_INVALID Performance Equation: Invalid third argument
-12320 PI_PE_FUNC_ARG4_INVALID Performance Equation: Invalid fourth
argument
-12321 PI_PE_FUNC_ARGS_NOT_SAME_T Performance Equation: All arguments must
YPE have same data type
-12322 PI_PE_FUNC_ARGS_NOT_NUMBE Performance Equation: All function arguments
RS must be numbers or evaluate to numbers
-12323 PI_PE_TOO_MANY_ARGS Performance Equation: Function has too
many arguments
-12324 PI_PE_ADD_CONNECT_FAILED Performance Equation: Connection failed
-12325 PI_PE_TOO_MANY_CONNECTS Performance Equation: Too many
connections
-12330 PI_PE_PCT_GOOD_TOO_SMALL Performance Equation: Percent good is below
requested threshold
-12332 PI_PE_E32 Performance Equation: Expression length
exceeded the maximum
-12400 PI_GTB_COLLECTION_UNINITIALIZ Generic Table: Collection Uninitialized
ED
-12401 PI_GTB_UNKNOWN_TABLE Generic Table: Unknown Table
-12402 PI_GTB_TABLE_UNINITIALIZED Generic Table: Table Uninitialized
-12403 PI_GTB_DUPLICATE_TABLE Generic Table: Table Definition Already Exists
-12404 PI_GTB_INVALID_TABLE_OPERATI Generic Table: Invalid Operation
ON
-12405 PI_GTB_RECID_MISMATCH Generic Table: RecordID mismatch
-12406 PI_GTB_RECNAME_MISMATCH Generic Table: RecordName mismatch";
-12407 PI_GTB_NO_RECID_OR_RECNAME Generic Table: RecordID or RecordName
must be specified

Error Codes 13000-13999, With Messages


Code Code Identifier Message
-13000 PI_MSG_BADQUERY Bad query for messages in GetMessages

PI Server Reference Guide 189


PI Error Code Reference

Code Code Identifier Message


-13001 PI_MSG_BADMAXCOUNT The query for messages contains an invalid total
number of messages parameter in GetMessages
-13002 PI_MSG_BADSTARTTIME The query for messages contains an invalid PI
format start time in GetMessages
-13003 PI_MSG_BADENDTIME The query for messages contains an invalid PI
format end time in GetMessages
-13004 PI_MSG_BADMESSAGEID The query for messages contains an invalid
Message ID in GetMessages
-13005 PI_MSG_BADUSER The query for messages contains an invalid
program name in GetMessages
-13006 PI_MSG_BADSEARCHSTRING The query for messages contains an invalid
message search string in GetMessages
-13007 PI_MSG_BADOPTION1 The query for messages must have end time
and/or total message count in GetMessages
-13008 PI_MSG_BADOPTION2 The query for messages must have start time
and/or total message count in GetMessages
-13009 PI_MSG_BADOPTION3 The query for messages must have start time
and/or end time in GetMessages
-13010 PI_MSG_NAMEMISMATCH The query for messages contains an invalid name
in the query name table in GetMessages
-13011 PI_MSG_BADFILE The PI Message file can not be read. It may be
corrupt.
-13050 PI_AUD_FNF Cannot find audit file
-13051 PI_AUD_CREFAIL Cannot create audit file
-13052 PI_AUD_BCKUPINPROG Audit disabled during backup
-13053 PI_AUD_WRITEERR Failed to write audit record
-13100 PI_NTLOG_NOHANDLE No Application Event Log Handle
-13101 PI_NTLOG_NOUPDATE Unable to get updates from App Log
-13102 PI_NTLOG_NOSENDTOPI Unable to send event log messages to PI
-13103 PI_NTLOG_BADGETREGVAL Unable to get values for pimsgss service registry
key
-13104 PI_NTLOG_NOREGKEY Unable to get registry key for service pimsgss
-13200 PI_CTR_BADPERFINFO PIPerfInfo struct is bad
-13201 PI_CTR_BADGETPERFREG Unable to get Perflib registration info
-13202 PI_CTR_BADSETPERFREG Unable to set Perflib registration info
-13203 PI_CTR_BADGETPIREG Unable to get PI performance registration info
-13204 PI_CTR_BADSETPIREG Unable to set PI performance registration info
-13205 PI_CTR_BADPERFLIBNUM Perflib Last Counter larger than Last Help
-13206 PI_CTR_ODDPERFLIB Perflib Last Counter is odd number or Last Help is
even number
-13207 PI_CTR_BADPERFLIBSET Perflib Last Help is greater than Last Counter by
more than one

190
Error Codes 15000-15999, With Messages

Code Code Identifier Message


-13208 PI_BADCOUNTERNAMELENG he performance counter name is larger than 32
TH characters, counters will not be installed
-13250 PI_TST_NOTFOUND Test not found in DB
-13251 PI_TST_DBERROR Cannot record results in test DB
-13252 PI_TST_MAILERROR Cannot Email test results
-13253 PI_TST_NOPISYS Test requires running PI system
-13254 PI_TST_INVATR Invalid test attribute
-13255 PI_TST_FAILED Test failed

Error Codes 15000-15999, With Messages


Code Code Identifier Message
-15000 PI_ISTREAMFAIL Istream::get Failed
-15001 PI_OSTREAMFAIL Ostream:: Failed
-15002 PI_BADOFFSET Generic Out-of-Bounds Error (pistring,
piarray)
-15003 PI_NOTFOUND Element Not Found (piarray)
-15010 PI_OVERFLOW Number Too Big For pivalue
-15011 PI_NOTANUMBER Pivalue Type is Not Numeric
-15012 PI_INFINITY Pivalue Divide by Zero
-15013 PI_NOTAFLOAT Pivalue Type or pistring is Not Float
-15014 PI_NOTANINTEGER Pivalue Type or pistring is Not Integer
-15015 PI_BADFLOATFORMAT Number of Digits or Decimals Out of
Range
-15016 PI_NOTASTRING Pivalue Type is Not a String
-15017 PI_WRONGVALTYPE Pivalue Type is Not Allowed For This Call
-15018 PI_NOTABLOB Pivalue Type is Not a Blob
-15019 PI_NOTAVALUETYPE Value Type is Not a Valid pivalue Type
-15020 PI_INVALIDPATH Invalid path specified
-15021 PI_BADTARGET Context sensitive bad target error
-15022 PI_BADINITIALIZE Context sensitive initialization failure
-15023 PI_BADVERSION Generic bad version failure
-15024 PI_DUPLICATE Generic duplicate name
-15025 PI_BADEVENTMODE Invalid or Unsupported pievent Mode
-15026 PI_MAXLENGTHEXCEEDED Attempt to activate or create a pistring or
piblob larger than max allowable
-15027 PI_LOGMESSAGESTHROTTLED Excessive messages to PImsgss, log
messages temporarily terminated

PI Server Reference Guide 191


PI Error Code Reference

Code Code Identifier Message


-15028 PI_INVALIDBOOKMARK Invalid or corrupt book mark
-15029 PI_INVALID Generic invalid call or argument
-15030 PI_MISMATCH Generic mismatch
-15031 PI_NOTADIG PIvalue type is not digital
-15032 PI_PATHNOTFOUND Requested path not found
-15033 PI_BCKUPINPROG Cannot perform operation during backup
-15034 PI_INVALIDTZCONFIG Time zone configuration is invalid
-15035 PI_MAXARRLENGTHEXCEEDED Attempt to activate or create a PIarray
larger than max allowable.
-15036 PI_UNABLETORETRIEVEUNIXERRNO A call on UNIX fails but errno is zero.
-15037 PI_BADARGUMENTCONVERSION No suitable conversion from a variant to
RPC argument.
-15038 PI_INVALIDTIMESTAMP PIvalue cannot represent PIstring as a
valid timestamp.
-15039 PI_ENVVAR_EXISTS System environment variable already
exists
-15040 PI_MAXQUEUELIMIT Non-expandable PIfifo reached maximum
capacity
-15041 PI_EMPTYQUEUE Attempt to extract data from empty PIfifo

Error Codes 16000-16999, With Messages


Code Code Identifier Message
-16000 PI_INVALIDEFFECTIVEDATE Object not found for passed effective date
-16001 PI_MODULENOTFOUND Module does not exist
-16002 PI_INVALIDMODULEVERSION Invalid or missing module version
-16003 PI_DUPLICATEEFFECTIVEDATE Value with passed effective date already
exists
-16004 PI_LASTMODULEVALUE Cannot remove last module value. Use
module remove
-16005 PI_ROOTMODULE Attempt to remove or edit a Built in module
element
-16006 PI_MODULEHIERARCHYBREAK Attempt to delete or remove a module that
breaks existing hierarchy
-16007 PI_UNEXPECTEDMODULEDBERROR Unexpected PI Module Database error
-16008 PI_MODULEVALUEEXISTS Effective date already exists for attempt
add or move of a module value
-16009 PI_INVALIDPARENT Invalid parent specified for the operation
-16010 PI_DUPLICATEHIERARCHY Attempt to create or edit object with
duplicate hierarchical level

192
Error Codes 16000-16999, With Messages

Code Code Identifier Message


-16011 PI_INVALIDHIERARCHY Attempt to create or edit object with
invalided hierarchical level
-16012 PI_NOPARENTREFERENCE Module does not have parent reference to
specified module
-16013 PI_NOCHILDREFERENCE Module does not have child reference to
specified module
-16014 PI_INVALIDQUERYDATE Invalid or unspecified query date
-16015 PI_INVALIDUID Invalid or unspecified uid
-16016 PI_INVALIDMODE Invalid or unspecified module value access
mode
-16017 PI_MODULEVALUENOTFOUND Module Value for passed effective date not
found
-16018 PI_INVALIDHEADING Specified heading does not exist or is
member of different heading set
-16019 PI_INVALIDTIMERANGE Invalid or unspecified time range for batch
database search
-16020 PI_NOMATCHINGMODULES No matching PIModules for call
-16021 PI_NOMATCHINGBDBRECORDS No Matching Batch Database records
-16022 PI_MDBNOTSUPPORTED Attempted operation not supported by the
specified database
-16023 PI_MDBCIRCULARREFERENCE Attempt to insert a PIModule that would
cause a circular reference
-16024 PI_MDBNOMATCHINGVALUES No module values within the passed time
range
-16025 PI_MDBLASTVALUE Attempt to remove the last module value.
-16026 PI_BDBCROSSREFERENCE Attempt to remove a Batch Database
Record which contains a cross reference to
another record.
-16027 PI_BDBBSSNOTSUPPORTED Batch Database does not support this
action with Batch Subsystem Batch.
-16028 PI_INVALIDBDBTIME Invalid start or end time for Batch
Database Record.
-16029 PI_BDBMAXRECORDSEXCEEDED Batch database search exceeded
maximum allowed records
-16030 PI_BDBNOTACCESSIBLEONSECOND Batch database access disabled on
ARY secondary server of collective
-16201 PI_THREADPOOLDISABLED Subsystem does not support thread pool or
thread pool is disabled.
-16202 PI_THREADSUSPENDED Thread is in suspended state.
-16203 PI_INVALIDTHREADID Passed thread ID is invalid.
-16204 PI_THREADTIMEOUT Time out waiting for semaphore or lock.
-16205 PI_THREADABANDONED Thread or handle has been abandoned.
-16206 PI_THREADUNLOCK Attempt to release exclusive lock from
thread that did not acquire the lock.

PI Server Reference Guide 193


PI Error Code Reference

Code Code Identifier Message


-16207 PI_THREADESCALATE Attempt to Escalate lock without prior
non-exclusive lock.
-16208 PI_THREADEXCLUSIVE Thread already has exclusive lock.
-16209 PI_IOCOMPLETED Asynchronous IO has completed.
-16210 PI_THREADNOTSUPPORTED Thread control function not supported.
-16211 PI_UKNOWNLOCKERROR Unknown system error attempting to get
lock.
-16212 PI_SHAREDLOCKTIMEOUT Timeout attempting to get non-excluseive
lock.
-16213 PI_UNBALANCEDLOCKRETURN Lock return count greater than get count.
-16214 PI_EXCLUSIVELOCKTIMEOUT Timeout attempting to get excluseive lock.
-16215 PI_THREADPOOLOVERRANGE Attempt to create too many threads.
16216 PI_THREADMASTERLOCK Attempt to get master lock failed
-16300 PI_ARCHK_OVFREVCHAIN Invalid backwards chaining of overflow
record
-16301 PI_ARCHK_IDXREVCHAIN Invalid backwards chaining of index record
-16302 PI_ARCHK_RECIDXNOTFOUND Overflow record not found in index records
-16303 PI_ARCHK_MULTIPLEIDXREF Index entry referenced by multiple overflow
records
-16304 PI_ARCHK_OOOIDXREC Out-of-order overflow record in index
record
-16305 PI_ARCHK_OOOEVENT Out-of-order event found in overflow record
-16306 PI_ARCHK_INVANNHANDLE Event marked as annotated with no
annotation handle
-16307 PI_ARCHK_INVANNOTATION Annotation record not found for annotated
event
-16308 PI_ARCHK_DUPANNHANDLE Annotation record referenced by multiple
events
-16309 PI_ARCHK_IDXTIMEMISMATCH Index not matching overflow record start
time
-16310 PI_ARCHK_EVBEFORESTART Event before archive start time
-16311 PI_ARCHK_EVAFTEREND Event after archive end time
-16312 PI_ARCHK_IDXACTIVATION Unexpected error reading index record
-16313 PI_ARCHK_IDXSTARTERROR Index start time doesn't match archive start
time
-16314 PI_ARCHK_1STRECNOTHEAD First overflow record has a previous record
-16315 PI_ARCHK_PTTYPEMISMATCH Point type not matching primary record
-16316 PI_ARCHK_INVALIDIDXTYPE Unexpected data type for index record
-16317 PI_ARCHK_INVALIDARCNUM Invalid archive file number
-16318 PI_ARCHK_OVFCIRCHAIN Circular chaining of overflow record
-16319 PI_ARCHK_IDXCIRCHAIN Circular chaining of index record

194
Error Codes 16000-16999, With Messages

Code Code Identifier Message


-16320 PI_ARCHK_TOOMANYERRORS Too many errors, filtering non-fatal errors
-16500 PI_MMQ_SYNC_CREATE Creation of Piarchss synchronization object
failed
-16501 PI_MMQ_SYNC_OPEN Opening of Pisnapss synchronization
object failed
-16502 PI_MMQ_SYNC_WRITETIMEOUT Timeout waiting for write access to Event
Queue
-16503 PI_MMQ_SYNC_WRITEFAILED Wait for queue write returned a
WAIT_FAILED status
-16504 PI_MMQ_SYNC_UNEXPECTED Unexpected error waiting for Event Queue
access
-16505 PI_MMQ_SYNC_READTIMEOUT Timeout waiting for read access to Event
Queue
-16506 PI_MMQ_SYNC_READFAILED Wait for queue read returned a
WAIT_FAILED status
-16600 PI_MMQ_INVALID_FILESIZE Invalid queue file size (requires inimum 2
data pages)
-16601 PI_MMQ_FILEPATH_TOOLONG File path and name exceed 260 characters
(MAX_PATH)
-16602 PI_MMQ_PHYSFILE_CREATE Error while creating queue file
(pimapevq.dat)
-16603 PI_MMQ_MAPFILE_CREATE Error while creating mapped file of Event
Queue
-16604 PI_MMQ_MAPFILE_OPEN Error while opening mapped file of Event
Queue
-16605 PI_MMQ_MAPFILE_MAPVIEW Error while mapping a page view of the
queue file
-16606 PI_MMQ_MAPFILE_INIT Event queue not initialized before read or
write access
-16607 PI_MMQ_MAPFILE_UNMAPVIEW Error while unmapping a page view of the
queue file
-16608 PI_MMQ_MAPFILE_FULL Event queue file is entirely full
-16609 PI_MMQ_FILESIZE_MISMATCH Configured file size doesn't match existing
file
-16610 PI_MMQ_PAGESIZE_MISMATCH Configured page size doesn't match
existing file
-16611 PI_MMQ_FORWARD_VERSION Existing queue file is from a later version
-16612 PI_MMQ_INVALID_READPAGE Invalid read page index in existing queue
file
-16613 PI_MMQ_INVALID_WRITEPAGE Invalid write page index in existing queue
file
-16614 PI_MMQ_INVALID_FREEPAGES Inconsistent number of available pages in
existing queue file
-16615 PI_MMQ_WRITEPAGE_FULL Write failedtarget write page is full

PI Server Reference Guide 195


PI Error Code Reference

Code Code Identifier Message


-16616 PI_MMQ_STREAMINIT_ERROR Error while creating i/o stream object
-16617 PI_MMQ_ACTIVATION_FAILED Read error while activating event from
queue
-16618 PI_MMQ_UNRECOGNIZABLE_FILE File format is not a valid memory-mapped
Event Queue file
-16619 PI_MMQ_MAPFILE_FLUSHVIEW Error while flushing to disk a view of the
queue file
-16620 PI_MMQ_EMPTY_READPAGE Attempt to read data from an empty page
-16621 PI_MMQ_BAD_FILENAME Invalid overflow file name template
-16622 PI_MMQ_BAD_EXTENSION Missing extension in overflow file name
template
-16623 PI_MMQ_BAD_DATA_OFFSET Invalid data member offset within
PImapfilepage
-16624 PI_MMQ_EVCOUNT_MISMATCH Event count mismatch with empty data
pages
-16700 PI_SUBSYSINFO_INVALID_ARGUMEN Invalid arguments for Sub-system
TS Information RPC
-16701 PI_SUBSYSINFO_INVALID_PROCESSI Invalid process ID Sub-system Information
D RPC
-16821 PI_BCKFILE_FILENAME_NULL Cannot add file to the list of backed up files
because the file name is null
-16823 PI_BCKFILE_REMOVE_ERROR_FILEN Cannot remove file from list of backed up
OTFOUND files because the file name was not found
in the list
-16824 PI_BCKFILE_ADD_ERROR_DUPLICAT Cannot add file to the list of backed up files
EFILENAME because the file is already in the list
-16826 PI_BCKFILE_DUPLICATE_BACKEDUP Only one backup file list object can be
_FILE_LIST created
-16840 PI_BACKUP_BACKUPSUBSYS_NOT_I Backup manager is not initialized
NITIALIZED
-16841 PI_BACKUP_VSS_UNSUPPORTED Unsupported operating system for Volume
Shadow Copy Services
-16842 PI_BACKUP_INVALID_COMPONENT_ Invalid component name
NAME
-16843 PI_BACKUP_COPY_FILE_FAILED Copy file failed for backup operation

-16844 PI_BACKUP_VSS_API_CALL_FAILED VSS API Call failed

-16845 PI_BACKUP_FILE_BACKUPSTAT_UNI File backup status uninitialized


NITIALIZED
-16846 PI_BACKUP_ARCHK_FAILED Backup verification pidiag -archk failed

-16847 PI_BACKUP_OF_COMPONENT_FAILE Backup of a component failed for a VSS,


D component-modeBackup

196
Error Codes 16000-16999, With Messages

Code Code Identifier Message


-16848 PI_BACKUP_VERIFYDB_FAILED Backup verification pibasess -verifydb
failed
-16849 PI_BACKUP_NO_BACKEDUP_TIMES_ NoBackup times were updated for any files
UPDATED
-16850 PI_BACKUP_TIME_VERIFICATION_FA LastBackup time verification check failed
ILED for file
-16851 PI_BACKUP_COMMIT_FAILED Error moving files from pre-commit
directory to the target directory of
theBackup
-16852 PI_BACKUP_BACKEDUP_TIME_NOT_ Backed up time not updated for file
UPDATED
-16853 PI_BACKUP_PRECOMMIT_COMMAND Backup precommit custom command failed
_FAILED
-16854 PI_BACKUP_SUMMARY_RETRIEVAL_ Retrieval of PIBackup Summary failed
FAILED
-16855 PI_BACKUP_INVALID_TYPE InvalidBackup type

-16856 PI_BACKUP_VERIFYSNAPDB_FAILED Backup verification of the snapshot


database failed
-16857 PI_BACKUP_UNKNOWN_STATUS TheBackup completed, but the status is
unknown
-16860 PI_VSSEVENT_FREEZE_IN_PROGRE VSS Freeze already in progress
SS
-16861 PI_VSSEVENT_FREEZE_NOT_IN_PR Expected VSS Freeze to be in progress,
OGRESS but freeze was not in progress
-16863 PI_BCKEVENT_FREEZE_TIMEOUT_W VSS Freeze timed out waiting for VSS
AITING_FOR_THAW_EVENT thaw event
-16864 PI_VSSEVENT_FREEZE_TIMEOUT_D VSS Freeze timed out before VSS freeze
URING_FREEZE_EVENT event could complete
-16868 PI_VSSEVENT_IDENTIFY_COMPONE VSS Identify failure. Two VSS components
NT_MISMATCH have the same name but different
component properties
-16893 PI_BCKEVENT_SUBSYSTEM_NOT_PA Subsystem does not participate in
RTICIPATING backups. The backup event was ignored
-16896 PI_BCKEVENT_RPCRESOLVEROFFLI RPC Resolver offline for a subsystem to
NE which the backup subystem is
communicating. Find -10733 error in
message log to identify problematic RPC
-16898 PI_BCKEVENT_IN_PROGRESS Backup event in progress

-16912 PI_BCKSTATE_BACKUP_PENDING Backup pending start

-16913 PI_BCKSTATE_PREPAREBACKUP_FA PrepareBackup failed


ILED
-16914 PI_BCKSTATE_INVALID_STATE_TRA Invalid state transition for backup
NSITION

PI Server Reference Guide 197


PI Error Code Reference

Code Code Identifier Message


-16915 PI_BCKSTATE_BACKUP_ABORTED Backup was aborted

-16916 PI_BCKSTATE_BACKUP_SHUTDOWN Backup shutdown without completing


_NOCOMPLETE
-16917 PI_BCKSTATE_BACKUP_IN_PROGRE Backup in progress
SS
-16918 PI_BCKSTATE_BACKUP_NOT_IN_PR Backup is not in progress
OGRESS
-16919 PI_BCKSTATE_BACKUP_FAILED Backup of one or more components failed

-16920 PI_BCKRPC_NO_RESPONSE Expected VSS Async callback function was


not called within timeout period
-16921 PI_BCKRPC_CALLBACK_UNEXPECTE Unexpected VSS Async callback. Callback
D function was called but was not expected
-16923 PI_BCKRPC_INVALID_BACKUP_COM Invalid backup command
MAND
-16924 PI_BCKRPC_INVALID_BACKUP_HIST InvalidBackup history command
ORY_COMMAND
-16940 PI_VSSAPI_ADDCOMPONENT_FAILE VSS API call AddComponent failed
D
-16941 PI_VSSAPI_ADDDATABASEFILE_FAIL VSS API call AddDatabaseFiles failed
ED
-16942 PI_VSSAPI_BACKUPTYPE_UNKNOW Unknown backup type
N
-16943 PI_VSSAPI_BACKUPTYPE_LOG_UNS Backup type of LOG is unsupported
UPPORTED
-16944 PI_VSSAPI_BACKUPTYPE_OTHER_U Backup type of OTHER is unsupported
NSUPPORTED
-16950 PI_BACKUPARG_MISSING_FLAG_FO Missing flag. The -output is required and at
R_CRF_COMMAND least one of the -NewPIDir and -NewArcDir
flags are required for -crf command
-16951 PI_BACKUPARG_MISSING_FLAG_FO Missing flag. The
R_SIMULATEVSS_COMMAND -PrepareBackup2Freeze,
-Thaw2PostSnapshot, or
-BackupShutdown flags must be specified
after the -SimulateVSS flag
-16952 PI_BACKUPARG_MISSING_FLAG_FO Missing flag. The -freeze, -thaw, or
R_TEST_COMMAND -slowcopy flags must be specified along
with the -backup -test command
-16980 PI_BCKLOCK_GETLOCK_TIMEOUT GetLock timeout for master backup lock
-16981 PI_BCKLOCK_GETEXCLUSIVELOCK_ GetExclusiveLock timeout for master
TIMEOUT backup lock
-16983 PI_BCKLOCK_RETURNEXCLUSIVELO ReturnExclusiveLock failed for master
CK backup lock
-16984 PI_BCKLOCK_RETURNEXCLUSIVELO ReturnExclusiveLock for master lock failed
CK_NOTLOCKED because master lock was not locked

198
Error Codes 17000-17999, With Messages

Code Code Identifier Message


-16985 PI_BCKLOCK_GETLOCK_NONVSSBA GetLock failed for master backup lock
CKUP because a non-VSS backup is in progress
-16986 PI_BCKLOCK_UNBALANCEDLOCKRE Unbalanced lock return for master backup
TURN lock

Error Codes 17000-17999, With Messages


Code Code Identifier Message
-17000 PI_UNX_SEMRANGE Semaphore count out-of-range
-17001 PI_UNX_ARRSEM Semaphore belongs to array
-17002 PI_UNX_EVNONAME No name for shared event
-17003 PI_UNX_EVNOINIT Event not initialized
-17004 PI_UNX_BADEVSEM Named semaphore init failed

Error Codes 18000-18999, With Messages


Code Code Identifier Message
-18000 PI_SYS_STATUSUNKNOWN Have not heard from this server
-18001 PI_SYS_MISSINGUPDATE Unable to process further change records,
missing update in sequence

-18002 PI_SYS_BADUPDATE Error processing update

-18003 PI_SYS_NOPRODUCER No producer found on the primary server

-18004 PI_SYS_UNABLETOUNREGISTERP Unable to register change producer


RODUCER

-18005 PI_SYS_NOACTIVE Server misconfigured, no local server


defined.

-18006 PI_SYS_NOPRIMARY Server misconfigured, no primary server


defined.

-18007 PI_SYS_DISCONNECTED Unable to connect to primary server

-18008 PI_SYS_UNABLETOSIGNUPFORUP Unable to signup for changes on the primary


DATES server

-18009 PI_SYS_UNABLETOUNSIGNUPFOR Unable to unsignup for changes on the


UPDATES primary server

PI Server Reference Guide 199


PI Error Code Reference

Code Code Identifier Message


-18010 PI_SYS_UNABLETODISCONNECTF Unable to disconnect from the primary server
ROMPRIMARY

-18011 PI_SYS_NOCOLLECTIVE Server misconfigured, collective not found

-18012 PI_SYS_INVALIDROLE Invalid role defined for this server

-18013 PI_SYS_MEMBERSERVERINERROR Member server is in error

-18014 PI_SYS_UNABLETOREADSTATUSF Unable to get status update from the primary


ROMPRIMARY server

-18015 PI_SYS_UNABLETOSENDUPDATES Unable to send updates to secondary servers

-18016 PI_SYS_UNABLETOSENDSTATUST Unable to send status update to the primary


OPRIMARY server

-18017 PI_SYS_UNABLETOREADCHANGE Unable to get change records from the


RECORDSFROMPRIMARY primary server

-18018 PI_SYS_COMMTIMEOUT Server has not communicated

-18019 PI_SYS_DELETED Member has been removed from the PI Sys


Database

-18020 PI_SYS_TIMEOUTOFSYNC Member clock as drifted too far from the


Primary's clock

-18021 PI_SYS_FAILEDTOENABLEREPL Failed to enable replication

-18022 PI_SYS_SYNCTIMEOUT Server has failed to keep synch

-18023 PI_SYS_UNABLETOSAVEUPDATES Unable to save unprocessed config changes


to disk

-18024 PI_SYS_UNABLETOLOADUPDATES Unable to load unprocessed config changes


from disk

-18025 PI_SYS_ORPHANSERVER Server is not a member of a collective

-18026 PI_SYS_UNABLETOCHANGEROLE Unable to change the role of the primary


OFONLINEPRIMARY server while it's online

-18027 PI_SYS_NOTREADYTOPROCESSC Server is not ready to process change


HANGES records

200
Error Codes 18000-18999, With Messages

Code Code Identifier Message


-18028 PI_SYS_UNABLETOSIGNUPSECON Unable to signup all secondary servers to
DARYS receive config changes

-18029 PI_SYS_INVALIDATTRFORNONREP Invalid attribute for non-replicating server


LICATINGSERVER

-18030 PI_SYS_INVALIDNAME Name cannot contain spaces or other invalid


characters

-18031 PI_SYS_INVALIDNAMELOCALHOST Localhost is not a valid


namePI_SYS_INVALIDNAME

-18032 PI_SYS_INVALIDFQDN FQDN is invalid

-18033 PI_SYS_DUPLICATEFQDN Two servers have the same FQDN or they


resolve to the same IP address

-18034 PI_SYS_UNABLETOPRODUCEUPD Unable to produce update for secondary


ATE servers

-18035 PI_SYS_UNABLETOREADUPDATE Error reading update

-18036 PI_SYS_UNABLETORENAMECURR Unable to rename the current server


ENTSERVER

-18037 PI_SYS_UNABLETORENAMEONLIN Unable to rename a server while it's online


ESERVER

-18038 PI_SYS_UNABLETOREMOVECURR Unable to remove the current server


ENTSERVER

-18039 PI_SYS_UNABLETOREMOVEONLIN Unable to remove an server while it's online


ESERVER

-18040 PI_SYS_CHGRECVERSUNSUPPOR Unsupported replication change record


TED version; upgrade may be required

-18041 PI_SYS_DUPLICATESERVERID Two servers have the same Server ID

-18042 PI_SYS_UNABLETOGETLICENSEFR Unable to get a license from the primary


OMPRIMARY server
-18043 PI_SYS_LICENSEERROR Licensing Error

-18044 PI_SYS_LICENSESETTOEXPIRE License is set to expire

-18045 PI_SYS_LICENSEEXPIRED License has expired

-18046 PI_SYS_NOFQDN Unable to Resolve the FQDN

-18047 PI_SYS_NOIPADDR Unable to Resolve the IP Address

PI Server Reference Guide 201


PI Error Code Reference

Code Code Identifier Message


-18048 PI_SYS_UNABLETOREMOVECOLLE Unable to remove collective
CTIVE
-18049 PI_SYS_UNABLETOGETEVENTS Unable to get change records from the
primary server
-18050 PI_SYS_NOCRYPTO Unable to initialize cryptography

Error Codes 19000-19999, With Messages


Code Code Identifier Message
-19100 PI_AUTHN_NOOBJECT Authentication object does not exist
-19101 PI_AUTHN_INVALIDMSGTYPE Invalid authentication message type
-19102 PI_AUTHN_NOHANDLE Instance handle not available
-19103 PI_AUTHN_NOBUFFER Payload buffer not available
-19104 PI_AUTHN_INVALIDAUTHRES Inconsistent createsession result

Error Codes 30000-30999, With Messages


Code Code Identifier Message
-30000 PI_WARNING Generic warning
-30100 PI_PD_IGNORE Attribute ignored
-30101 PI_PD_OPERATIONFAILED One or more point SDK operations failed
-30110 PI_V_ANNOTHANDLEONLY Annotation handle only warning
-30150 PI_BCKSTATE_NOTREADY_FORFRE Warning - not ready for freeze yet
EZE
-30151 PI_BCKINFO_BACKUP_IN_PROGRES Backup in progress
S
-30152 PI_BACKUP_FILE_COPY_SKIPPED File copy skipped for incremental backup
-30153 PI_BACKUP_FILE_COPY_STATUS_U File copy status is always unknown for a
NKNOWN non-Component mode VSS backup
-30200 PI_NODATA Generic Nothing Found warning
-30201 PI_TMPUNAVAIL Generic temporary unavailable - try later
-30202 PI_RELOADED Generic reload warning
-30240 PI_GTB_ERRSENDREPLRECORD Warning: Failed to send replication record
-30240 PI_GTB_ERRSENDREPLRECORD Warning
Failed to send replication record
-30241 PI_GTB_ERRSENDAUDRECORD Warning: Failed to send audit record
-30241 PI_GTB_ERRSENDAUDRECORD Warning
Failed to send audit record

202
Error Codes 30000-30999, With Messages

Code Code Identifier Message


-30250 PI_UPD_OVERFLOW Update queue overflow, some events
missing
-30251 PI_UPD_GETEVENTSTHRESHOLD Update consumer get events request
exceeded size threshold and additional
events remain in the queue
-30260 PI_ALREADYLOCKED Request locking an already locked
-30300 PI_CTR_NOINSTALL Perflib registry is bad, will not install
counters
-30301 PI_CTR_DONOTINSTALLCOUNTERS Performance counters chosen not to be
installed
-30350 PILIC_GRACELICEXP License expired or exceeded grace period
-30400 PI_AR_DUPTIMESTAMPS Last event in collection has same
timestamp as next event
-30401 PI_AR_REMGENEVENT Attempt to remove or replace a generated
event
-30402 PI_AR_ANNFILERENAMED Annotation file not matching archive ID,
successfully renamed
-30403 PI_AR_INVCOMPEVENT Event for removal not found in snapshot
record, passed to archive
-30404 PI_AR_NOTINBACKUPSTATE No archive file in backup state
-30405 PI_AR_AUTODYNCONVERT Fixed-size archive was automatically
converted to dynamic type
-30406 PI_AR_RECNOALREADYUSED Recno already used by same point
-30500 PI_RDR_PARTIALSUCCESS One or more Redirector operations failed
-30501 PI_RDR_SUMMARYNOTSUPPORTED PI COM Connector does not support this
summary. Summary is performed on host.
-30502 PI_BCKINFO_RETRY_PREPAREBACK PrepareBackup is being retried for a
UP non-VSS Backup
-30503 PI_CHAINED_SUBSYS_BLOCK_WAR Chained subsystem block did not complete
NING successfully
-30504 PI_CHAINED_SUBSYS_BLOCK_INPR Another chained subsystem block is
OGRESS already in progress
-30600 PILIC_LICREACHED usage reaches licensed amount, the left
amount is 0
-30601 PILIC_NEWLICFILE is a new license file, i.e., the first time using
this license file
-30602 PILIC_LICEXCEEDED_WARNING Usage exceeded licensed amount
-30603 PILIC_BADUSERKEYWARNING Key mismatch warning

PI Server Reference Guide 203


Appendix D

Technical Support and Resources


You can read complete information about technical support options, and access all of the
following resources at the OSIsoft Technical Support Web site:
http://techsupport.osisoft.com (http://techsupport.osisoft.com)

Before You Call or Write for Help

When you contact OSIsoft Technical Support, please provide:


• Product name, version, and/or build numbers
• Computer platform (CPU type, operating system, and version number)
• The time that the difficulty started
• The message log(s) at that time

Help Desk and Telephone Support

You can contact OSIsoft Technical Support 24 hours a day. Use the numbers in the table
below to find the most appropriate number for your area. Dialing any of these numbers will
route your call into our global support queue to be answered by engineers stationed around
the world.
Office Location Access Number Local Language Options
San Leandro, CA, USA 1 510 297 5828 English
Philadelphia, PA, USA 1 215 606 0705 English
Johnson City, TN, USA 1 423 610 3800 English
Montreal, QC, Canada 1 514 493 0663 English, French
Sao Paulo, Brazil 55 11 3053 5040 English, Portuguese
Altenstadt, Germany 49 6047 9890 English, German
Manama, Bahrain 973 1758 4429 English, Arabic
Singapore 65 6391 1811 English, Mandarin
86 021 2327 8686 Mandarin
Perth, WA, Australia 61 8 9282 9220 English

PI Server Reference Guide 205


Technical Support and Resources

Support may be provided in languages other than English in certain centers (listed above)
based on availability of attendants. If you select a local language option, we will make best
efforts to connect you with an available Technical Support Engineer (TSE) with that language
skill. If no local language TSE is available to assist you, you will be routed to the first
available attendant.
If all available TSEs are busy assisting other customers when you call, you will be prompted
to remain on the line to wait for the next available TSE or else leave a voicemail message. If
you choose to leave a message, you will not lose your place in the queue. Your voicemail
will be treated as a regular phone call and will be directed to the first TSE who becomes
available.
If you are calling about an ongoing case, be sure to reference your case number when you call
so we can connect you to the engineer currently assigned to your case. If that engineer is not
available, another engineer will attempt to assist you.

Search Support

From the OSIsoft Technical Support Web site, click Search Support.
Quickly and easily search the OSIsoft Technical Support Web site's Support Solutions,
Documentation, and Support Bulletins using the advanced MS SharePoint search engine.

Email-based Technical Support

techsupport@osisoft.com
When contacting OSIsoft Technical Support by email, it is helpful to send the following
information:
• Description of issue: Short description of issue, symptoms, informational or error
messages, history of issue
• Message logs: See documentation for your PI System for information on obtaining
message logs pertinent to the situation.

Online Technical Support

From the OSIsoft Technical Support Web site, click Contact us > My Support > My Calls.
Using OSIsoft's Online Technical Support, you can:
• Enter a new call directly into OSIsoft's database (monitored 24 hours a day)
• View or edit existing OSIsoft calls that you entered
• View any of the calls entered by your organization or site, if enabled
• See your licensed software and dates of your Service Reliance Program agreements

206
Remote Access

From the OSIsoft Technical Support Web site, click Contact Us > Remote Support
Options.
OSIsoft Support Engineers may remotely access your server in order to provide hands-on
troubleshooting and assistance. See the Remote Access page for details on the various
methods you can use.

On-site service

From the OSIsoft Technical Support Web site, click Contact Us > On-site Field Service
Visit.
OSIsoft provides on-site service for a fee. Visit our On-site Field Service Visit page for more
information.

Knowledge Center

From the OSIsoft Technical Support Web site, click Knowledge Center.
The Knowledge Center provides a searchable library of documentation and technical data, as
well as a special collection of resources for system managers. For these options, click
Knowledge Center on the Technical Support Web site.
• The Search feature allows you to search Support Solutions, Bulletins, Support Pages,
Known Issues, Enhancements, and Documentation (including user manuals, release
notes, and white papers).
• System Manager Resources include tools and instructions that help you manage: Archive
sizing, backup scripts, daily health checks, daylight savings time configuration, PI Server
security, PI System sizing and configuration, PI trusts for Interface Nodes, and more.

Upgrades

From the OSIsoft Technical Support Web site, click Contact Us > Obtaining Upgrades.
You are eligible to download or order any available version of a product for which you have
an active Service Reliance Program (SRP), formerly known as Tech Support Agreement
(TSA). To verify or change your SRP status, contact your Sales Representative or Technical
Support (http://techsupport.osisoft.com/) for assistance.

PI Server Reference Guide 207

You might also like