Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
PI3 Server
Version 3.4.370
Worldwide Offices
OSIsoft, Inc. is the owner of the following trademarks and registered trademarks: PI System, PI ProcessBook,
Sequencia, Sigmafine, gRecipe, sRecipe, and RLINK. All terms mentioned in this book that are known to be
trademarks or service marks have been appropriately capitalized. Any trademark that appears in this book that
is not owned by OSIsoft, Inc. is the property of its owner and use herein in no way indicates an endorsement,
recommendation, or warranty of such party's products or any affiliation with such party of any kind.
Restricted Rights Legend
Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii)
of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013
Copyright Notice
Unpublished -- rights reserved under the copyright laws of the United States
PREFACE – USING THIS GUIDE
The PI Server System Management Guide is an in-depth manual that provides the
information and instructions that system administrators need to operate the PI System.
This guide includes comprehensive instructions to assist you in:
Using PI Server command-line tools such as PIConfig, PIDiag, and PIArtool
Configuration and tuning of your PI Server for optimum performance
Monitoring system health, and ensuring data preservation and integrity
Managing the Snapshot, Event Queue and Data Archive
Troubleshooting and repair
To effectively manage a PI System, follow the recommendations and procedures for each of
the following topics:
Starting and Stopping PI Systems
Backing Up PI Servers
Managing Archives
Managing Interfaces
Managing Security
Monitoring PI System Health
Moving, Copying or Merging PI Servers
For troubleshooting and performance issues, this guide includes Appendices of error
messages provided in the System Message Log, and an extensive list of performance
measurements (statistics) you can use to optimize the System.
The PI Server Documentation Set includes seven user guides, described below.
Tip: Updated user guides, which provide the most up-to-date information, may be
available for download from the OSIsoft Technical Support Web site
(http://techsupport.osisoft.com).
Introduction to PI A guide to the PI Server for new users and administrators. It explains PI
System Management system components, architecture, data flow, utilities and tools. It provides
instruction for managing points, archives, backups, interfaces, security and
trusts, and performance. It includes a glossary and resource guide.
PI Server Installation A guide for installing, upgrading and removing PI Servers on Windows and
and Upgrade Guide UNIX platforms, including cluster and silent installations.
PI Server System An in-depth administration guide for the PI Server, including starting and
Management Guide stopping systems, managing the Snapshot, Event Queue and Data Archive,
monitoring system health, managing backups, interfaces, security, and
moving and merging servers. Includes comprehensive instructions for using
command-line tools: PIConfig, PIDiag, and PIArtool, and in-depth
troubleshooting and repair information.
PI Server Reference A comprehensive reference guide for the system administrator and
Guide advanced management tasks, including: databases; data flow; PI Point
classes and attributes, class edit and type edit; exception reporting;
compression testing; security; SQL subsystem; PI time format; and
overviews of the PI API, and PI-SDK System Management Tool (SMT).
Auditing the PI An administration guide that explains the Audit Database, which provides a
Server secure audit trail of changes to PI System configuration, security settings,
and Archive Data. It includes administration procedures to enable auditing, to
set subsystem auditing mode, to create and archive database files, and to
export audit records.
PINet and PIonPINet A systems administration guide, including installation, upgrade and
User Guide operations, for PINet for OpenVMS and PIonPINet, which support migration
and interoperability between PI2 and PI3 Systems.
Page iv
Preface - Using this Guide
Monospace Consolas monospace is used for: To list current Snapshot information every 5 seconds,
type: Code examples use the piartool -ss command. For example:
"Consolas" Commands to be typed on the
font command line (optionally with
arguments or switches)
System input or output such as
excerpts from log files and other
data displayed in ASCII text
Bold consolas is used in the
context of a paragraph
Light Blue - Links to URL / Web sites, and email http://www.osisoft.com/procedures.aspx
Underlined addresses support@osisoft.com
Related Documentation
OSIsoft provides a full range of documentation to help you understand and use the PI Server,
PI Server Interfaces, and PI Client Tools. Each Interface has its own manual, and each Client
application has its own online help and/or user guide.
The UniInt End User Manual describes the OSIsoft Universal Interface (UniInt), which is
recommended reading for PI Server system managers. Many PI Interfaces are based upon
UniInt, and this guide provides a deeper understanding of principals of Interface design.
The PI Server provides two sets of powerful tools that allow system administrators and users
to perform system administration tasks and data queries.
The PI Server includes many command-line tools, such as pidiag and piartool. The
PI Server Documentation Set provides extensive instruction for performing PI Server
administrative tasks using command-line tools.
The PI System Management Tools (SMT) is an easy-to-use application that hosts a
variety of different plug-ins that provide all the basic tools you need to manage a PI
System. You access this set of tools through a single host application. This host
application is sometimes referred to as the SMT Host, but it is more commonly called
System Management Tools or SMT.
You can download the latest version of SMT from the Technical Support Web site:
http://techsupport.osisoft.com
In addition to extensive online help that explains how to use all of the features in the SMT,
the SMT includes the Introduction to PI System Management User Guide.
Page vi
QUICK TABLE OF CONTENTS
Chapter 12. Finding and Fixing Problems: the pidiag Utility ..................................................263
Table of Tables................................................................................................................................xix
Page x
Table of Contents
Page xii
Table of Contents
Page xiv
Table of Contents
Chapter 12. Finding and Fixing Problems: the pidiag Utility ..................................................263
12.1 General Information ......................................................................................................265
Page xvi
Table of Contents
Index of Topics...............................................................................................................................347
Page xx
TABLE OF FIGURES
The PI Server includes several separate processes that participate in startup and shutdown.
These are referred to as PI processes or PI subsystems. This section describes the relationship
between the processes, and the startup and shutdown scripts used to control them.
PI should only be started or stopped by the PI System manager. It is important to remember
that stopping PI affects all client applications, performance equation calculations, and the
archiving of data.
PI Server startup is performed with a pair of scripts: a generic PI startup script starts all PI
processes, which then calls a site-specific script to start interfaces and other site specific
programs. The system manager should modify only the site-specific script since the generic
startup script may be replaced during a PI Server upgrade. The actual file names of these
scripts vary with the operating system. Platform-specific details are provided in the following
subsections.
In general, the PI Server shutdown scripts are similar: a generic PI shutdown script calls a
site-specific script to shut down interfaces and site specific programs, and then shuts down all
PI processes.
Note: The only exception to this is shutting down PI processes running as individual
command windows. In this case, you must bring each window in focus and type
<CTRL-C>. Running PI subsystems in command windows is very rare; and usually
only encountered in troubleshooting scenarios.
1.1 Starting PI
The PI Subsystems may take several minutes to start. Remote or PI API based interfaces and
other applications are blocked from connecting until the core PI Subsystems have completed
startup. The connection blocking is accomplished by opening the TCP/IP listener when the
core subsystems are ready to service requests. The following message is posted to the PI
Server log when the listener is opened:
Page 2
1.2 - Stopping PI
Some interfaces on Windows cannot be run as services. Check the interface documentation.
1.2 Stopping PI
The procedure for stopping PI is slightly different, depending on whether you’re running on
Windows or UNIX.
should be set to reflect the actual shutdown time. Failing to allow proper shutdown of the PI
Server can result in lost data or corrupted data files.
To shut down an interactively started PI Server, type <CTRL-C> in each of the command
windows corresponding to the PI processes. These should be stopped in the following order:
Utilities (for example, piconfig)
Interfaces (for example, Ramp Soak and Random)
pinetmgr (When you instruct pinetmgr to stop, the remaining processes are told to
exit in the proper order and, finally, pinetmgr will stop.)
Shutdown Flag
The shutdown point attribute in the point database is set to TRUE (1) by default.
If the shutdown attribute for a point is set to TRUE, the point is able to receive shutdown
events if the shutdown.dat file targets the point.
Page 4
1.2 - Stopping PI
pishutev
Shutdown events are written at system startup by the pishutev interface. The utility reads a
configuration file to determine which tags should receive shutdown events. It also supplies a
configurable timestamp for the PI Server shutdown. Unlike most PI processes, pishutev exits
after completion.
The startup command line for pishutev is located in the PI startup files PI/adm/pistart.sh
(UNIX), PI\adm\pistart.bat and PI\adm\pisrvstart.bat.
By default, the configuration file is PI\dat\shutdown.dat. It is sometimes useful to create
additional shutdown configuration file(s) with additional point selections. These files are
processed by starting another instance of the interface. The new shutdown configuration file
name is passed as a parameter using the -f flag in the pishutev command line: For example:
pishutev -f myshutdown.dat
This command line should be added to the PI site-specific startup files PI/adm/pisitestart.sh
(UNIX) and PI\adm\pisitestart.bat. Starting a second instance of pishutev in order to process
an additional shutdown configuration file is not supported when starting PI as Windows
services.
By default, pishutev determines the shutdown event timestamp from a file written by the
Snapshot Subsystem. This file is updated whenever the Snapshot is flashed to disk, usually
every 10 minutes. Hence, in the event of a power failure, the timestamp of the shutdown
event are accurate to within 10 minutes. When PI is shut down normally, the timestamps are
the actual shutdown time. If the file that is written by the Snapshot Subsystem is missing, the
shutdown events interface uses the current time to timestamp the shutdown events.
The default time may be overridden by a user-specified time using the -t flag and passing the
time as a parameter in the command line.
For example:
pishutev -t 11:00
By default, the digital state of shutdown is written for each shutdown event.
To write a digital state other than shutdown, use the -s flag and pass the digital state as a
parameter in the command line. The specified state must already be configured in the System
Digital State Set in the Digital State Table. For example:
pishutev -s SpecialState
The -f, -t, and -s flags may be used in any combination.
Shutdown.dat
The points receiving shutdown events are specified using the file PI\dat\shutdown.dat.
The PI Server is delivered with a shutdown.dat file that selects all points whose shutdown
flag is TRUE. This file is shown below. You may wish to edit the file to restrict shutdown
events to certain groups of tags.
! @(#)shutdown.dat 1.1 05/24/96
! default shutdown events file
Caution: Do not specify additional tags by appending comma separated tag masks
or by using additional lines. Only one tag mask may be specified.
If you do not specify a tag-mask, the interface exists with an error. To prevent all shutdown
events, specify a tag mask that does not match any tag.
Other point attributes and values may be used in addition to or instead of the shutdown flag.
These conditions are logically ANDed together.
For example, the following configuration file selects only tags that start with s, have the
location1 attribute set to 0, and Pointsource set to H. No other tags will receive shutdown
events.
! tag mask
s*
! point attributes
location1,0
pointsource,H
If no point attributes are specified, all tags specified by the tag mask are selected to receive
shutdown events.
The procedure to configure PI for automatic startup depends on the operating system.
PI Server on Windows is normally run as a collection of services. The installation procedure
provides a dialog to optionally set automatic startup on reboot. The reboot startup behavior of
PI can also be set using the Control Panel Services applet.
Page 6
1.3 - Automatic Startup
3 default level
Which processes run at each level is determined by a set of scripts, /etc/rcS through /etc/rc6.
These scripts look in the directories /etc/rc#.d (where # = 0, 2, 3, etc.) for scripts that begin
with a K or an S. The K scripts are used to kill processes, and the S scripts are used to start
processes. When the system moves from level 3 to level 2, the K scripts in /etc/rc2.d are
executed first, then the S scripts. The scripts are run in ASCII collated sequence, so K02stop
is run before K04metoo. On shutdown or reboot, the system runs the scripts in /etc/rc0.d.
If you are using the default run level, you will need to put the PI startup in /etc/rc3.d. The
shutdown script for PI needs to be in /etc/rc2.d, so PI will be shut down if the system goes to
non-networked mode, and also in /etc/rc0.d, so PI will be shut down if the system is halted or
rebooted.
Note: Solaris systems should be restarted using shutdown -i 6. This will cause the
shutdown scripts to be run before running reboot. The reboot command simply
restarts the kernel, without taking the time to shut down processes properly. The
command shutdown -i 5 is for powering down.
Script files are actually kept in /etc/init.d, with links placed in the /etc/rc#.d directories. So, in
/etc/init.d, you need to create the following three files: PI, PIstart and PIstop. Be sure to
change the lines that specify where to find PI on your system.
#!/bin/ksh
#
# Filename: /etc/init.d/PI
#
# become piadmin to start/stop PI
PATH=/sbin:/usr/sbin:/usr/bin
export PATH
case "$1" in
'start')
if [ -f /etc/init.d/PIstart ] ; then
su - piadmin -c "/etc/init.d/PIstart" > /dev/console 2>&1
fi
;;
'stop')
if [ -f /etc/init.d/PIstop ] ; then
su - piadmin -c "/etc/init.d/PIstop" > /dev/console 2>&1
fi
;;
*)
echo "usage: $0 {start|stop}"
;;
esac
#!/bin/ksh
#
# Filename: /etc/init.d/PIstart
# Make sure to set the directory in these
# files to your PIHOME directory, in all
# places
#
if [ -f /opt/pi/adm/pistart.sh ] ; then
cd /opt/pi/adm
nohup ksh pistart.sh
fi
#!/bin/ksh
#
# Filename: /etc/init.d/PIstop
# Make sure to set the directory in these
# files to your PIHOME directory, in all
# places
#
if [ -f /opt/pi/adm/pistop.sh ] ; then
cd /opt/pi/adm
ksh pistop.sh
fi
Next, set the owner, group, and permissions on these files to match the other files in this
directory:
root> chgrp sys /etc/init.d/PI*
root> chmod 755 /etc/init.d/PI*
Page 8
1.3 - Automatic Startup
Then, you'll need to set the links in the rc#.d directories. Make sure that the S## number on
the startup file is higher than the S## number for inetd, and that the K## number for the kill
file is lower than the K## number for inetd (in both directories).
root> ln -s /etc/init.d/PI /etc/rc3.d/S96PI
root> ln -s /etc/init.d/PI /etc/rc2.d/K04PI
root> ln -s /etc/init.d/PI /etc/rc0.d/K04PI
Verify that these files have the same owner, group, and permissions as other startup files in
those directories.
Finally, test your scripts before you restart your machine. To stop PI:
root> sh /etc/rc0.d/K04PI stop
Verify that PI processes shut down.
root> sh /etc/rc3.d/S96PI start
Verify that PI starts properly.
If there is any problem with stopping or restarting PI, remove the links in the /etc/rc#.d
directories until you've debugged and fixed the problems. The files in the /etc/init.d directory
will not affect your system as long as there are not links in the /etc/rc#.d directories.
Which processes run at each level is determined by the /sbin/rc script. This script looks in the
directories /sbin/rc#.d (where # = 1, 2, 3, etc.) for scripts that begin with a "K" or an "S". The
"K" scripts are used to kill processes, and the "S" scripts are used to start processes. When
moving down from a higher level to a lower level, all "K" scripts in all the intervening levels
are run. When moving up to a higher level, all "S" scripts in all intervening levels are run. So
when the system moves from level 4 to level 2, the "K" scripts in /sbin/rc3.d are executed,
then the "K" scripts in /sbin/rc2.d. The scripts are run in ASCII collated sequence, so
K002stop is run before K004metoo.
If you are using the default run level of 2, you must put the PI startup in /sbin/rc3.d. The
shutdown script for PI needs to be in /sbin/rc%.d, where % is the default run level, minus 1,
so PI will be shut down if the system goes out of the default run level to any other level, or if
the system is halted or rebooted. To determine your default run level, check the line in
/etc/inittab that reads "init:#:initdefault:." The # is the default run level for the system.
Script files are actually kept in /sbin/init.d, with links placed in the /sbin/rc#.d directories. So,
in /sbin/init.d, you need to create the following three files: PI, PIstart and PIstop. Be sure to
change the lines that specify where to find PI on your system.
#!/bin/ksh
#
# Filename: /sbin/init.d/PI
#
# become piadmin to start/stop PI
PATH=/sbin:/usr/sbin:/usr/bin
export PATH
case "$1" in
'start')
if [ -f /sbin/init.d/PIstart ] ; then
su - piadmin -c "/sbin/init.d/PIstart" > /dev/console 2>&1
fi
;;
'stop')
if [ -f /sbin/init.d/PIstop ] ; then
su - piadmin -c "/sbin/init.d/PIstop" > /dev/console 2>&1
fi
;;
'start_msg')
echo "Starting PI"
;;
'stop_msg')
echo "Shutting down PI, please wait"
;;
*)
echo "usage: $0 {start|stop}"
;;
esac
#!/bin/ksh
#
# Filename: /sbin/init.d/PIstart
# Make sure to set the directory in these
# files to your PIHOME directory, in all
# places
#
if [ -f /opt/pi/adm/pistart.sh ] ; then
cd /opt/pi/adm
nohup ksh pistart.sh
fi
#!/bin/ksh
#
# Filename: /sbin/init.d/PIstop
# Make sure to set the directory in these
# files to your PIHOME directory, in all
# places
#
if [ -f /opt/pi/adm/pistop.sh ] ; then
cd /opt/pi/adm
ksh pistop.sh
fi
Next, set the owner, group, and permissions on these files to match the other files in this
directory:
Page 10
1.3 - Automatic Startup
0 shutting down
2 local (non-networked)
3 default, networked
Which processes run at each level is determined by a set of scripts, /sbin/rc0, /sbin/rc2, and
/sbin/rc3. These scripts look in the directories /sbin/rc#.d (where # = 0, 2, 3) for scripts that
begin with a "K" or an "S". The "K" scripts are used to kill processes, and the "S" scripts are
used to start processes. When the system moves from level 3 to level 2, the "K" scripts in
/sbin/rc3.d are executed first if the system is not coming from single-user mode, then the "S"
scripts are run (remember the system goes to single-user on boot, then goes to the default run
level). The scripts are run in ASCII collated sequence, so K02stop is run before K04metoo.
On shutdown or reboot, the system will run the scripts in /sbin/rc0.d.
You should put the PI startup in /sbin/rc3.d. The shutdown script for PI must be in
/sbin/rc2.d, so PI will be shut down if the system goes to non-networked mode, and also in
/sbin/rc0.d, so PI will be shut down if the system is halted or rebooted.
Script files are actually kept in /sbin/init.d, with links placed in the /sbin/rc#.d directories. So,
in /sbin/init.d, you need to create the following three files: PI, PIstart and PIstop. Be sure to
change the lines that specify where to find PI on your system.
#!/bin/ksh
#
# Filename: /sbin/init.d/PI
#
# become piadmin to start/stop PI
PATH=/sbin:/usr/sbin:/usr/bin
export PATH
case "$1" in
'start')
if [ -f /sbin/init.d/PIstart ] ; then
su - piadmin -c "/sbin/init.d/PIstart" > /dev/console 2>&1
fi
;;
'stop')
if [ -f /sbin/init.d/PIstop ] ; then
su - piadmin -c "/sbin/init.d/PIstop" > /dev/console 2>&1
fi
;;
*)
echo "usage: $0 {start|stop}"
;;
esac
#!/bin/ksh
#
# Filename: /sbin/init.d/PIstart
# Make sure to set the directory in these
# files to your PIHOME directory, in all
# places
#
if [ -f /opt/pi/adm/pistart.sh ] ; then
cd /opt/pi/adm
nohup ksh pistart.sh
fi
#!/bin/ksh
#
# Filename: /sbin/init.d/PIstop
# Make sure to set the directory in these
Page 12
1.3 - Automatic Startup
The system determines what processes should run at each level by reading the /etc/inittab file.
The lines in this file tell the system what scripts to run at what run levels. The line with the
initdefault in it (init:#:initdefault:, where # is some number 2-9) tells the system the default
run level. Each line with this number after the first colon is executed when entering the
default run level. Thus, we need to add a line to the /etc/inittab file:
pisystem:2:once:su - piadmin -c /etc/rc.pistart > /dev/console 2>&1 #
Start PI
Caution: Before editing /etc/inittab, you must save the original under another name. If
you do not and make an error while editing, your system will not boot.
If your initdefault level is not 2, you should replace the 2 with the appropriate number from
initdefault.
For shutdown and reboot, the system uses the /etc/rc.shutdown script. If this file does not
exist, you should create it. Otherwise, just add the last line below to your current file. If you
have to create the /etc/rc.shutdown file, you should give it the same owner, group, and
permissions as the /etc/rc file. As before, you are strongly advised to save a copy of the
original file under another name before editing this file.
#! /bin/ksh
#
# Filename: /etc/rc.shutdown
#
su - piadmin -c "/etc/rc.pistop" > /dev/console 2>&1
Now you'll have to create these two files you've told the system to use, /etc/rc.pistart and
/etc/rc.pistop. Be sure to change the directory in these files to the PI Server directory on your
system.
#!/bin/ksh
#
# Filename: /etc/rc.pistart
#
if [ -f /usr/PI/adm/pistart.sh ] ; then
cd /usr/PI/adm
nohup ksh pistart.sh
fi
#!/bin/ksh
#
# Filename: /etc/rc.pistop
#
if [ -f /usr/PI/adm/pistop.sh ] ; then
cd /usr/PI/adm
ksh pistop.sh
fi
You'll need to change the permissions on these files so that piadmin can run them:
root> chmod 755 /etc/rc.pi*
Finally, test your scripts before you restart your machine. To stop PI:
root> su - piadmin -c "/etc/rc.pistop" > /dev/console 2>&1
Verify that PI processes shut down.
Page 14
1.3 - Automatic Startup
Caution: Before editing /etc/rc, save the original under another name. If an error is
made while editing, the system will not boot.
In /etc/rc, there is a section intended for use by the local PI System Manager, "localrc()". In
this section, add the following lines (be sure to add them before vuelogin, if you have it):
#
# start PI
#
su - piadmin -c /etc/rc.pistart > /dev/console 2>&1
There's another directory, /etc/shutdown.d, which has the shutdown scripts for applications on
the system. This directory may be empty.
In any case, you should create a file, /etc/shutdown.d/PIstop, that looks like this:
#! /bin/ksh
#
# Filename: /etc/shutdown.d/PIstop
# Stop PI gracefully
su - piadmin -c "/etc/rc.pistop" > /dev/console 2>&1
This file should have the same owner, group, and permissions as the /etc/rc file. For our
systems, that means running these commands:
root> chown bin /etc/shutdown.d/PIstop
root> chgrp bin /etc/shutdown.d/PIstop
root> chmod 555 /etc/shutdown.d/PIstop
Next create the two files in /etc. Make sure you set the directories in these files to point to
your PI Server directory.
#!/bin/ksh
#
# Filename: /etc/rc.pistart
#
if [ -f /export/PI/adm/pistart.sh ] ; then
cd /export/PI/adm
nohup ksh pistart.sh
fi
#!/bin/ksh
#
# Filename: /etc/rc.pistop
#
if [ -f /export/PI/adm/pistop.sh ] ; then
cd /export/PI/adm
ksh pistop.sh
fi
Again, you need to set the owner, group, and permissions:
root> chown bin /etc/rc.pi*
root> chgrp bin /etc/rc.pi*
root> chmod 555 /etc/rc.pi*
Then test these scripts before restarting your machine.
root> sh /etc/shutdown.d/PIstop
Verify that PI shuts down.
root> su - piadmin -c "/etc/rc.pistart" > /dev/console 2>&1
Verify that PI starts up properly.
If there is any problem with stopping or restarting PI, you will need to restore your original
/etc/rc file, and remove the new file from the /etc/shutdown.d directory.
Shutting down an individual subsystem depends on the operating system. On Windows, look
in the file adm\pisrvstop.bat for the shutdown procedure; on UNIX, adm/pistop.sh. For restart
procedure check adm\pisrvstart.bat and adm/pistart.sh onWindows and UNIX, respectively.
Page 16
Chapter 2. MONITORING PI SYSTEM HEALTH
Each day, check the key elements of your PI System to make sure PI is working efficiently
and correctly. By checking the PI System daily, you can catch problems quickly and you also
familiarize yourself with the normal state of the system. This makes it easier to interpret
system metrics (such as I/O rates) and to find abnormal messages, when they occur.
Tag Data Does the Archive data for a reference tag pisnap.bat or pisnap.sh
look normal?
Archive data flow Is the Archive data flow normal? piartool -as and piartool -qs
Archive Shift Verify that the expected archives are piartool -al
registered and that you have prepared
for the next archive shift.
License limits Check the usage statistics and point piartool -lic
and usage counts for your system. Anticipate
license increase needs.
During normal operation, the PI Message Subsystem maintains a central log file for messages
from all PI subsystems. PI creates a new log every day, on universal time coordinate (UTC)
time. PI puts the log files in the PI\log directory and names each log according to the date.
The file names are of the form, pimsg_YYMMDD.dat, where:
YYY is years since 1900 (for example,if the year is 2000, YY is 100)
MM is the month (for example, if the month is January, MM is 01)
DD is the day (for example, if it is the fifth of the month, DD is 05)
For example, the log file for January 5, 2000 is named pimsg_1000105.dat.
PI Message log files are binary files that you can view using the pigetmsg utility.The
pigetmsg utility lets you view messages according to time, subsystem, or sender’s identity.
The pigetmsg utility requires PI to be running.
Note: The message log can be written (but not read) using function calls in the PI
API. It can be both read and written using the function calls in the PI SDK.
Page 18
2.2 - Viewing System Messages
If start time and max count are specified, the utility returns the number of messages
specified by the max count beginning from the start time.
If end time and max count are specified, the utility returns the number of messages
specified by the max count up to and including the end time.
If start time, end time, and max count are all specified, the utility returns messages
beginning at the start time and finishing when either the number of messages
specified in the max count or the end time is reached.
All the command line options for pigetmsg are listed in the following table.
Argument Description
-mc Max count. This is an integer the total number of messages to return.
-id This is an integer that represents the specific message identification number
from the text-file: 0 for the free-format messages. The default is all messages.
-pn This is the message source, either a specific program name (pinetmgr) or a wild-
card mask (* for all programs, *arc* for all archive related sources, etc.). The
default is all programs.
-msg A string mask selection for the message text. The default is * (show everything).
-dc Number of message to display at one time. The default is to display all
messages.
Parameter Description
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
Page 20
2.2 - Viewing System Messages
daily; each file covers one day. The file naming convention contains the year month and date.
The log files are created in the PI\log directory.
Even though all messages will be read from the log file, pinetmgr must be running.
The PI Message Subsystem executable, pimsgss, is located in the PI\bin directory. Here is an
example of running pimsgss offline to view messages from February 27, 2003:
D:\PI\bin>pimsgss -file ..\log\pimsg_1030227.dat
Message ID [A], (0-n) (A)ll (H)ead (T)ail (Q)uit (?):
Once the log file is specified, the behavior is identical to pigetmsg. Only messages in the
time period covered by the specified file can be viewed.
Offline use also allows specifying all arguments on the command line, just like pigetmsg.
Messages that match the command line arguments are immediately displayed. Here is an
example:
D:\PI\bin>pimsgss -file ..\log\pimsg_1030227.dat -st "27-feb-03 12:00" -
et "27-feb-03 15:00"
0 pinetmgr 27-Feb-03 12:07:16
>> Connection accepted: Process name: piconfig(1696) ID: 88
0 pinetmgr 27-Feb-03 12:11:54
>> Deleting connection: Piconfig(1696), Shutdown request received from
piconfig(1696) (8), ID: 88
0 pinetmgr 27-Feb-03 12:35:20
>> Connection accepted: Process name: Piconfig(1484) ID: 89
0 pinetmgr 27-Feb-03 12:38:08
>> Deleting connection: Piconfig(1484), GetQueuedCompletionStatus
error: Broken Pipe [109] The pipe has been ended.
Connection: Piconfig(1484) (14, 109), ID: 89
0 pinetmgr 27-Feb-03 13:24:08
>> PInet accepted TCP/IP connection, cnxn ID 90 Hostname:
olive.osisoft.com, 208.243.230.129
Avoid reading error codes from the PI Server message log on one operating system and
translating them with pidiag -e on another.
Windows-based PI Server exposes the Snapshot data displayed by piartool -ss as Windows
Performance Counters. These counters may be viewed with the Windows Performance
Monitor or recorded to the PI Server with the OSI Performance Monitor Interface.
Page 22
2.3 - Monitoring Snapshot Data Flow
Note: The piartool utility can monitor a remote PI Server by specifying the -remote
argument after all other arguments. piartool prompts the user for remote connection
information.
Point Count
The Point Count is the number of points that are currently defined in the Point Database. It is
incremented when a point is created and decremented when a point is deleted.
Page 24
2.4 - Monitoring the Event Queue
Note: When multiple Event Queues exist, the file pimapevq.dat is renamed to
pimq0000.dat and additional queues are named pimq<id>.dat where id is the queue
number in hexadecimal representation (from 0000 to FFFF). The piartool -qs
command always shows information from the queue to which the Snapshot
Subsystem is writing (primary queue).
After installation and regularly after significant changes, the System Manager should verify
the proper sizing and functioning of the Event Queue. The command piartool -qs allows you
to look at internal counters and statistics about the queue activity.
Queue Size
The Physical File Size shows the current size of the Event Queue on disk (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. When a page is full, the Snapshot Subsystem tries to write into the
next one and the Archive Subsystem reads the pages in the same order they were written. The
Total Data Pages shows the number of pages, obtained by dividing the 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
Based on the average size of all events, the Snapshot Subsystem maintains the number of
Average Events per Page. From this it derives an Estimated Remaining Capacity in number
of events (also shown by piartool -ss).
Total Bytes Written shows the volume of data that transited through the Event Queue since
the Snapshot Subsystem was last started.
Note: A System Manager should try to configure the queue so that it is big enough to
hold a few days worth of data. To configure the queue size, see Tuning the PI Server
in Chapter 3, Troubleshooting and Repair.
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 counters shows the Current Queue
Events (total events per queue).
Overflow Queues
When the current queue is entirely full, the Snapshot Subsystem creates additional queue files
of the same size. The Overflow Queues counters and Total Overflow Events (same as in
piartool -ss) indicates how many queues exist and how many events they hold. The Current
Page 26
2.5 - Monitoring the Archive
Queue Id shows the sequence number of the primary queue (always 0 under normal
conditions).
On a daily basis, the System Manager should look at the internal counters for the Archive
Subsystem. This enables you to predict the next archive shift as well as to monitor ongoing
system behavior and performance. You can use piartool -as and piartool -al for this purpose.
Other piartool commands are discussed in the chapter, Managing Archives.
Note: Windows-based PI Server exposes the Archive data displayed by piartool -as
as Windows Performance Counters. These counters may be viewed with the
Windows Performance Monitor or recorded to PI Server with the OSI Performance
Monitor Interfaces. This subject is covered in detail later in this chapter.
The piartool utility can run remotely by specifying some additional parameters on the
command line as described in Table 3–1. Options for Use with piartool on page 37.
Page 28
2.5 - Monitoring the Archive
The cache consists of archive records loaded into memory. Records are added as needed; they
are deleted when unused for a certain length of time. Cache Record Count yields the current
count. Cache Records Created is incremented when memory is allocated for a new record.
When archive data is requested (for example, the 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 flushed to disk. Unflushed Points counter
indicated the number of points with any number of events not yet flushed.
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.
Archiving Flag
Indicates whether or not events may be written to the archive; a value of 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 Archive 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.
The Update Manager provides change notification of Snapshot events, Point Database,
Module Database, Batch Database and Archive changes for applications such as PI
ProcessBook, Interfaces, and other PI API or PI-SDK-based applications. For example, a
trend application can request Snapshot update notification on points being trended. The
Update Manager queues all new Snapshots for these points. Periodically the trend application
retrieves and plots the new events.
Page 30
2.7 - System Date and Time
The PI server uses the Windows clock, including the time zone and Daylight Savings Time
(DST) settings to track time. If the system clock isn't right, the PI data isn't right either. You
might even lose data if the system clock is wrong.
As the PI System Manager, you must:
Check the system clock regularly
Page 32
Chapter 3. MANAGING ARCHIVES
PI Archive Management includes significant tasks for the PI System Manager, including:
Archive creation and deletion
Archive sizing
Archive shifting
Archive backups
Archive splitting/combining/compressing
Archive repair
The PI System stores your data in Archives, which are just files for holding PI data. Archive
files can be either fixed or dynamic. Fixed archive files are always the same size, regardless
of how much data they contain. Dynamic archive files grow in size as they get data. (See
About Fixed and Dynamic Archives for a complete explanation.)
The archive receiving current data is called the Primary Archive. When the Primary Archive
becomes full, an Archive Shift occurs and the next available archive becomes the new
Primary Archive.
If no eligible archives are available for an Archive Shift, PI uses the oldest available filled
archive as the new Primary Archive, overwriting the data in the old archive. For example in
the preceding illustration, after the shift from piarch.003 to piarch.004, no empty registered
archives are left on the Server. If the System Manager does not create new archives on this PI
Server, then at archive shif piarch.001 becomes the next Primary Archive and the PI Server
overwrites the existing data in that archive.
It takes PI a few minutes to complete an Archive Shift. During that time, you are not allowed
to add, edit or delete points. PI stores incoming data in the Event Queue until the shift is
complete and then writes the queued events into the new Primary Archive.
Page 34
3.2 - About Archives
archive file. Overflow records start at the end of the archive file and are filled backwards.
Each record is one kilobyte.
A point can have as many overflow records as needed. Points that receive events at a slow
rate might never need to allocate an overflow record, whereas points that receive events at a
fast rate might need to allocate many overflow records. (PI uses index records to keep track
of multiple overflow data records for a point).
Note: When the Archive allocates a new overflow record for a point, it writes the new
record to disk immediately, along with any existing records that reference the new
record.
Fixed Archives
The default archives that are installed with a PI System are fixed archives. They have the
following characteristics:
Fixed archive files have all of their disk space allocated at creation time. An empty
archive and a full archive take the same amount of disk space.
Fixed archives may or may not participate in archive shifts, depending on the point
count to archive size ratio and the state of the shift and write flags.
New points may be added to a primary fixed archive.
Use fixed archives for all normal operations.
Dynamic Archives
Dynamic archives have the following characteristics:
Like fixed archives, dynamic archives are for a specific time range.
Dynamic archives that already contain data are not eligible for Archive Shift. Newly-
created dynamic archives participate in the standard shift algorithm, if they are
registered.
Dynamic archives do not contain unallocated space waiting to be used for overflow
records. Rather, the file grows as overflow records are added. Dynamic archives have
a maximum archive size (specified at archive creation). The default maximum
archive size is 1 Gbyte or 10% less than the maximum available disk space,
whichever is less.
Dynamic archives are initialized with a fixed number of primary point records. Once
a dynamic archive is created, the number of primary records cannot grow beyond the
initial allocation, even if there is space in the file.
Note: You can create dynamic archives with a number of primary records higher
than the current number of points. This allows users to create additional points in a
dynamic primary archive. Users can add new points as long as the number of points
does not exceed the number of primary records specified when you created the
dynamic archive. To create this type of dynamic archive, use the piarcreate -acd
command.
Page 36
3.3 - Tools for Managing Archives
There are three main command line tools for managing archives:
piartool: The main archive management utility. You can use it to create, register and
unregister archives, force archive shifts, list details of archive files, and much more.
You can use piartool only when PI is running.
piarchss: The Archive Subsystem, piarchss, includes an Offline Archive Utility.
You use this utility to process existing “offline” archives. For example, you use
piarchss to combine multiple archives into one, to divide large archives into multiple
archives, to recover corrupted archives, and so on.
piarcreate: Use thie piarcreate utility to create new archives.
-aag Archive Activity Enable/Disable the archive activity grid, and list the
Grid Archive access information.
-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.
Page 38
3.3 - Tools for Managing Archives
-idci <in file> ID conversion file Create ID conversion file from specified input file.
-idco <outfile> creation
-lic [Options listed Licensing Usage List options for viewing license info
under Action] Information Def List all licenses
User List all licenses in use
Lic List all licenses and users
AllowedApps <-List <type,type...>|-Check
<app,app,...>>
List the types of licenses or check whether a
specific feature is licensed
-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
-ooo <-r><Sec> Out of order snap Show tags with Out of Order events. Optional
events Reset and Repeat.
-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 sub-
<count> Communication system.
[For troubleshooting Test
only]
Page 40
3.3 - Tools for Managing Archives
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:
Combining a number of archives together
Dividing a big archive file into smaller archives
Extracting specific time period from an archive
Recovering a corrupted archive
Recovering events from an Event Queue file
Converting 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.
-if <full path name> Input Archive Required. The full path, including drive letter is
File required. This is true for all file arguments passed.
-ost <option> Output file Options: Input, Event, <time>, NFE See “Specifying a
Start Time Start Time for the Output File (-ost).”
-oet <option> Output file End Options: Input, Event, <time>, NFE, Primary,
Time NoChange
-f <size in Mbytes> Make output If size = 0, the input file size is used. Default is dynamic
archive a fixed archive.
archive
-tzf <full path name> TimeZone Use when PI2 input different from standard DST - see
specification also the PI Server Reference Guide, Appendix D.
file
-filter <start end> Filter Process events only within the time range specified.
Both timestamps must be provided. See “Time Filtering
(-filter).”
-tfix Time Fix Apply a specified time transformation to input data. See
“Transforming Event Timestamps (-tfix).”
input Sets the start time to the start time of input. This is the default behavior.
time Sets the start 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 00:00:00 (midnight)
time 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.
Page 42
3.3 - Tools for Managing Archives
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.
Note: The piartool -idci input file does not allow for comment characters. The
comment character ( * ) generated by piconfig must be removed.
Page 44
3.3 - Tools for Managing Archives
01-Jan-70 00:00:00,3600
01-Jan-10 00:00:00,3600
Applies a missed DST conversion to an archive that covers the summer of 1997:
01-Jan-02 00:00:00,0
06-Apr-02 02:00:00,3600
26-Oct-02 02:00:00,0
31-Dec-02 23:59:59,0
A series of UTC values and offsets:
814953600,-61200
828871200,-57600
846403200,-61200
860320800,-57600
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 after every 200 records are processed, 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 chaining, 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.
<0 An error returned from the output processing check log messages
Archives must be registered before the PI Server can use them. If an archive is not registered,
its data are not accessible. The piartool -al command lists the registered archives.
Archives are listed in reverse chronological order—archives with the newer data before
archives with older data. The first archive listed is the Primary Archive, which covers the
current time range. The dates that are spanned by each archive are also shown. There cannot
be an overlap in dates between archives. Attempting to register an archive that overlaps an
already registered archive will fail. Unused archives have start and end times shown as
Current Time. The display order of unused archives is arbitrary and may change.
Here is a sample archive listing:
D:\PI\adm>piartool -al
Archive shift prediction:
Shift Time: 5-Oct-05 19:42:01
Target Archive: e:\pi\arc\piarch-2GB.1
Archive[0]: e:\pi\arc\piarch-2GB.3 (Used: 53.4%)
PIarcfilehead[$Workfile: piarfile.cxx $ $Revision: 101 $]::
Page 46
3.4 - Listing the Registered Archives
Label Description
Shift Prediction Provides estimated time for the next shift and the target archive. This is
important for backup planning.
Version Identifier of the archive's internal architecture. This label allows PI Server
to mount and upgrade archives from older versions of PI.
State Current condition of the archive. In piartool -al, this will always be
displayed as 4, which means mounted and ready. All other states
correspond to unmounted states, in which case the archive is not visible in
piartool -al.
Add Rate Average number of overflow-records added per hour, over the archive
lifetime.
Offsets: Primary Start and end record numbers for primary records. The end record number
is always 1/2 of the Record Count.
Offsets: Overflow Start and end record numbers for overflow records.
Annotations Number of annotations used and the maximum number available. The
archive shifts when this number is reached.
chronologically assigned with zero being the primary archive. The archive sequence number
is shown in with the archive list command (piartool -al); it is the number in the brackets
immediately following “Archive.”
Here is a sample archive listing:
C:\pi\adm>piartool -al
Archive shift prediction:
Shift Time: 27-Sep-05 14:46:56
Target Archive: g:\pi\arc\piarc.144
Archive[0]: g:\PI\arc\piarc.045 (Used: 72.2%)
PIarcfilehead[$Workfile: piarfile.cxx $ $Revision: 101 $]::
Version: 7 Path: g:\PI\arc\piarc.045
State: 4 Type: 0 Write Flag: 1 Shift Flag: 1
Record Size: 1024 Count: 131072 Add Rate/Hour: 116.0
Offsets: Primary: 19273/98304 Overflow: 55751/131072
Annotations: 10/65535 Annotation File Size: 1623
Start Time: 11-Aug-05 12:59:35
End Time: Current Time
Backup Time: Never
Last Modified: 9-Sep-05 22:26:55
Archive[1]: g:\pi\arc\piarc144.arc (Used: 16.2%)
PIarcfilehead[$Workfile: piarfile.cxx $ $Revision: 101 $]::
Version: 7 Path: g:\pi\arc\piarc144.arc
State: 4 Type: 0 Write Flag: 1 Shift Flag: 1
Record Size: 1024 Count: 131072 Add Rate/Hour: 3337.3
Offsets: Primary: 19273/65536 Overflow: 129079/131072
Annotations: 1/65535 Annotation File Size: 1552
Start Time: 11-Aug-05 09:12:35
End Time: 11-Aug-05 12:59:35
Backup Time: Never
Last Modified: 16-Aug-05 19:08:48
Archive[2]: g:\pi\arc\piarc145.arc (Used: 99.8%)
PIarcfilehead[$Workfile: piarfile.cxx $ $Revision: 101 $]::
Version: 7 Path: g:\pi\arc\piarc145.arc
State: 4 Type: 0 Write Flag: 1 Shift Flag: 1
Record Size: 1024 Count: 131072 Add Rate/Hour: 77.9
Offsets: Primary: 19273/65536 Overflow: 19511/131072
Annotations: 1/65535 Annotation File Size: 1552
Start Time: 2-Jun-05 09:21:00
End Time: 11-Aug-05 09:12:35
Backup Time: Never
Last Modified: 7-Sep-05 09:41:50
Archive[3]: g:\pi\arc\piarch.011 (Used: 99.8%)
PIarcfilehead[$Workfile: piarfile.cxx $ $Revision: 101 $]::
Version: 7 Path: g:\pi\arc\piarch.011
State: 4 Type: 0 Write Flag: 1 Shift Flag: 1
Record Size: 1024 Count: 131072 Add Rate/Hour: 36.8
Offsets: Primary: 19473/98304 Overflow: 19740/131072
Annotations: 1/65535 Annotation File Size: 1552
Start Time: 5-Jan-05 08:15:06
End Time: 2-Jun-05 09:21:00
Page 48
3.5 - Listing Archive Record Details
Use piartool -aw to read the contents of an Archive directly from file. The key to reading
archive data this way is to understand that every PI point has a unique Record Number
(RecNo) which corresponds to a primary record in the Archive. This can be found through
piconfig or PI-SMT tools. When a new archive is created, data for each point flows into its
own separate primary record (archives are divided into fixed size records, the number of
which is either static or can grow dynamically.) When this primary record fills up, then an
overflow record is set aside for the data to flow into. The primary record points to the first
overflow record which can point to a second and so forth. It is following this chain of records
that is referred to as an Archive Walk. Finally when the number of free unused overflow
records in an archive gets down below a certain number, this is when an automated archive
shift will occur.
S StateSet
Page 50
3.6 - Estimating Archive Utilization
Index shows whether the values in the records are data values or pointers to data records,
where 0 indicates that it is NOT an index record. If they are pointers, the pointers are actually
record numbers corresponding to the start time. When events for a point exceed two records
in a single archive, an index record is created. An index record holds about 150 pointers to
data records.
RecNo (Record Number) is a read-only point attribute which contains a pointer to the point's
primary record in the archive. This is useful when using tools such as piartool -aw to
examine the archives. Do not confuse RecNo with the PointID attribute. If the point is
deleted, the RecNo will be reused but the PointID will not.
8 Int32 (all records which have the index flag set will also show datatype 8)
12 Float32
101 digital
102 Blob
Broken Pointers
In rare cases of hardware failure, record chains can become inconsistent. The archive check
utility
pidiag -archk 'path'
can be used to examine archive integrity. For more details on this pidiag command, refer to
Verify the Integrity of Archive Files on page 272.
The archive offline utility will repair any chaining problem.
The space that a fixed archive uses is completely allocated at archive creation time. Use
piartool -al to list the registered archives. For each archive an estimate of the used space is
displayed.
The piconfig utility, the PI API and the PI-SDK may be used to add, edit, or delete archive
values.
Note: Contrary to the above title “Editing an Archive”, all archive edits are first
handled by the Snapshot Subsystem. The Snapshot Subsystem performs some
security and data checks then, if appropriate, forwards the edit events to the Archive
Subsystem.
For large scale changes and repair use the Offline Archive Utility (piarchss). For example,
inadvertently moving the computer system clock ahead may cause considerable problems.
You can configure a time limit on insertion and editing of events. The Snapshot rejects events
with timestamps earlier than the limit. By default there is no limit, which is consistent with
earlier versions of PI.
To configure, add an entry to PITimeout Table:
EditDays, nnn
where nnn is the number of days (prior to current time) in which changes and additions are
allowed. The Snapshot Subsystem loads PI Timeout table parameters on startup, therefore,
this subsystem must be restarted for the changes to take effect.
To create a new archive, use piarcreate, piartool -ac, or piartool -acd. These utilities allow
you to name the new archive, specify its location, create it, and initialize it. In general, use
piarcreate for all archive creation, unless you need to specify start and end times. piartool -
ac creates a fixed size archive, piartool -acd creates a dynamic archive.
With piarcreate, you may specify the size of the archive, but you will need to do a second
step to register it. This utility creates a dynamic archive if you use the -d flag.
With piartool -ac, the created archive size matches the current Primary Archive size, and
registration is automatic. The piartool utility allows you to optionally specify the start and
end times of the new archive. Option -ac specifies a fixed size archive, -acd specifies a
dynamic archive.
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 as its archive file at all
times.
Page 52
3.8 - Creating Archives
Some sites may find it useful to make data available in PI that was collected prior to the PI
installation.
Several applications can be used for backfilling, including a PI API or PI-SDK application,
piconfig, or the batch file interface. This depends mainly on the way the data to be entered
into PI is currently stored.
Note: Entries that allow access to specific names or addresses override the
above “disallow”. Edit all other entries to “Disallow”. Local connections are not
affected by pifirewall entries; make 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.
On Windows hosts, issue the command:
pisrvstart.bat -base
4. Create and register archive files for the backfilling period (using piartool -ac or -
acd).
5. 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. Steps 5,6 can be done with a PI API or PI-SDK program or
using the piconfig utility. Make sure that the old event is in the snapshot.
Page 54
3.10 - Creating a New Primary Archive
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 archive end time is the most
recent time stamp written to any point. 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 4 above, run
piconfig to either change the hostmask value to Allow or to delete the above
hostmask altogether.
9. Start the interfaces using pisitestart.sh or pisrvsitestart.bat.
Note: An archive can be created with a start time prior to point creation time, as long
as the point 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.
2. Use piartool -ac to create and initialize back fill archives. The start and end times
must be specified (that is why piarcreate cannot be used). 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 will not be 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, dividing the target time
range between the two, or creating a single larger archive, and then retry the data
backfilling.
In some situations it is useful to create and register a primary archive with specific start-time,
for example, when recovering from setting the time into the future, or when backfilling
archives, or after using pidiag -ar to recover from any situation of corrupted archives. To
create a new primary archive, use piartool -ac and specify the start time as required and the
end time as *. Note the following restrictions:
Registering a new primary archive will fail 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.
Note: Renaming archive files is generally not necessary. If you must do this,
remember to rename the annotation file as well. Check the release notes for a
description of issues associated with archive file renaming.
Page 56
3.11 - Managing Archive Shifts
When the primary archive file becomes full, the next empty (shiftable, writeable) archive is
used to store the new data. If none of the archives are empty, the archive file with the oldest
data (which is also shiftable and writeable) is cleared and used for new data. The start time of
this archive is set to the end time of the archive file that just became full.
The process of clearing the oldest archive and preparing it to be the new primary archive is
called an archive shift. It is important that all eligible archives are backed up prior to the
archive shift to ensure that no data is lost.
When an archive is assigned a start time, it is initialized. Archives are only initialized at
installation and during an archive shift.
The archive shift process takes a few minutes to initialize a new archive file. Adding, editing,
or deleting points is not allowed during archive shift. Events sent to the Archive during an
archive shift are queued. When the shift is complete, the queued events are written to the
Archive.
registering a new empty archive automatically resolves the situation and a shift into the new
archive will occur.
Failed shifts do not cause any data loss since the archive goes into read-only mode. All
incoming data is queued in the Event Queue by the Snapshot Subsystem.
Note: The oldest shiftable archive is the oldest writable archive large enough for the
current point count. Also, dynamic archives containing data are not shiftable.
Page 58
3.12 - Combining and Dividing Archives
From a user perspective, archive files are organized according to their size and the time
ranges that they span. It is useful sometime 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
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.
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. Failing to
include the “-ost” and “-oet” flags will get the default behavior. See the above discussion of
output archive time settings for more information.
If the input file were registered prior to the operation, it would be unregistered during the
operation. When the operation is complete, it may be registered again using piartool -ar.
Page 60
3.12 - Combining and Dividing Archives
Note: In most cases the Event Queue is the above file. But, it is possible to have
multiple Event Queues. The utility, piartool -qs, will indicate if your system uses
multiple queues. The queue naming convention, if multiple queues are used is
pimapNNNN.dat where NNNN is a four digit integer.
Prior to version 3.4, the Event Queue was pi\dat\pieventq.dat. PI 3.4 and newer 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 in most
cases offline processing of the Event Queue will not be necessary.
It’s important to back up the PI Server at least once a day, so that you don't lose data and
configuration information if something goes wrong with your equipment. All backups of PI
that are done while the PI System is running are managed by the PI Backup Subsystem
(PI\bin\pibackup.exe).
Page 64
4.3 - Guidelines for Backing Up Before Upgrading
• Restart the PI Backup Subsystem, wait for all of the subsystems except for the
problematic subsystem to register for backup, and then do a backup manually.
During VSS backups, PI databases are unavailable for writes for a very brief period
of time, typically on the order of milliseconds. This time period is less than the
timeout period for write operations such as point edits. This means backups could
potentially be done several times a day without disrupting normal server operation.
Backups should not be done while configuration changes are being made since the
changes may not take effect properly.
Although the disruption from a Freeze/Thaw cycle is relatively small, unnecessary
Freeze/Thaw cycles should be avoided. It is possible to unintentionally put PI
through a Freeze/Thaw cycle if you are using a non-component mode VSS backup
application such as NTBackup to do backups on your system. If any file on a volume
is backed up with a non-component mode backup, any VSS writer that has files on
that volume will go through a Freeze/Thaw cycle. This means that PI may think that
it is being backed up when you are really backing up a file that is completely
unrelated to it but happens to share a volume that is common to the PI databases.
Before and after an upgrade, do a complete backup of the PI Server by shutting PI down and
copying all PI files to a backup medium. Follow these steps.
Make sure that your Interface Nodes are buffering your data.
Shut down PI, so that all files are closed.
Back up all files in all subdirectories under the PI directory. Since PI is not running,
you can use any standard operating system utility such as copy or tar.
On UNIX, include the /etc/piparams.default file.
On Windows, include the registry entries under
HKEY_LOCAL_MACHINE/SOFTWARE/PI System/PI.
The exact instructions for automating PI backups depend on the operating system on which
your PI Server is installed. Refer to the appropriate section for your PI Server:
Automating Backups on Windows
Automating Backups on Windows with a 3rd Party Backup Application
Automating Backups on UNIX
Page 66
4.4 - Automating PI Backups
<path> E:\PI\backup Path must be the complete drive letter and path to a
directory with sufficient space for the entire backup.
[archive cutoff date] *-10d The cutoff date is specified in PI time format. For
example, "*-10d" restricts the backup to archives
archives that contain data between 10 days prior to
current time and current time. The more restrictive
of [number of archives] and [archive cutoff date]
takes precedence.
For example, the following command installs a task to backup the primary archive, archive1,
and archive2.
PIbackup.bat e:PI\backup 3 1-Jan-70 -install
All archives contain data later than midnight on 1-Jan-70, so the number of archives to be
backed is not restricted by the cutoff date. Note, however, only archives that contain data are
actually backed up. This means that if archive1 and archive2 are empty archives, then these
archives are not backed up.
The next example installs a task to backup all archives that contain data for the last 60 days to
the current time.
PIbackup.bat e:PI\backup 99999 *-60d -install
The assumption above is that less than 99999 archives are mounted, so 99999 does not
restrict the number of archives to be backed up.
The next example installs a task to backup PI using the default number of archives and the
default cutoff date.
PIbackup.bat e:PI\backup -install
The default number of archives for backup is 3, unless otherwise specified by the
Backup_NumArchives timeout parameter (see Timeout Parameters on page 87). The default
cutoff date is “1-Jan-1970 00:00:00”, unless otherwise specified by the
Backup_ArchiveCutoffDate timeout parameter.
administering the backups. This recommendation is simply for convenience purposes for
viewing the NTBackup log file. This is discussed further in Do a Test Backup on page 69.
Scheduled tasks can be viewed and edited via the Scheduled Tasks control panel.
Alternatively, tasks can be viewed and edited via the command line.
On Windows NT and Windows 2000, the scheduled tasks can be displayed with the at
command.
C:\pi\adm>at
Status ID Day Time Command Line
-----------------------------------------------------------------
1 Each M T W Th F S Su 2:00 AM C:\PI\adm\pibackuptask.bat
c:\PI\backup." 3 "*-60d""
On Windows 2003 Server, the scheduled tasks can be displayed and edited with the schtasks
command. Although the at command is still available on Windows 2003 Server, the schtasks
command should be used instead. For example, any task created with the at command on
Windows 2003 server cannot be edited.
e:\pi\adm>schtasks
TaskName Next Run Time Status
==================== ======================== ===============
PI Server Backup 02:00:00, 7/29/2005
Page 68
4.4 - Automating PI Backups
Note: If you want to do a non-VSS backup on a platform that supports VSS, you
would alter the pintbackup.bat file to specify your preferred backup tool, either
piartool -backup or some other backup tool.
backups, the actual files will be copied to subdirectories of PI\backup\. For example,
if the original file was located in PI\dat\, the file will be backed up to PI\backup\dat\.
8. For VSS backups, run vssadmin list writers. The output should indicate that the
state of the OSISoft PI Server VSS writer is stable.
General Considerations
The following files require special treatment during a restore.
Pisubsys.cfg This file contains the full path name to the rendezvous file
piv3.rdz. This path may be incorrect if the restore is not to
the original location. There is no need to restore the
pisubsys.cfg file after a new installation because this file is
installed by the installation kit.
Piarstat.dat The piarstat.dat file contains the full path names to all of
the registered archives and database security information
for the archives. If the destination directory of the archives
to be restored is different than the original, then you may
need to generate a new piarstat.dat file with the piartool -
ar command. You will need to re-register your archives and
re-create the database security.
Page 70
4.4 - Automating PI Backups
3. Review the options for the restore from the Tools > Option menu.
4. Click Start Restore. The files should be restored to the alternate location.
5. After the restore is complete, click Report… The report should indicate that all files
were restored successfully.
Page 72
4.5 - Automating Backups on a Windows Cluster
using NTBackup is that it comes with Windows free of charge, which allows OSISoft to
provide a default backup solution without requiring a third-party backup application.
However, you might want to use a third-party backup application if, for example, you already
use a third-party backup application and you want to use the same backup strategy for all of
your applications. A second reason may be that the third-party backup application has
particular features that make it easier for you to maintain backups. However, in order to use
any third-party backup application, the backup application must support VSS backups.
One limitation of NTBackup is that it only supports non-component mode VSS backups,
which means that NTBackup cannot use the components of PI to select files for backup. A
list of file names must be provided to NTBackup via the backup selection file
PI\dat\pibackup.bks. A big disadvantage of non-component mode backups is that if any file is
backed up on a volume where there is a PI database, PI will think that it is being backed up
even though none of its files are actually affected by the backup.
Most third-party backup applications support component mode backups, which mean that the
backup application will be able to detect the PI Backup Subsystem as a registered VSS writer
and will be display the components of the PI System that are available for backup. The
backup components of PI might appear in a third-party backup application as discussed in
Selecting Files or Components for Backup on page 75.
If you are using the PI Backup Scripts for your backups, then the backups must be scheduled
to run on both nodes in the cluster. That is, the command
PIbackup.bat <path> [number of archives]
[archive cutoff date] [-install]
must be run on both nodes in the cluster. Installing the backup scripts as a scheduled task is
discussed in detail under Automating Backups on Windows on page 66. Only one of the
scheduled backup tasks will succeed at any given time because the pibackuptask.bat and
pibackup.bat files are on the shared drive.
Other than the need to schedule the backups on both nodes, backups on clustered and non-
clustered Windows nodes are the same.
Page 74
4.7 - How The PI Backup Subsystem Works
occur until all participating VSS writers have been frozen. Since the system drive is
associated with several VSS writers, you should not install PI or any of its databases on the
system drive, especially if you plan to use a non-component mode backup application to do
your backups.
You can use any third-party backup application to backup PI as long as the backup
application supports VSS. Most third-party backup applications that support VSS also
support component mode backups. At the request of a backup application the, PI Backup
System identifies the files and components of the PI System. The backup application can use
this information to display the components in a graphical user interface. If the component of a
different application is selected for backup, then the PI system will not go through a
Freeze/Thaw cycle, even if that component has files on a disk volume that is common to the
PI databases.
A backup application that supports component mode backups has the following information
available to it for display purposes.
The registered name of the PI VSS writer. The registered name is OSISoft PI Server.
The friendly name of each component. Each component has a name and description.
The component description is intended to be used as a friendly name for display
purposes.
A component path. The component path provides a means of logically organizing a
group of components. The PI Archive Subsystem is the only subsystem that has a
non-null component path.
The PI System may appear as follows in a graphical user interface of a backup application
that supports component mode backups.
Each entry in the above tree view is a friendly name of a component except OSISoft PI
Server, which is the registered name of the PI VSS writer, and PI Archive Subsystem, which
is a component path. Typically, a backup application will use different icons to distinguish
between a registered writer, a component path, and a component, but this is dependent on the
particular backup application. Also, the component path PI Archive Subsystem may not be
selectable in some backup applications because there is no component at that point in the tree.
Page 76
4.7 - How The PI Backup Subsystem Works
A user can select one or more components for backup. However, for a typical, automated
backup one should configure the backup application to backup the OSISoft PI Server as a
whole because new archive components are added after each archive shift. These new
archives will not be selected for backup by default unless the OSISoft PI Server is selected for
backup as a whole.
... … …
PIBackup
The PIBackup Subsystem has a single component called SettingsAndTimeoutParameters.
The Settings and Timeout Parameters component contains files that are owned by various
subsystems. The owning subsystems do not need to participate in backup because there is no
special need to suspend data writes to these files during a backup. The subsystems that are
associated with these files are not listed in the list of registered subsystems for backup with
the piartool -backup -query command. The file names are hard-coded in the PI Backup
Subsystem.
The files backed up with this component are:
Plicmgr
The Pilicmgr subsystem has a single component called Pilicmgr.
The files backed up with this component are:
Page 78
4.7 - How The PI Backup Subsystem Works
Pimsgss
The Pimsgss subsystem has a single component called Pimsgss.
The PI Message system contains all message log files from the PI\log directory. The message
file log names all begin with pimsg_ and end with .dat.
The files backed up with this component are:
Pibasess
The Pibasess subsystem has a single component called Pibasess.
The files backed up with this component are:
Pisnapss
The Pisnapss subsystem has a single component called Pisnapss.
The files backed up with this component are:
Piarchss
The Piarchss subsystem has a component called Archive Registry and Archive Audit
Database plus one component for each archive.
The files backed up with the Archive Registry and Archive Audit Database component
are:
Archive and Archive file names can be anything. The annotation file name is the same
Annotation (.ann) as the archive file name with “.ann” appended to it.
files for all
components
PIBatch
The Pibatch subsystem has a single component called Pibatch.
The files backed up with this component are:
Page 80
4.7 - How The PI Backup Subsystem Works
The Identify event always occurs at the beginning of every backup, but it can also occur at
any time before or during a backup. The other VSS events always occur in the order specified
in the following table.
Identify The PI Backup Subsystem requests a list of files and components from each
subsystem that participates in backups. The PI Backup Subsystem returns the
compiled list to the VSS provider. During a non-component mode backup, this
information is simply not used by the backup application.
A backup application can use the information from the Identify event to
display the components of the PI System in its graphical user interface. If the
PI Backup Subsystem takes a long time to reply to a particular VSS event, a
backup application may send an Identify event to make sure that the PI
Backup Subsystem is still alive.
There is no way for the Backup Subsystem to be able to distinguish an identify
event at the beginning of a backup from an Identify event that occurs merely
for information gathering purposes.
PrepareBackup This event signifies the start of a backup. For a component mode backup, this
event is received only if one or more components of the PI System have been
selected for backup. The PI Backup Subsystem is told which of its
components have been selected. The event is forwarded to the subsystems
that are affected by the backup. For non-component mode backups, the event
is forwarded to every subsystem that participates in backups.
When this event is received by the PI Archive Subsystem, the subsystem sets
a flag to indicate that a VSS backup is in progress. The archive backup flag as
displayed by the piartool -as command will be set to 5.
For all other subsystems, the PrepareBackup event is ignored.
Freeze Each subsystem that is participating in the backup stops writing data to its files
when it receives the freeze event. For example, any data that is sent to the PI
archives will go to the queue and will not be readable until after the thaw
event. Data that is already in the archive remains readable between the
Freeze and Thaw events. Similarly, configuration information (such as point
configuration and the module database) also remains readable.
After the PI Backup Subsystem and all other VSS writers that are participating
in the backup have indicated that all files are frozen, the VSS provider will take
a snapshot of all disk volumes that are affected by the backup.
Thaw Each subsystem that is participating in the backup resumes writing data to
each of its files. The time between Freeze and Thaw is typically on the order
of a few milliseconds and cannot be greater than 60 seconds without timing
out.
The time period between Freeze and Thaw is typically short enough so that
database configuration operations should not time out. For example, a user
should be able to edit PI points during a backup without even noticing that a
PostSnapshot No actions are taken during the PI Backup Subsystem for the PostSnapshot
event.
Backup applications back up files between the PostSnapshot and the
BackupComplete events. Although data is being written to the files that are
being backed up, the state of the files at the time the snapshot is preserved
via a difference file. The difference file is maintained by the operating system
and is completely transparent to the PI system.
After the backup is complete or aborted, the difference file is discarded.
Backup completion may take hours if large files are being copied.
BackupComplete This event indicates that a backup has completed successfully. The last
backup time will be updated for each of the PI System’s database files that
keep track of such information. A summary of last backup times can be
displayed with the piartool -backup -identify -verbose command. The last
backup time for archive files are displayed by piartool -al command.
When the PI Archive subsystem received this event, the output of piartool -as
should indicate that the archive backup flag has been reset to 0.
BackupShutdown If the PI Backup Subsystem gets the BackupShutdown event without getting
the BackupComplete event, then this means that the backup did not
complete successfully.
If the PI Archive Subsystem never receives a BackupComplete event, it will
turn its archive backup flag off if it gets the BackupShutdown event.
Page 82
4.8 - Launching Non-VSS Backups with piartool -backup <path>
Identify The PI Backup Subsystem requests a list of files and components from
each subsystem that participates in backups. The Backup Subsystem uses
the list of files to determine which files it should backup.
PrepareBackup When this event is received by the PI Archive Subsystem, the subsystem
sets a flag to indicate that a non-VSS backup is in progress. The archive
backup flag as displayed by the piartool -as command will be set to 21.
Currently, all other subsystems ignore the PrepareBackup event.
Freeze Like a VSS freeze, each subsystem that is participating in the backup stops
writing data to its files. Also like a VSS freeze, all PI databases remain
readable after the freeze event.
On Windows, each subsystem duplicates its handles for the files that it has
open so that the Backup Subsystem can copy the files. On UNIX, the
Backup Subsystem can copy the open files without a duplicate handle.
There is one Freeze event per component.
Thaw The Frozen component resumes writing data to each of its files. The time
between Freeze and Thaw can be long, especially for large archive files that
are being copied. If all selected components have been backed up, then the
BackupComplete event follows the Thaw event. Otherwise, the Freeze
event follows the Thaw event to backup the next component. There is a
delay between archive components that are backed up to allow the queue
to be emptied.
After each component is successfully backed up, the last backup time is
updated for the files of that component. This is different than for a VSS
backup, where the last backup time is updated for every component during
the BackupComplete event. A summary of last backup times can be
displayed with the piartool -backup -identify -verbose command. The last
backup time for archive files are displayed by piartool -al command.
BackupComplete This event indicates that a backup has completed successfully. When the PI
Archive subsystem received this event, the output of piartool -as should
indicate that the archive backup flag has been reset to 0. No action is taken
by other subsystems when the BackupComplete event is received.
The syntax of the piartool -backup command for starting a non-VSS backup is
piartool -backup <path> [-component <comp>][-numarch <number>
[-cutoff <date>][-wait <sec>]
where <> indicates a required parameter and [] indicates an optional parameter.
Argument Description
<path> Path must be the complete drive letter and path to a directory with
sufficient space for the entire backup.
-numarch <number> The number of archives to backup. For example, "2" will backup the
primary archive and archive1, provided that the primary archive and
archive1 contain data. In no case will an empty archive be identified for
backup. The default number of archives for backup is 3, unless
otherwise specified by the Backup_NumArchives timeout parameter.
-cutoff <date> The cutoff date is specified in PI time format. For example, "*-10d"
restricts the backup to archives that contain data between 10 days prior
to current time and current time. The more restrictive of -numarch
<number> 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.
-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 a piartool -backup -
query.
Page 84
4.9 - Managing Backups with piartool
non-VSS backup. If <Arg1> begins with a hyphen (-), then <Arg1> is assumed to be a backup
command. The following backup commands are valid.
-identify [-numarch The identify command reports the list of files that PI will backup. If the -
<number>] [-cutoff verbose flag is specified, PI will report a list of files and components.
<date>] [-verbose] A component is a logical grouping of files. For example, all of the files 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 backup
command for non-VSS backups, which is described below.
The identify command creates a \pi\dat\pibackupfiles.bks file. This file is
used in the pibackup.bat backup script to specify the list of files to backup
using NTBackup. NTBackup is used by the backup script for performing
VSS backups on Windows 2003 Server.
Example:
piartool -backup -identify -verbose
-trace <level> Debug messages are written to the log file when the trace level is non-
zero. The higher the trace level, the more messages that are written. The
maximum number of messages is written with a trace level of 100.
Tracing should be off unless you are troubleshooting a problem 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 Network Manager
PI Backup Subsystem
PI Batch Subsystem Registers for backup if you are 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. The above subsystems that register for backup should
appear in the list of registered subsystems in the output of the piartool -backup -query
command.
After doing a backup, the query will show information about the last backup. The following
shows an example of a query that was done after a successful non-VSS backup.
e:PI\adm>piartool -backup -query
Backup in Progress: FALSE
Last Backup Start: 29-Jul-05 02:00:04
End: 29-Jul-05 02:01:11
Status: [0] Success
Last Backup Type: FULL, NON-VSS
Last Backup Event: BACKUPSHUTDOWN
Last Backup Event Time: 29-Jul-05 02:01:22
Page 86
4.10 - Timeout Parameters
The timeout parameters that are specifically related to backup operations are reproduced here
for convenience. For a full list of all timeout parameters, see PI Server Reference.
Page 88
4.11 - Troubleshooting Backups
The NT Event Log. From the Application Log, look for messages from “VSS”,
“COM+”, and “ntbackup” sources.
The NTBackup.exe log file (VSS Backups only). If there was a problem creating a
VSS shadow copy during a backup, the reason for the failure is logged at the
beginning of the NTBackup.exe log file.
If the “Run As” user for the “PI Server Backup” scheduled task is the same as your
account, then you can view the NTBackup log from the Tools > Report… menu of
NTBackup. Launch NTBackup from a DOS command prompt and choose to run in
advanced mode.
If the PI Server Backup scheduled task was run under the system account, you must
browse to the NTBackup.exe log file with Windows explorer to the following directory.
C:\Documents and Settings\Default User.WINDOWS\Local
Settings\Application Data\Microsoft\Windows NT\NTBackup\data
If the scheduled task is run under a user name other than the system account, then replace
Default User.Winodows with the specific user name to get the path to which the
NTBackup.exe log file is written.
4.11.2 VSSADMIN
Vssadmin.exe is the Volume Shadow Copy Service administrative command line tool. You
can use the tool to view the status of the VSS writers, VSS Providers, and VSS shadow
copies on the system.
Page 90
4.11 - Troubleshooting Backups
Page 92
Chapter 5. MANAGING INTERFACES
5.1 Introduction
This chapter is split into two sections. The first section covers basic principles of interface
operation. The second section describes the basic steps involved with installing, configuring,
and administering a typical interface.
There are several manuals in addition to this document that provide general information with
regard to interface configuration and management.
PI API Installation On Windows, this manual is installed into the pipc\bin directory by
Instructions the PI SDK installation kit. The manual provides several important
post-installation details for configuring the PI API and buffering.
UniInt End User Manual Most interfaces are based on the OSIsoft Universal Interface
(UniInt) and therefore share a common set of features. Certain
UniInt features may be described in more detail in the UniInt End
User Manual document than in the interface-specific
documentation. However, not all features that are described in
UniInt End User Manual are supported by all UniInt interfaces.
PI Interface Status Utility The PI Interface Status Utility is an interface that runs on the PI
Server node. The utility writes events such as “I/O Timeout” to PI
Points that have not received values for a configurable period of
time from a particular interface.
PI AutoPointSync User Some interfaces, such as the OPC Interface, support auto-point
Manual synchronization. PI AutoPointSync (PI APS) is a utility that
synchronizes the PI Server points for an interface with the tag
definitions on the interface’s data source.
For the most part, this section discusses general interface principles that apply to interfaces
running on Windows, UNIX, and VMS. If a particular topic in this section applies to a
particular operating system, then this is mentioned up front. For example, interfaces can only
use the PI Software Development Kit (PI-SDK) on Windows, but the PI-SDK is such a
fundamental part of the PI System that it is discussed under general principles.
Page 94
5.2 - General Interface Principles
When buffering is enabled, the data flows through the interface to the buffering service and
from there to the Snapshot Subsystem on the PI Server. On Windows and UNIX interface
nodes, data is buffered with the bufserv service, which must be installed and configured
separately from the interface. On VMS, data buffering comes built-in with the interface node.
The above diagram shows the buffering application sending data to only one PI Server node.
As of PI API version 1.6, buffering supports collecting data from one interface and
distributing the data to multiple PI Servers. On VMS Interface Nodes, buffering supports data
sends to one PI Server only.
Some interfaces do not require buffering because the data source itself is buffered. For
example, the Batch File Interface and the Event File interface do not require buffering. The
interface-specific documentation should be consulted to see if your interfaces require
buffering.
If the PI Server is not available for some reason (such as an upgrade on the Server) then the
data is stored in a file buffer on the Interface Node. The size of the file buffer is configurable
(up to nearly 2GB on Windows and UNIX). When the PI Server becomes available again, the
buffering application sends all the stored data from the buffer, in chronological order, back to
the PI Server. If you then look ProcessBook, for example, your data appears as a continuous
flow of data, with no gaps.
Page 96
5.3 - Basic Interface Node Configuration
parameters and some interface specific parameters. UniInt is constantly being upgraded with
new options and features.
The steps outlined in this section describe the basic steps for interface configuration. The
steps are provided in a logical sequence for you to follow. However, there is nothing
preventing you from doing the many of the steps in a different order than specified below.
This discussion applies to VMS, UNIX, and Windows interface nodes. However, the majority
of the details are provided for Windows and UNIX Interface Nodes. Differences between the
platforms are pointed out as necessary. Also, for the most part, the configuration steps apply
whether the interface is on the PI Server Node or on a remote node. Distinctions are made as
necessary.
These basic interface configuration steps can be summarized as follows.
• Install the PI-SDK and/or the PI API
• Connect to PI with apisnap.exe
• Connect with AboutPI-SDK.exe
• Configure PI Trusts for the Interface Node
• Install the Interface
• Set the Interface Node Time
• Connect with the Interface
• Configure Points for the Interface
• Configure Buffering
• Configure Interface For Automatic Startup
• Configure Site-Specific Startup Scripts
• Configure the PI3 PointSource Table
• Monitor Interface Performance
• Configure Auto Point Synchronization
• Configure the Interface Status Utility
Page 98
5.3 - Basic Interface Node Configuration
Option 2 provides slightly tighter security. Instead of configuring the above two trusts, set up
the following trust.
• One trust based on IP address, netmask, and fully-qualified host name
In Option 2 if the IP address or fully-qualified host name changes, the trust will fail, whereas
in Option 1, it will not fail.
Page 100
5.3 - Basic Interface Node Configuration
interfaces are in. Interfaces are configured to allow writing data to the PI Server, so physical
access to the machine allows any user who can log on to that machine to run PI applications
that could write data to the PI Server and a malevolent user could use an application name for
which a trust is already configured.
Part of the complexity arises when buffering is configured on the Interface Node because a PI
Trust must be configured for the buffering application as well as the interface. For Windows
and UNIX, the buffering application (bufserv.exe) has an application name of APIBE. For
VMS, the buffering application has an application name of EXCP plus a 4-digit process
identifier.
There is additional complexity for interfaces that connect with both the PI API and PI-SDK
because the PI API and PI-SDK pass different Application Names in their connection
credentials. For example, the OPC interface uses opciE for the API and opcint.exe for the
SDK. The application name for PI API interface connections can be determined by
examining connection messages in the PI Message Log on the server, whereas the PI-SDK
uses the actual file name of the executable.
If the interface-specific documentation does not give specific instructions for setting time,
time zone, and DST, these guidelines should typically result in the correct timestamps being
set to PI. Exceptions are noted in the documentation for each interface. The most common
exception is for Foxboro Interface nodes, which must have their time zone settings set to
GMT.
Caution: In all cases, the PI Server clock should be set to its correct local time, time
zone, and DST setting.
Parameter Description
/ps=x The /ps flag specifies the point source for the interface. x
required is not case sensitive and can be any single character. For
example, /ps=P and /ps=p are equivalent.
The point source that is assigned with the /ps flag
corresponds to the PointSource attribute of individual PI
Points. The interface will attempt to load only those PI
points with the appropriate point source.
Consult the PI3 PointSource table to make sure you are not
using a PointSource that is already configured for another
interface.
/id=x The /id flag is used to specify the interface identifier. For
sometimes required example,
/id=1
The interface identifier is a string that is no longer than 9
characters in length. UniInt concatenates this string to the
header that is used to identify error messages as belonging
to a particular interface.
Many interfaces also use the /id flag to identify a particular
interface copy number that corresponds to an integer value
that is assigned to one of the Location code point attributes,
most frequently Location1. For these interfaces, one should
use only numeric characters in the identifier.
/host=host:port The /host flag is used to specify the PI Home node. host
recommended parameter is the IP address of the PI Sever node or the domain name
of the PI Server node. port is the port number for TCP/IP
communication, which should always be specified as 5450
for communication to a PI 3 server.
Page 102
5.3 - Basic Interface Node Configuration
Parameter Description
Scan If the Scan attribute is set to OFF for a UniInt based interface, the
point will be removed from the interface. This can be useful when
troubleshooting the interface.
Page 104
5.3 - Basic Interface Node Configuration
The file can be edited with a text editor. Setting buffering=0 turns buffering off. Any
changes that are made to the pihome\dat\piclient.ini will only take effect when bufserv is
restarted.
The default and maximum size limit of buffer files is 2,000,000 KB (~2GB). If there is not
2GB of disk space available, then the buffer will grow as large as possible before failing. The
maximum size limit can be set to a value less than 2,000,000 KB with the maxfilesize
parameter in the piclient.ini file. For a full list of configuration options, refer to the PI API
Installation Instructions.
The following applies to buffering for PI API version 1.6 and greater on Windows and UNIX.
In PI API version 1.6 and greater, data that is sent via the PI API can be buffered to
multiple PI server Nodes. The PI Server Nodes for which buffering is enabled is
configured in the pihome\dat\piclient.ini file in the [BUFFEREDSERVERLIST]
section. In addition to the parent process, one buffer server process will be spawned
for each buffered server specified in the list. See PI API Installation Instructions for
more details.
The connection name for the interface (usually specified in the /host parameter) must
exactly match the buffer server name configured in the pihome\dat\piclient.ini file.
For example, in order for buffering to work for a UniInt-based interface, the
IPAddress or HostName specified by the /host command line parameter would need
to be identical to a PI Server listed in one of the entries specified in the
[BUFFEREDSERVERLIST] section in the pihome\dat\piclient.ini file. The
IPAddress and HostName are not interchangeable in this case, if the IPAddress is
used in the interface and the HostName in the pihome\dat\piclient.ini file, then
interface connection via the IPAddress would be unbuffered.
Bufserv now supports event distribution to multiple PI servers. This is sometimes
referred to as n-way buffering or buffering to replicated servers. Event distribution to
multiple PI servers consists of the taking data sent to one buffered server distributing
of the same event to multiple buffer servers. The list of PI servers to receive
distributed events is configured in the [REPLICATEDSERVERLIST] section in the
piclient.ini file. The distributed event is not manipulated in any way, which means
that the event does not have the point ID or the timestamp altered. Therefore, the
replicated PI servers must all have synchronized point databases. PI servers in the
[REPLICATEDSERVERLIST] section must also be in the
[BUFFEREDSERVERLIST] section.
The following applies to versions of the PI API prior to version 1.6.
Prior to PI API version 1.6, buffering could only be enabled for the default PI Server
node. The default PI-Server node is specified in the pihome\dat\pilogin.ini on
Windows and in the pihome\dat\piclient.ini node on UNIX.
The connection name for the interface (usually specified in the /host parameter) must
exactly match the name of the default PI-Server node. configured in the
pihome\dat\piclient.ini file.
The following applies to Windows only, but it applies to all version of the PI API.
Monitoring Buffering
To ensure that buffering is functioning properly, check the interface log each day. You can
also use the buffering utility, bufutil.exe, to check the buffering service. For example,
bufutil.exe can be used to list the number of events that are currently in the buffer. When
connected to the PI server, the number of unprocessed events should generally be zero, but
may show a finite number since events are streaming through the buffers.
For version 1.6 and greater of the PI API, when bufutil.exe is started, the currently selected
buffered server is listed. There is a menu option to change the selected server.
Page 106
5.3 - Basic Interface Node Configuration
On Windows the difference between pistart.bat and pisrvstart.bat is that the former is used to
start PI interactively and the latter is used to start PI as a service. To start your interface
interactively, add a line similar to the following to pisitestart.bat.
program files\pipc\interfaces\myinterface\myinterface.bat
To start your interface as a service, add a line similar to the following to pisrvsitestart.bat.
net start myinterface
Page 108
5.3 - Basic Interface Node Configuration
In order to save the Windows Performance Counter data to PI, you must configure the PI
Performance Monitor Interface, which is available as basic or full versions. The basic version
is installed on the PI Server Node by default. You can collect performance counter data with
the interface from local and remote interface nodes. For more information, see the PI
Performance Monitor Interface documentation.
The following performance counters are available for most UniInt-based interfaces that run as
a service.
Interface up-time The number of seconds since the interface has started. This counter is
(seconds) incremented once a second.
IO Rate The number of events per second received by the interface. If this
(events/second) counter is viewed from the NT performance monitor, one should
increase the update time of the performance monitor to the minimum
scan period for the interface. For example, say that the minimum
scanning period for the interface is 5 seconds (/f=5). One can set the
Scan Time Time in milliseconds to call developer function and to write values to
(milliseconds) PI. There is one “Scan Time” counter per scan class.
Scheduled Scans: Percentage of missed scans since starting the interface. If a scan
% Missed occurs more than 1 second after its scheduled time, the scan is
considered missed. There is one “Missed Scans” counter per scan
class.
Related counters:
Scheduled Scans: % Skipped
Scheduled Scans: Scans this interval
Scheduled Scans, Percentage of skipped scans since starting the interface. If a scan
% Skipped occurs 1 scan period or more after its scheduled time, then 1 or more
scans are considered skipped. There is one “Skipped Scans” counter
per scan class.
Related counters:
Scheduled Scans, % Missed
Scheduled Scans, Scans this interval
Scheduled Scans: The total number of scans in the current performance interval. This
Scans this interval total is the current sample size that is used to evaluate the % Missed
Scans and the % Skipped scans. The performance interval is 8 hours
by default, but this can be changed by the /perf command-line
argument. The minimum performance interval is 60 seconds (see the
/perf argument for more information). When the performance interval is
exceeded, the previous samples are discarded and the sampling starts
again from scratch.
Related counters:
Scheduled Scans, % Skipped
Scheduled Scans, % Missed
Log file message count Number of messages that have been written to the log file. Only
applies to the instance _Total.
Points edited in the Number of point edits that have occurred. Only applies to the instance
interface _Total.
Points added to the Number of point that have been added to the interface. Only applies to
interface the instance _Total
Points removed from Number of point that have been removed from the interface. Only
the interface applies to the instance _Total
Page 110
5.3 - Basic Interface Node Configuration
Page 112
5.3 - Basic Interface Node Configuration
from the interface to the PI Server. For example, stale data can occur under the following
scenarios.
The interface is running but the PI API node cannot send data to the PI Server.
The interface is not running and a system digital state was not written to indicate that
the interface has been shut down. This could happen if the interface crashes.
One PI Interface Status tag is configured per monitored interface, each tag monitors a
watchdog tag collecting data from the interface. If the watchdog tag’s value on the PI
server hasn’t updated after a user specified amount of time, the PI Interface Status
tag’s status changes to a bad digital state status.
If you decide to configure the PI Interface Status Utility, then the utility is always configured
to run on the PI server Node. For more information see the PI Interface Status Utility
documentation.
Typically, PI Server is used in production systems where secure, correct, and reliable
operation is required. For this reason, a number of security mechanisms are available to
protect against both willful and accidental tampering with the system. These include:
Physical Security
Network Security
Operating System Security
PI Server Security
Firewall—Control at the IP Address Level
User Security—User Name and Password—Control for Individuals
Groups—Control for Separate Groups of Workers
Database Security—User, Group, and Access Rights to PI Point, PI User, and PI
Digital State Databases.
Point Security—for Point Attributes and Point Data
Trust-Login Security
Once a user is logged in, access is granted until the user logs out. It is not unusual for the PI
Server computer to be left unattended while a user is logged in. For this reason, physical
access to the PI Server Home Node should be restricted. It is recommended that the PI Server
computer be located in a lockable, temperature-controlled computer room with an un-
interruptible power supply.
Limiting the use of a single computer solely for data archiving can further enhance security
and reliability. Thus, it is recommended for data collection to be distributed on one or more
PI API or PINet Nodes.
Even if physical access to the PI Server computer is limited, access is available over the
network. Network security is provided through several mechanisms. On TCP/IP, access to a
given node is controlled via the host table, domain name server, or DHCP. See your
networking documentation for details.
The network router may also be configured to restrict traffic on specified subnets.
Network setup and security is very important for satisfactory PI System operation. The details
of this are broad, diverse, and beyond the scope of this manual.
The PI Server files are protected by the hosting operating system security. On all platforms,
each executable, data file, and directory may independently be given read, write, and execute
access on a per-user or per-group basis.
The System Manager’s account is called “administrator” on Windows systems and “root” on
UNIX systems. Since the System Manager’s account is central to a secure system, it is
imperative that the account password be well chosen (to guard against password guessing),
periodically changed, and known only to a small group of trusted managers.
During installation, all the PI system files are created with the system’s default security, and
are owned by the installing user. This should be the System Manager.
The System Manager may change the ownership and the access rights to these files. This
might be done to assure that only selected users can have any access to the PI system. It is
mandatory to keep full access to the System Manager and to make sure that the PI services
have full access to the PI files. It is best to keep the file ownership as the System Manager. If
tighter security is required, limit the access for group and world, and allow full access to the
System Manager and to the Administrators group.
It is typical for a PI System Manager to implement restricted access to the Data Archive and
the Point Database beyond what is provided by physical, network, and operating system
security.
In using PI Server security features, the System Manager is responsible for:
Restricting access via the PI firewall
Creating PI users accounts and groups
Assigning users to groups
Assigning an owner and a group to all databases and setting the access rights. Each
database can have a different owner and a different group.
The default owner and group is piadmin. The default access is “o:rw g:r w:r.” See
the section on Database Security below.
Note: Membership in the piadmin group does not automatically give special
privileges. The piadmin user account does give unlimited access.
Page 116
6.5 - Firewall Security
Caution: Some operations are modifying local files and cannot be done remotely.
Specifically this applies to modifications of the timeout and firewall tables.
The first level of PI access security is a firewall maintained by the pinetmgr subsystem. The
firewall allows the PI System Manager to control access to the PI Data Archive at the IP
address level.
The pinetmgr process manages all connections to PI, including subsystem connections and
TCP/IP applications. pinetmgr uses the PI Firewall Database to screen access based on the IP
address.
The database is a list of IP addresses and/or IP address masks. Each entry is associated with
the ALLOW or DISALLOW keyword, and this specifies whether or not pinetmgr completes
the connection request.
piconfig is used to maintain the PI Firewall Database.
Note: Requests from the local host (that is, the same computer on which pinetmgr
is running on) are always allowed.
Host/Mask Value
192.168.168.* ALLOW
192.168.168.67 DISALLOW
Only hosts within the 192.168.168.0 subnet are allowed connections. 192.168.168.67 is not
allowed to connect; even though it matches the first host mask.
Page 118
6.5 - Firewall Security
Note: To disallow all network connection, make sure you have an entry with
“*.*.*.*”,Disallow, and all other entries are either deleted or set to Disallow.
Note: PIconfig loads the PIfirewall table in memory; all edits are to the in memory
image. Changes are written to disk when the new table is loaded or piconfig is
exited.
Database level security controls access to the various PI server databases such as PI Point and
PI Module Database. PI Server installation sets the owners of these tables to piadmin.
Therefore, only the piadmin account can initially change the settings. After installation,
system administrators can alter the security settings to grant other users modification and
access privileges.
Following a brief description of all the security tokens in the DBsecurity table:
6.6.1 PIDBSEC
Only piadmin can change this token, which allows other users to view/change the
DBsecurity table itself. The PIDBSEC token also controls programmatic access to the
timeout table.
Other users or groups may still be assigned modify privileges in the DBsecurity table but any
changes to this token must be done by piadmin.
6.6.2 PIARCADMIN
Controls access to archive management functions: Archive creation and registration. Archive
shifts. To create new archives or change their attributes the user needs write access to this
token.
Archive backup operations require read access to this token.
Page 120
6.6 - Database Security
6.6.3 PIARCDATA
Controls access to archive data that is not point specific. Access to archive events is
controlled by individual point security. Such general data includes the list of archives
(piartool -al) archive counters, archive activity grid and cache information (piartool -as,
piartool -aag, etc.)
PIartool -aw is also controlled by this token although it does access actual archive events.
6.6.4 PIBatch
Controls the PIbatch database.
6.6.5 PICampaign
Controls the PIcampaign database.
6.6.6 PIDS
Controls the Digital States table. To create or edit sets or states the user needs write access to
this token.
6.6.7 PIHeadingSets
Controls the PIheadingsets database.
6.6.8 PIModules
Controls the creation and modifications of modules in the MDB. Note that each module has
its individual ownership and security specifications. This token controls access to the
database as a whole.
6.6.9 PIPOINT
Control the Point database. As with the MDB, there is individual point security
specifications. This token also controls access to the Point Source table.
6.6.10 PITransferRecords
Controls the creation and modification of transfer records in the MDB.
6.6.11 PIUSER
This token controls several tables: PIusers, PIgroups, PIContext and PItrust.
Note: See examples of managing the DBsecurity table in the PIconfig utility chapter
Security for points is assigned on two separate levels. Point attributes (zero, span,
descriptor, etc.) have one access level and the point data values (Snapshot and Archive data)
have another. Thus, you can have different owners and different access for point attributes
than for point data.
Note: Changing point ownership or security access is best done separately from
other point editing operations. For example, change the span and the compression
deviation first, and then change the security or the ownership.
There is not any relationship necessarily between the point owner and the point group.
Note: The user piadmin is a special user. This account is the PI System super user.
It has full access to all databases and database records regardless of security
attribute settings. piadmin is the only user that has this level of privileges.
Page 122
6.7 - Point Security
Page 124
6.8 - User Security
@table pipoint
@mode edit
@modify ptaccess=o:rw g:rw w:rw
@modify dataaccess=o:rw g:rw w:rw
@select tag="*"
@endsection
@exit
As mentioned earlier, the PI Server has its own user identification and password security.
Client applications may obtain login credentials through a PITrust login, or by passing a user
name and password. A PITrust assigns a user to the login session based on a set of
credentials; this mechanism is discussed in the next section, Trust Login Security.
To log in to the PI Server from one of the PI client applications, such as PI ProcessBook or PI
DataLink, requires a PI user name and password or a valid PITrust. The user is also assigned
to one or more groups of users.
Note: The PI Server does support PI API based logins without supplying a user
name/password or a trust. This is the “default” user access that assigns world rights
to the connection. This feature may be disabled by adding the PITimeout table entry
“DefaultUserAccess” and setting the value 0. A non-zero value or no entry allows
default user access. If default user access is disabled no secure objects may be
accessed regardless of security attribute settings.
When a user accesses the PI Server, after the request passes the PI Firewall, the user ID and
password are used to determine what access to grant.
There are three types of user access: owner, group, and world. Owner access is typically read-
write privileges. Group access is often read-only. World access is by default, none.
Two user accounts are included in the installation of PI Server, piadmin and pidemo. The
piadmin user always has read/write access to all objects regardless of access settings. This is
similar to a super user account in UNIX. The pidemo user has read-only access to all objects.
Do not delete either account. You should establish passwords for both accounts. This does
not affect the trust login process.
PI groups are defined. Every user is a member of one or more groups. This determines their
access to the various PI databases and their individual elements.
Note: To add users to groups, use the User Database, NOT the Group Database.
Page 126
6.8 - User Security
When an application needs access to the PI Archive and does not have an explicit interactive
login, you can configure an automatic Trust Login, using piconfig. This login grants access
of an existing PI user as defined in the PI User Database, based on the current connection
attributes such as the IP address, the machine name or the Operating System user name. Trust
login work by comparing the connection credentials of the connecting application to the trust
records in the Trust Database. Human intervention is not required at the time of connection.
For example, interface processes must start, connect to PI Server, and achieve access rights
with sufficient privileges to write data to the Data Archive. To permit this access, a trust
record can be created in advance on the PI Server to allow the application to assume the
privileges of a valid PI user.
The Trust Database, which is maintained by the Base Subsystem, replaces the Proxy
Database used prior to PI version 3.3. The Trust Database maintains all the functionality of
the proxy mechanism while being more secure. It permits a unified login for PI API and PI-
SDK applications that is consistent with Windows security.
PI-SDK is limited to Windows clients. PI-SDK version 1.1 can use trust logins. Earlier
versions of the PI-SDK have no trust login support.
In the following sections, you will find:
A discussion of connection credentials
How to define trust records in the Trust Database
Evaluating the match between trust records and connection credentials
Examples
Page 128
6.9 - Trust Login Security
The three types of logins are discussed more fully in the following sections. Trust records are
discussed later, followed by examples.
PIUser req
Page 130
6.9 - Trust Login Security
Before you configure records in the Trust Database, set up the entries in the User Database.
For more information, see Adding a New PI User, page 127. When you establish a new trust
record, if the PIUser you include does not already exist in the User Database, the trust record
will be rejected.
Note: Trust record with only Trust name and PIUser are not allowed. Always include
at least one optional entry.
PI Server does not allow two trust records that differ only in PIUser, because this would
create ambiguous trust login results.
Using Piconfig
Piconfig is the only tool that can modify the Trust Database. The key value of the Trust
Database is Trust.
D:\PI\adm>piconfig
* (Ls - ) Piconfig> @tabl pitrust
* (Ls - PITRUST) Piconfig> @?atr
1 - Trust String D: C:
2 - NEWTrust String D: C:
3 - AppName String D: C:
4 - Domain String D: C:
5 - IPAddr String D: C:
6 - IPHost String D: C:
7 - Netmask String D: C:
8 - OSUser String D: C:
9 - PIUser String D: C:
Suppose you wish to create a trust record that permits a PI-SDK application named
piperfmon.exe to connect as a User called Perfmon. You could name the trust record
perfmondefault. Use the following commands to create the record above:
@table pitrust
@mode create
@istru trust, appname, piuser
perfmondefault, piperfmon.exe, perfmon
Additional information about each field is given in the following sections.
Trust
The Trust field is required. It is a record name that must be unique within the Trust Table.
Any alphanumeric combination is acceptable.
AppName
A blank value indicates the match is not required. Otherwise, a case-insensitive match is
required.
For a PI API application to match the AppName, the AppName must be specified as the 4-
character application name plus an “E” at the end.
For a PI-SDK application to match the AppName, the AppName must be specified as the
filename of the application executable with file extension and without the directory path.
Domain
Windows Domain name may be used only for trust logins for PI-SDK client applications
running on Windows operating systems. The domain must be the same for the PI Server and
the connecting application.
A blank value indicates the match is not required. Otherwise, a case-insensitive match is
required.
Note: The relationship between IPAddr and Netmask in the Trust Database is the
same as the relationship between Network Destination and Netmask in a TCP/IP
routing table. The class C (24 bit) subnet is just an example—any valid subnet and
IPAddr is supported. If you use this mechanism to allow access to all addresses in a
subnet, you must set the bits corresponding to your subnet to zero.
IPHost
IPHost (sometimes called Host name or machine) is an optional field that may be used for
either PI API or PI-SDK connections. It refers to the name of the connecting machine.
Trust lookups based on IPHost are case-insensitive.
OSIsoft recommends that you verify the IPHost name as discussed below.
For PI API connections, the IPHost name is retrieved by PI Server using the IP address of the
connecting client. The lookup generally requires access to a Domain Name Server (DNS). If
a DNS is not used, the client IPHost name must be defined in the hosts table of the PI Server.
To check this name, ping the client machine from the PI Server. For example, the DNS might
provide JoePC.osisoft.com.
For PI-SDK connections, the IPHost name comes from the information sent by the client to
the PI Server. This name is the short IPHost name. You can confirm this name by running
pidiag -host on the client. For example, the name might be JoePC.
Page 132
6.9 - Trust Login Security
OSUser
The OSUser (Operating system user) name field is used only for PI-SDK applications
running within a Windows NT or Windows 2000 Domain.
Leaving this field blank indicates a match is not required. Otherwise a case-insensitive match
is required.
Because Domain must be the same for both the PI Server and the connecting PI-SDK
application, it is recommended that you include Domain whenever you want to include
OSUser.
If this field contains a dollar sign ($), it represents any domain user. If the PIUser field in the
trust record is also $, then the OSUser name must match a name in the PIUser database.
If this field contains a dollar sign ($), and the PIUser field contains a specific PIUser, then
all domain users will be granted the access rights of that PI user.
5. Type in the Domain and a User Name and then a Password (twice) or select a User
Name from the dropdown list. Click OK. In the example below, the Domain is
“OSI” and the account User Name is piperfmon. The syntax is OSI\piperfmon.
PIUser
Required field. PIUser must be a valid user defined in the PI User Database (with one
exception, described under OSUser). This field specifies the PI Server user whose privileges
will be assigned to the incoming connection when the connection credentials match the
specifications in the trust record.
Although you can choose the piadmin account for PIUser, it is preferable to reserve the use
of piadmin for installation and management of the PI System.
6.9.3 Evaluating the Match Between Trust Records and Connection Credentials
When connection credentials are compared to the Trust Database, each trust record is
considered. If only one record matches exactly, that record will be used to grant login. If
more than one record contains matching fields, then the record that matches most closely will
be used.
If incoming PI API connection credentials do not match any trust record, the application is
granted the default access rights, which is equivalent to having world access to any system
object. Whether points can be accessed depends on the Point Security configured for each
point.
Page 134
6.9 - Trust Login Security
If incoming PI-SDK connection credentials do not match any trust record, then the default
user for that server as configured on the caller’s machine is tried with a blank password. If
that fails, the PI-SDK application is not connected.
103 IP address
103 IPHost
101 Subnet
For example, whenever the Base Subsystem is shutdown for backups, existing connections
are maintained, but no new PI API connections are accepted. Interfaces and PI API BufServ
will attempt reconnections, typically every sixty seconds. Once the Base Subsystem is
running again, new connections can occur.
Page 136
6.9 - Trust Login Security
6.9.7 Examples
The PI Server compares incoming connection credentials with every Trust Login record.
Each field in a trust record is compared to the corresponding credential field. Every field that
is not blank in the Trust Record must exactly match the passed credentials. Otherwise, the
authorization is not granted. When an authorization is refused for one trust record, the PI
Server continues to search the other records until it has exhausted the possibilities.
You can create explicit individual trust records for each interface or you can group them
according to subnet, host machine, or username. A group of interfaces can share the same
privileges, based on matching a name in the User Database.
As explained previously, if IPAddr and Netmask fields are blank, they appear as 0.0.0.0.
Trust APIIF1
Domain Domain
Netmask 0.0.0.0
OSUser OSUser
PIUser IFGroupA
Trust SDKIF1
Domain Domain
Netmask 0.0.0.0
OSUser OSUser
PIUser IFTypeB
Page 138
6.9 - Trust Login Security
Example 4. Any PI API Application from a Specific Remote Node with a Fixed
IP Address
The following example creates a trust record that would match any PI API application from a
remote PI API node or VMS-based PINet remote data collection node with a fixed IP
address.
The trust record would allow the interface from a data source to write to the PI Server, just as
the former Proxy Database did. Assume the entry in the User Database will be IFUser1.
@table pitrust
@mode create
@istru Trust,IPAddr,Netmask,PIUser
MyTrust1,206.79.198.12,255.255.255.255,IFUser1
@endsection
Trust NT/2000/XP
Netmask 0.0.0.0
PIUser IFTypeC
The set of credentials at the right is sent by a PI-SDK application on Windows. This example
has Domain OSI and User Suzanne logged on to machine Gerke at IPaddress
192.168.168.121 running an application called piperfmon.exe.
Note: If you specify either a domain or OSUser in the trust record, the PI Server
must be in the same domain as the connecting application.
In this case, the credentials match the information in the trust record, because only Domain
OSI was specified in the trust record. The application would be granted access to PI as the
user IFTypeC. For greater restriction, you might also specify the application name and/or
OSUser name or IP Addr.
Note: If you specify a domain or OSUser in the trust record, the PI Server must be in
the same domain as the connecting application.
Using this feature requires a Trust Record with OSUser set to “$” and PIUser set to “$”.
Other fields are optional. The operating system for the client application must be Windows.
This trust would not authorize any PI API application or any PI-SDK application on
Windows 98.
Trust MatchUserName
Page 140
6.9 - Trust Login Security
Netmask 0.0.0.0
PIUser $
In the example above, if the User Database contains a user named Perfmon, the trust will be
granted.
Whenever there is a record in the User Database that matches the entry in OSUser, the trust
is granted.
You could restrict the trust record further by specifying more fields, such as IPHost, subnet,
or AppName.
Trust Matchmachine
Netmask 0.0.0.0
PIUser OSI
In Row A, the trust IPAddr and the Trust Netmask are blank. The “ANDed” result is also
blank; these fields are ignored in the matching process.
In Row B, when you combine Trust Netmask with Machine IPAddr, you get a 0 in the last
field; this matches the Trust IPAddr. Use this when you want to authorize any PC on a
subnet. See Example 8. In Row C, the third field does not match (168, 175).
In Row D, the “ANDed” result of 240 and 178 is 176, and thus, matches the Trust IPAddr. In
Row E, the “ANDed” result process does not match. This type of Netmask restricts matching
to certain IP addresses on a network subnet.
Row F and G illustrate the situation described in Example 9. Using IPAddr and Netmask to
Specify a Particular Address.
Page 142
6.9 - Trust Login Security
above in Row F. Similarly, the results of the credential IPAddr and the Netmask in Row G is
not an exact match for the trust IPAddr and the trust is not authorized.
Trust Matchmachine
Netmask 255.255.255.255
PIUser OpsPC15
Trust SubnetC1
Netmask 255.255.255.0
PIUser SubnetC1User
Page 144
6.10 - Resolving Ambiguities
The PI Server weighting factor for the OSUser field is higher than the weight of the IPHost
field. Consequently, the connecting application would receive the trust login for User6.
Trust AddedFirst
AppName
Domain OSI
IPAddr 192.168.168.0
Netmask 255.255.255.0
IPHost
OSUser
PIUser UserA
Now suppose you add another trust record called NewNetmask and point to UserB like this:
Trust NewNetmask
AppName
Domain OSI
IPAddr 192.168.168.0
Netmask 255.255.255.240
IPHost
OSUser
PIUser UserB
The PI Server would accept the NewNetmask Trust Record because the two NetMask fields
are different.
Notice that the IPAddr in both records has “0” in the last field.
The first Netmask has a 24-bit Netmask, the second has a 28-bit Netmask. Unfortunately, any
match with NewNetmask would also match with AddedFirst.
There is no predictable rule as to which trust will be assigned if ambiguous Trust Records are
created in the database.
Page 146
Chapter 7. MOVING PI SERVERS
PI Servers are designed for platform independence. All the databases and tables are stored in
a format that allows you to move a Server to a different computer or a different location on
the same computer. The programs and scripts themselves are platform-specific so a proper
installation is needed for any host platform.
This chapter provides the information necessary to move a Windows- or UNIX-based PI
Server. To move a VMS-based PI Server, you must first migrate it to either Windows or
UNIX. Refer to the OSIsoft support Web site for details on migrating VMS Servers.
These instructions assume that the PI Server System that is being moved is release 3.2 or
greater. If your PI System is an earlier release, upgrade it before continuing.
7.1 Preparation
Before attempting to move a PI Server, ensure that the PI Server and all related processes
have been stopped. Make a backup copy of the entire PI Server and all of the archive files (if
they do not reside in the PI directory.) On UNIX hosts, back up the /etc/piparams.default file.
On Windows hosts, back up the Registry.
To move a PI Server onto a different computer, you install the PI Server software on the new
computer and then copy the databases, tables, and archives over to the new PI Server. This
section describes the steps for moving the PI Server and explains which files and directories
you need to copy to the new Server.
This section refers to the original PI Server as the source and to the new PI Server as the
target. The pihome directory is the top-level PI directory (C:\PI\ for example). These
instructions use the backslash (\) for path names, but the steps are the same for all platforms.
Before starting the procedure below determine if there are any tags with a Snapshot value
before the start time of the Primary Archive. Set the shutdown attribute to 0 for these tags.
When the target PI system is first started, setting shutdown to 0 for these points will prevent -
11043 errors because only the primary archive will be registered.
To move the PI Server:
1. Perform a new installation on the target (new) host using the same release and build
number as the source (original) host’s PI Server. Select the default archive sizes
during the installation, because you delete them anyway, in one of the following
steps. Ensure that the new PI Server is functional before you continue to the next
step.
2. Identify the Primary Archive on the source PI Server using the administrative utility
pidiag -ad or piartool -al or the Archive Manager plug-in in the PI System
Management Tools (SMT).
3. Stop both the source and target PI Servers.
4. Copy the entire pihome/dat directory from the source PI Server to the pihome/dat
directory of the target PI Server, excluding the following files:
• Pisubsys.cfg
• PISysID.dat (you can include PISysID.dat if you are moving the server to a
computer with the same host name and IP address as the original server.)
• Archive files
This overwrites most of the files in the target PI Server dat directory.
5. Copy the entire pihome/log directory from the source PI Server to the pihome/log
directory of the target PI Server.
6. Copy the pipeschd.bat file from the pihome\bin directory of source PI Server to the
pihome\bin directory of the target PI Server.
7. Delete the target PI Server’s archives and copy the source PI Server’s primary
archive to the desired location on the target PI Server.
8. On the target PI Server, update the archive location file (piarstat.dat) by running the
pidiag -ar utility. Specify the full path to the copied Primary Archive when
prompted.
9. Restart the new PI Server and verify that it is working correctly.
10. Move and register the remaining archive files. This should be done while the new PI
Server is running.
11. Move or install any platform or site specific interfaces or programs as needed.
12. Back up the new PI Server once it is stable.
Moving the install location of a PI Server is nearly identical to moving from one computer to
another. The procedures are identical except for the following steps:
1. Isolate your PI Server from the network. This will force buffering of data on the
interface nodes.
2. Run piartool -qs monitor until the Event Queue is empty.
3. Run piartool -al redirecting the output to a text file. This is a record of all registered
archives.
Page 148
7.3 - Same Computer
All PI Servers are identified by a ServerID. The Server ID is stored in the binary file
PI\dat\PISysID.dat. The ID is used to uniquely identify a PI Server; basically, it augments the
PI Server's host computer's name. For example, a PI Point may only be uniquely identified by
including all four of these parameters:
Server ID
Computer Name (the computer name is the handle as set in the Known Servers table)
Tag Name
Point ID
Originally the PI System ID was assigned at system installation with an algorithm the used
the computer name to generate a 32-bit integer. This approach could create ambiguous IDs—
two unique computer names could generate the same ID. PI Servers with 32-bit IDs must
continue to use these IDs otherwise client applications that reference the ID may not be able
to resolve resources.
PI Servers installed starting with version 3.3.?.? use GUIDs for the System ID. This ID is
assigned at PI Server installation and is guaranteed to be unique.
Note: The 32-bit ID is still generated on the PI Server for legacy purposes. For
example, PI API based applications may only support the 32-bit ID.
The Server ID is only an issue when you move or copy the PI Server to another computer.
There are three basic scenarios:
1. Moving to a new host computer and retiring the original computer as described in
Moving PI Servers on page 147. In this case the Server ID file is copied to the new
computer as part of the moving process. No other action is needed.
2. Copying the PI Server to a new machine where the copy may be accessed
simultaneously with the source PI Server. In this case, although the data may be
nearly indentical, the two PI Servers must be assigned unique ID values. Therefore,
the copied PI Server must have a Server ID different from the source PI Server. This
is kept unique by not overwriting the Server ID file on the destination server; that is,
keep the Server ID file that was created on initial PI Server installation on the
destination server. In this scenario, the two servers are unique: ProcessBook displays
that target the source PI Server will not resolve against the destination server.
3. Copying the PI Server to a new machine that will not be accessed simultaneously
with the source PI Server. This scenario is used when it is desirable to access the
destination PI Server with existing displays, etc., created against the source PI Server.
Client applications that attempt to access both machines will have problems: the PI-
SDK knows the server table will be ambiguous. Attempting to do this is not
supported and will result in confusion.
In summary:
Copy the source PI Sever ID file to the destination PI server if the source PI Server is
being retired.
Leave the destination PI Server ID file in place if the source and destination PI Server
may be accessed simultaneously.
Note: The existence of two PI Servers with the same ID is problematic. This
approach should only be used in special circumstances. Specifically, attempts to
access both servers from the same client machine will result in confusing problems.
Page 152
Chapter 9. MERGING TWO PI SERVERS
The offline archive utilities can be used to merge two PI Server Systems. A merge is used
when a PI Server System is to be retired and the data from the retired system is preserved in
an existing system. The basic steps and an example merger follow.
Transfer Points
Install all points from the retired system onto the destination system.
Cutover Interfaces
At this time, interfaces feeding data to the retired system should be stopped. If appropriate,
restart the interfaces pointing to the destination system. If the interfaces are restarted against
the destination system, check interface output for errors--address any problems before
proceeding.
On the retired system run pishutev to put shutdown events into the Snapshot. This will force
the Snapshot value into the Archive.
Page 154
9.1 - Server Merging - Procedures
The following example retires a small NT Intel PI System and merges it with an existing
HPUX PI System. Both systems consist of example points provided with installation. The
tags on the retired system were edited to create unique tags.
Here is the archive list and point list of each system before starting the merge:
Retired System
BA:Active.1
BA:CONC.1Retired
BA:LEVEL.1Retired
BA:PHASE.1Retired
BA:TEMP.1Retired
batchid-1Retired
CDEP158Retired
CDM158Retired
CDT158Retired
piba1
pipe:sine2Retired
pipe:sine2tRetired
pipe:sine3Retired
pipe:sine4Retired
pipe:sine5Retired
pipe:sineRetired
pitot1Retired
pitot2Retired
pitot3Retired
pitot4Retired
pitot5estRetired
pitot5rampRetired
pitot5Retired
pitot5runRetired
pitot6countRetired
pitot6timeNERetired
pitot6timeRetired
pitot_1Retired
pitot_avgRetired
pitot_maxRetired
pitot_minRetired
productid-1Retired
sin:h2Retired
sin:hourRetired
SINUSOIDRetired
SINUSOIDURetired
t_minRetired
t_state1Retired
Archive: D:\PI\dat\piarch.002
PIarcfilehead [$Workfile: piarfile.cxx $ $Revision: 21 $]:
Version: 4 Path: D:\PI\dat\piarch.002
State: 4 Type: 0 Write Flag: 1 Shift Flag: 1
Page 156
9.2 - Server Merge Procedure - Example
Destination System:
BA:ACTIVE.1
BA:CONC.1
BA:LEVEL.1
BA:PHASE.1
BA:TEMP.1
batchid-1
CDEP158
CDM158
CDT158
piba2
pipe:sine
pipe:sine2
pipe:sine2t
pipe:sine3
pipe:sine4
pipe:sine5
pitot1
pitot2
pitot3
pitot4
pitot5
pitot5est
pitot5ramp
pitot5run
pitot6count
pitot6time
pitot6timeNE
pitot_1
pitot_avg
pitot_max
pitot_min
productid-1
sin:h2
sin:hour
SINUSOID
SINUSOIDU
test1
test10
test11
test12
test13
test14
test15
test16
test17
test18
test19
test2
test20
test3
test4
test5
test6
test7
test8
test9
t_min
t_state1
Archive: /opt/PI/dat/piarch.001
PIarcfilehead [$Workfile: piarfile.cxx $ $Revision: 21
Version: 4 Path: /opt/PI/dat/piarch.001
State: 4 Type: 0 Write Flag: 1 Shift Flag: 1
Record Size: 1024 Count: 2048
Offsets: Primary: 59/512 Overflow: 2037/2048
Start Time: 2-Mar-98 12:21:11
End Time: Current Time
Backup Time: Never
Archive: /opt/PI/dat/piarch.002
PIarcfilehead [$Workfile: piarfile.cxx $ $Revision: 21
Version: 4 Path: /opt/PI/dat/piarch.002
State: 4 Type: 0 Write Flag: 1 Shift Flag: 1
Record Size: 1024 Count: 2048
Offsets: Primary: 1/512 Overflow: 2047/2048
Start Time: Current Time
End Time: Current Time
Backup Time: Never
Archive: /opt/PI/dat/piarch.003
Page 158
9.2 - Server Merge Procedure - Example
Page 160
9.2 - Server Merge Procedure - Example
26,26,pitot_avgRetired
27,27,pitot_maxRetired
28,28,pitot_minRetired
12,12,productid-1Retired
16,16,sin:h2Retired
14,14,sin:hourRetired
1,1,SINUSOIDRetired
2,2,SINUSOIDURetired
15,15,t_minRetired
17,17,t_state1Retired
The text file requires modification. The PI Batch tag, piba1, cannot be migrated and
therefore, must be removed. Here are the contents after the edit:
9,9,ba:active.1Retired
8,8,BA:CONC.1Retired
7,7,BA:LEVEL.1Retired
10,10,BA:PHASE.1Retired
6,6,BA:TEMP.1Retired
11,11,batchid-1Retired
5,5,CDEP158Retired
4,4,CDM158Retired
3,3,CDT158Retired
34,34,pipe:sine2Retired
35,35,pipe:sine2tRetired
36,36,pipe:sine3Retired
37,37,pipe:sine4Retired
38,38,pipe:sine5Retired
33,33,pipe:sineRetired
18,18,pitot1Retired
19,19,pitot2Retired
20,20,pitot3Retired
21,21,pitot4Retired
25,25,pitot5estRetired
24,24,pitot5rampRetired
22,22,pitot5Retired
23,23,pitot5runRetired
29,29,pitot6countRetired
31,31,pitot6timeNERetired
30,30,pitot6timeRetired
32,32,pitot_1Retired
26,26,pitot_avgRetired
27,27,pitot_maxRetired
28,28,pitot_minRetired
12,12,productid-1Retired
16,16,sin:h2Retired
14,14,sin:hourRetired
1,1,SINUSOIDRetired
2,2,SINUSOIDURetired
15,15,t_minRetired
17,17,t_state1Retired
Page 162
9.3 - Shut Down the Retired System
Reactor1Retired,XYZ3,Green,3-Mar-98 12:24:23,12:44:00
At this point we have piconfig text files of the point and batch databases and the ID
conversion text file. This is required to reproduce the point and batch configuration on the
destination system. Before shutting down the retired system, stop the interfaces and other data
sources, write shutdown events to all the points, and force a shift.
In this example, all interfaces are on the localhost rather than a remote node. On your system,
make sure any API node and PINet node interfaces are shut down. Also shut down
PI Totalizer, PI PE Scheduler, and PI Batch Subsystems.
Before forcing the shift, make sure an empty archive is available for the shift.
Here is the dialog from these steps:
D:\PI\adm>pisrvsitestop
D:\PI\adm>echo Stopping Site Specific PI System Services...
Stopping Site Specific PI System Services...
D:\PI\adm>..\interfaces\rmp_sk\rmp_sk -stop
Stopping service rmp_sk
rmp_sk Stopped Successfully.
D:\PI\adm>..\interfaces\random\random -stop
Stopping service random
.
random Stopped Successfully.
D:\PI\adm>net stop pibatch
The PI Batch Subsystem service is stopping....
The PI Batch Subsystem service was stopped successfully.
D:\PI\adm>net stop pitotal
The PI Totalizer service is stopping...
The PI Totalizer service was stopped successfully.
D:\PI\adm>net stop pipeschd
The PI Performance Equation Scheduler service is stopping..
The PI Performance Equation Scheduler service was stopped successfully.
D:\PI\adm>..\bin\pishutev -verbose
Shutdown input file: D:\PI\dat\shutdown.dat.
Shutdown events will be written for tag mask *
Point attributes:
shutdown, 1
Shutdown Events at 3-Mar-98 11:04:09 sent for 37 Points
Service Manager requested shutdown of pishutev
D:\PI\adm>piartool -fs
Attempting to force an archive shift...
An archive shift has been initiated on the server.
Completion time will vary from a few minutes to hours,
depending on the machine and archive size. During this
time the archive subsystem will be unavailable and the
PI System should not be stopped until the shift is
complete.
Page 164
9.3 - Shut Down the Retired System
Page 166
9.3 - Shut Down the Retired System
enough space for all used records in both archives being combined. If in doubt use dynamic
archives--they can always be moved into a fixed size archive later.
In the following dialogs, the ID conversion file is not required:
$ ../bin/piarchss -if /opt/PI/dat/piarch.001 -of
/opt/PI/dat/piarchcomb.001
PIarchss offline archive utility
Input file type: PI 3
Archive input file: /opt/PI/dat/piarch.001
Beginning first pass. Sorting input archive.
Archive indicated start time: 2-Mar-98 12:21:11
Archive indicated end time: 3-Mar-98 16:32:27
Archive indicated recordcount: 2048
Processing record 1 ...
Primary record load completed.
Records processed: 97
Records with data: 86
Empty records: 11
Records with errors: 0
Records out of time range: 0
Records with duplicate time range: 0
Overflow record load completed.
Records processed: 101
Records with data: 101
Empty records: 0
Records with errors: 0
Records out of time range: 0
Records with duplicate time range: 0
Begining Output pass. Output archive: /opt/PI/dat/piarchcomb.001
Processing record 1 ...
19260 Loaded in 1( 0 + 1 ) Seconds 19260 Event/Sec.
101476 Archive Total seconds - ratio: 101476
Service Manager requested shutdown of piarchss
Now combine the converted archive.
$ ../bin/piarchss -if /opt/PI/dat/piarchconv.002 -of
/opt/PI/dat/piarchcomb.001
PIarchss offline archive utility
Input file type: PI 3
Archive input file: /opt/PI/dat/piarchconv.002
Beginning first pass. Sorting input archive.
Archive indicated start time: 2-Mar-98 12:51:41
Archive indicated end time: 3-Mar-98 11:09:30
Archive indicated recordcount: 395
Processing record 1 ...
Primary record load completed.
Records processed: 97
Records with data: 26
Empty records: 71
Records with errors: 0
Records out of time range: 0
Page 168
9.3 - Shut Down the Retired System
$ piconfig
* (Ls - ) PIconfig>
* (Ls - ) PIconfig> @Input piarc.dif
* (Ls - PIARC) PIconfig> sinusoidRetired,2-mar-98,*,
*> sinusoidRetired,2-mar-98,*,
87.71619,GOOD,2-Mar-98 13:37:56
99.23527,GOOD,2-Mar-98 14:39:56
96.20524,GOOD,2-Mar-98 15:44:56
75.77717,GOOD,2-Mar-98 16:57:56
14.20552,GOOD,2-Mar-98 19:31:26
1.545739,GOOD,2-Mar-98 20:31:26
1.869217,GOOD,2-Mar-98 21:31:26
18.17325,GOOD,2-Mar-98 22:40:56
86.39859,GOOD,3-Mar-98 01:33:26
99.15742,GOOD,3-Mar-98 02:38:56
96.37012,GOOD,3-Mar-98 03:43:56
75.96362,GOOD,3-Mar-98 04:57:26
14.35799,GOOD,3-Mar-98 07:30:56
0.7647065,GOOD,3-Mar-98 08:39:56
3.794814,GOOD,3-Mar-98 09:44:56
24.22295,GOOD,3-Mar-98 10:57:56
Digital State,Shutdown,3-Mar-98 11:04:09
Digital State,Pt Created,3-Mar-98 14:29:48
98.3448,GOOD,3-Mar-98 14:30:26
98.2471,GOOD,3-Mar-98 15:30:26
82.16194,GOOD,3-Mar-98 16:39:56
79.05913,GOOD,3-Mar-98 16:48:56
End Repeat...
Take a good look at several points before proceeding.
The piconfig utility maintains and configures 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 can supply text files that contain commands and data.
Using piconfig, point information can be configured in a spreadsheet or database tool,
exported to a text file, and then applied to the Point Database.
The piconfig utility can also be used for troubleshooting. 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.
While piconfig is often used for building PI points, there are other utilities that can be
obtained from OSIsoft to make this task easier:
PI Tag Configurator, is an Excel spreadsheet add-in that can facilitate creating
many new tags and modifying the attributes of existing tags in the Pipoint Table.
The PI System Management Tools (PI SMT) includes a PI Point Builder Plug-in
which is useful for editing or creating a small number of tags. PI SMT is available
from the Download Center at the technical support web site, and documentation is
included in the online Help file.
The piconfig utility includes the features of the PIDIFF utility of OpenVMS PI Systems. It
also includes many more features, such as the ability to edit tables other than the Point
Database.
Conversion information for upgrading from PI2 to PI3 may be found on the OSIsoft Web
site.
Page 172
10.3 - Key Concepts for Using Piconfig
The tables PI_Gen, PISubsys, PISubsysStats, PIThread and DBsecurity all require a second
argument. This argument specifies the owner subsystem, or, for PI_Gen, the actual database
file.
Status Commands
The current setting of piconfig can be viewed using the status command.
Page 174
10.3 - Key Concepts for Using Piconfig
10 compressing BYTE D: 1 C: 1
11 creationdate TimeSta D: 2. C: 17-Nov-02 18:39:5
12 creator String D: C:
13 DataAccess String D: o:rw g:r w:r C: o:rw g:rw w:rw
14 DataGroup String D: piadmin C: piadmin
15 DataOwner String D: piadmin C: piadmin
16 descriptor String D: C: 12 Hour Sine Wave
17 DigitalSet String D: system C:
18 displaydigits BYTE D: -5 C: -5
19 engunits String D: C:
20 excdev Float32 D: 1. C: 1.
21 Excdevpercent Float32 D: 1 C: 1.
22 excmax Uint16 D: 600 C: 600
23 excmin Uint16 D: 0 C: 0
24 exdesc String D: C:
25 PointID Uint32 D: 0 C: 2009
26 pointsource String D: Lab C: R
27 pointtype String D: Float32 C: Float32
28 PtAccess String D: o:rw g:r w:r C: o:rw g:rw w:rw
29 PtClassName String D: base C: classic
30 PtGroup String D: piadmin C: piadmin
31 PtOwner String D: piadmin C: piadmin
32 Recno Int32 D: 1 C: 116
33 scan BYTE D: 1 C: 1
34 shutdown BYTE D: 1 C: 1
35 SourceTag String D: C:
36 span Float32 D: 100. C: 100.
37 step BYTE D: 0 C: 0
38 typicalvalue Float32 D: 50. C: 50.
39 zero Float32 D: 0. C: 0.
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.
10.3.5 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
Attributes
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 Pipoint 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
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.
Page 176
10.3 - Key Concepts for Using Piconfig
10.3.7 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
(Cv) Convert mode Convert input data from one format into another
Create or Edit
The character t (for true) may be specified with either create or edit mode. This combines the
create and edit modes such that existing records are modified as specified while non-existent
records are created as specified:
@mode create, t
@mode edit, t
The specified mode persists until the next mode command is issued.
Page 178
10.3 - Key Concepts for Using Piconfig
Check Only
The character c (for check) may be specified with either create or edit mode.
@mode create, c
@mode edit, c
In this mode points are validated and errors are reported but no changes are made to the point
database.
For all other tables this mode is identical with the normal edit or create mode.
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.
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
As shown above, the command is preceded by the command character (@) while the data are
not.
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, we describe the data structure by one or more lines specifying the attribute,
line number, starting position on the line (counting from 1), and field width. One or more
lines of data values that correspond to the given format follows. For example:
@istructure tag, 1, 1, 12
@istructure pointsource, 1, 14, 1
@istructure pointtype, 1, 19, 7
*
*234567890123456789
SINUSOID R FLOAT32
NEXTPOINT Lab FLOAT16
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. This example shows two input records.
Fixed format is the same as used in the OpenVMS PI System PIDIFF utility.
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
To select output attributes in keyword format, use the ostructure command. A single
attribute is specified on each line, as shown below:
Page 180
10.3 - Key Concepts for Using Piconfig
@ostructure tag
@ostructure pointsource
@ostructure pointtype
To output all attributes for the current table, issue the command:
@ostructure *
This works in both keyword and delimited formats.
10.3.10 Operators
The following comparison operators are available:
= 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.
10.3.11 Wildcards
Wildcards, * and ?, may be used in text fields. * matches all characters; ? matches a single
character.
10.3.13 Endsection
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
Page 182
10.3 - Key Concepts for Using Piconfig
sinusoid,86.71634,20-Nov-02 16:25:30
10.3.14 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 has the same effect.
Page 184
10.3 - Key Concepts for Using Piconfig
Redirection of Output
An alternative is to use standard UNIX or Windows I/O redirection from the command line:
$ piconfig < list.inp > list.out
Note: The PI_Gen tables are accessed only on the local machine. Even during a
remote session. This means that modifying PI_Gen tables must be done locally.
Attempting to modify these tables during a remote session will produce a warning
message.
Case Flag All (case- Sets case-sensitivity-ignore mode. Flag may be:
insensitive Data, Names, or All.
) This affects only tables accessed vie the PI_GEN
table – i.e. timeout and firewall.
Echo Flag Data Specifies if input commands and data are echoed
to the output file. Flag may be: Data, Commands,
All, Verbose or None.
Page 186
10.4 - Piconfig Commands and Tables
Exit None None Exits piconfig. (Quit and Bye work the same way.)
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.
Output File None Redirect output to file. If <file> not specified, the
output is directed back to standard output.
Ptclassname Classname Base Specifies the point class: base or classic. Pipoint
Table only.
STYP Structure Type Delimited Set structure type. Valid types are Delimited,
Keyword, and Fixed.
Page 188
10.4 - Piconfig Commands and Tables
Page 190
10.4 - Piconfig Commands and Tables
Note: Changing existing attribute sets – except for changing default values, should
be done with great care, in standalone mode.
Attribute Description
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
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.
Note: Editing existing Point Classes should be done with great care – in standalone
mode.
Page 192
10.4 - Piconfig Commands and Tables
Attribute Description
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.
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
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>
Attribute Description
Code The internal code, used for point source update signup
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,
Page 194
10.4 - Piconfig Commands and Tables
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,
Attribute Description
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.
PHASES
MODES
Page 196
10.4 - Piconfig Commands and Tables
Subsequent lines are treated as input until the next piconfig command is issued.
Note: For sets with more then 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 the following explanation about editing the system set.
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.
Page 198
10.4 - Piconfig Commands and Tables
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
Value
Page 200
10.4 - Piconfig Commands and Tables
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
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. Refer
to the PI Server Reference Guide, Appendix B, PI API Limitations, for more information.
String values cannot be used in Pisnap2 Table.
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 Reference Guide, Appendix A.
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
Page 202
10.4 - Piconfig Commands and Tables
Value
Annot Annotation
These attributes are the same as the Pisnap attributes. In addition there are some auxiliary
attributes that affect retrieval and editing:
Attribute Description
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.
Attribute Description
EVEN Interpolated events. The number of evenly spaced events returned between
starttime and endtime is given by the “Count” parameter.
Attribute Description
replaceSp Replace a specified value when multiple values at the same time
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.
Page 204
10.4 - Piconfig Commands and Tables
Note: 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.
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
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.
@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
Note, in order for the input file and it’s parameters to be taken as one parameter, it’s
important to have no spaces between parameters, as show in the example. Also, note that this
script will delete up to 10000 events, but it can be changed in the script.
Changing 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
* (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...
Page 206
10.4 - Piconfig Commands and Tables
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 will be turned off.
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.
Using Annotations
Since release 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 Definition
UNITNAME Defines the UNIT name. UNITNAME is the primary index of the Pibaunit
Table.
Cannot include the \ character.
Attribute Definition
DataAccess Security attribute, which specifies access to batches created on the 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.
Page 208
10.4 - Piconfig Commands and Tables
Attribute Description
Alias Unit name and attribute. The syntax for alias names in this table is:
\\unitname\attribute.
Attribute Description
BID Batch ID
ProdID Product ID
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. The
PI SDK contains the best documentation of the Module and Batch Databases.
Note: This table has no real primary key since there is only one record.
The set of attributes available on this table varies with the platform type. The table attributes
are:
IDNumber Unique ID of Computer UNIX (Not all versions of UNIX support this
attribute)
Page 210
10.4 - Piconfig Commands and Tables
Attribute Description
The bytes and messages received and sent refer to all inter-process communications.
Attribute Description
PIPath PI Server root directory on the server. This item is the same for all connections.
Page 212
10.4 - Piconfig Commands and Tables
Attribute Description
Page 214
10.4 - Piconfig Commands and Tables
Attribute Description
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 affect.
Attribute Description
Attribute Description
PoolName Every thread belongs to a thread-pool. We are mainly interested in the RPC
thread pool, which serves client calls to a subsystem.
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.
Attribute Description
Page 216
10.4 - Piconfig Commands and Tables
Attribute Description
Owner PI user name declared to be the owner of the table. Defaults to Piadmin.
The following examples shows how to access and modify the DBsecurity table.
C:\pi\adm>PIconfig table dbsecurity
* (Ls - DBSECURITY) PIconfig> @ostru dbname, owner,group,access
* (Ls - DBSECURITY) PIconfig> @ends
*PIconfig Err> Wild-card specs. missing, default to '*'.
PIARCADMIN,PIadmin,PIadmin,o:rw g:r w:r
PIARCDATA,PIadmin,PIadmin,o:rw g:r w:r
PIBatch,PIadmin,PIadmin,o:rw g:r w:r
PICampaign,PIadmin,PIadmin,o:rw g:r w:r
PIDBSEC,PIadmin,PIadmin,o:rw g:r w:r
PIDS,PIadmin,PIadmin,o:rw g:r w:r
PIHeadingSets,PIadmin,PIadmin,o:rw g:r w:r
PIModules,PIadmin,PIadmin,o:rw g:r w:r
PIPOINT,PIadmin,PIadmin,o:rw g:r w:r
pisnapss,PIadmin,PIadmin,o:rw g:r w:r
PITransferRecords,PIadmin,PIadmin,o:rw g:r w:r
PIUSER,PIadmin,PIadmin,o:rw g:r w:r
* (Ls - DBSECURITY) PIconfig> @mode ed,t
* (Ed - DBSECURITY) PIconfig> @istru dbname, owner,group,access
Modify the access to archive data and allow the operator group
* (Ed - DBSECURITY) PIconfig> PIARCDATA,PIadmin,operators,o:rw g:rw w:
*> PIARCDATA,PIadmin,operators,o:rw g:rw w:
Modify the access to base subsystem auditing and thread table
* (Ed - DBSECURITY) PIconfig> pibasess,PIadmin,operators,o:rw g:rw w:r
*> pibasess,PIadmin,operators,o:rw g:rw w:r
Modify the access to Update Manager thread table (no auditing in Update Manager)
* (Ed - DBSECURITY) PIconfig> piupdmgr,PIadmin,operators,o:rw g:rw w:r
*> piupdmgr,PIadmin,operators,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,PIadmin,o:rw g:r w:r
PIARCDATA,PIadmin,operators,o:rw g:rw w:
pibasess,PIadmin,operators,o:rw g:rw w:r
PIBatch,PIadmin,PIadmin,o:rw g:r w:r
PICampaign,PIadmin,PIadmin,o:rw g:r w:r
PIDBSEC,PIadmin,PIadmin,o:rw g:r w:r
PIDS,PIadmin,PIadmin,o:rw g:r w:r
PIHeadingSets,PIadmin,PIadmin,o:rw g:r w:r
PIModules,PIadmin,PIadmin,o:rw g:r w:r
Attribute Description
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
Page 218
10.4 - Piconfig Commands and Tables
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.
Note: Piconfig cannot access remotely the General Tables, only on the local
machine. However, the SMT tools have remote access.
PI Timeout Database
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 PI_GEN, pitimeout
The primary key is NAME. The table attributes are:
Attribute Description
PI Firewall Database
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 PI_GEN, pifirewall
The primary key is HOSTMASK. The table attributes are:
Attribute Description
Attribute Description
PI Proxy Database
As of release 3.3, the Proxy Database is no longer in use. During upgrade, its contents are
converted to PI Trust Database records.
10.5.1 Abbreviations
All piconfig commands can be abbreviated to four characters.
10.5.2 Case-sensitivity
In UNIX systems, program and file names are case-sensitive. This includes HP-UX, Digital
UNIX, Solaris, and AIX.
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 PIGEN tables may be changed for both of these
parameters by using the case command.
Page 220
10.5 - Helpful Hints
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. ?
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 '
Page 222
10.5 - Helpful Hints
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>
Page 224
Chapter 11. PI TROUBLESHOOTING AND REPAIR
Data passes through many steps on the way into and out of the Archive. The main strategy to
apply when troubleshooting is to determine which parts of the data path are malfunctioning,
and also, which parts are functioning correctly.
The first step is to isolate the problem to a single computer, either client or server, or to the
network. Follow the steps in the Troubleshooting Checklist to isolate the problem area. A
table of error messages is available in Appendix A: PI Messages on page 281.
The second step is to isolate the problem further to a particular client program or PI
subsystem. See Verifying PI Processes on page 228, and PI System Data Files on page 235,
for help with this.
The third step is to determine the exact cause of the problem. This will lead to a good
understanding of what is needed to fix the problem, repair the damage, and prevent a
recurrence. If needed, go to the Repairs section to repair data files such as Archives or Point
Database.
After working through the Troubleshooting Checklist, you may still not have resolved your
problem. In this case, you will want to call OSIsoft Technical Support for some help. The
technical support engineer will ask for some key information and also may ask to dial into
your system in order to do some hands on troubleshooting.
3. If there is a client problem, check security. Log in as the user piadmin. Check the
setup.log and pipc.log files in the c:\pipc\dat directory. Also check the server central
log file using the pigetmsg utility. A table of error messages is available in Appendix
A: PI Messages on page 281. If a trend in PI ProcessBook “flatlines,” see the section
on p. 255.
4. If there is a server problem, verify that all PI processes are running.
On Windows, type
net start
at the command prompt to list all processes running as Services.
On UNIX, use the piverify.sh utility.
PI Systems may take several minutes to start; loading the Point Database, Snapshot
and Archives takes most of the time. Utilities, such as piartool and piconfig, are not
fully operational until startup has completed.
5. Even if the process is listed as running, it may be in a state where it is not
communicating with pinetmgr. Verify that each PI process is communicating
properly by using the utilities listed in the Verifying PI Processes section below.
6. Try to get the exact error message. Error numbers may be translated to text using:
pidiag -e <errno>
There is a list of error messages in Appendix A: PI Messages on page 281.
7. Note the time of the problem and which subsystems have stopped running. Inspect
the message log using the pigetmsg utility, and the individual process log files. See
Appendix A: PI Messages on page 281.
8. On Windows, try running with pistart.bat, rather than as Services. There may be
additional status messages displayed in the command windows that may be helpful.
9. On HP-UX, verify SHLIB_PATH environment variable is defined correctly. It
should point to the directory /opt/PI/lib.
10. On Solaris, verify LD_LIBRARY_PATH environment variable is defined correctly.
It should point to the directory /opt/PI/lib.
11. If a subsystem crashes, there may be additional information that would be useful to
our developers.
Dr. Watson is the default just-in-time debugger for Windows systems. To install Dr.
Watson as default debugger, run the following command: drwtsn32.exe -i
Dr. Watson process traps unhandled process exceptions, also known as process
crashes. Dr. Watson captures the process state on crash and writes details to
drwtsn32.log. Optionally the entire process image is written to user.dmp. The
location of these files, as well as other Dr. Watson behavior, is configurable. Running
drwtsn32.exe interactively starts the configuration dialog. Recommended settings are
as follows:
• Log File Path: Default location is recommended.
Page 226
11.1 - Troubleshooting Checklist
• Crash Dump: Default name is recommended. Note this file may be over written;
after a process crash copy this file to a safe location.
Number of Instructions: 25
Number of errors to save: 25
Crash Dump Type: Full
Dump Symbol Table: Select
Dump All Thread Contexts: Select
Append to Existing Log File: Select
• Visual Notification: Do not select. Servers typically run unattended; therefore,
there is no user to see the notification.
Sound Notification: Do not select.
Create Crash Dump File: Select
On UNIX systems, look for a file called core in the PI\bin or PI\adm directories. This
is a binary file.
These files are useful only if they were created while running a debug version of PI.
Debug versions are not shipped by default. OSIsoft Technical Support will arrange
for a download of a debug build of PI if necessary.
12. If you have a pinetmgr problem, use:
netstat -a
to determine if there is any other process talking on port 5450. If so, this indicates
that at one time pinetmgr was communicating successfully.
You may need to use piconfig to adjust the timing parameters in the PITimeout
Table. Refer to the section called Tuning the PI System later in this chapter.
13. If you have an Archive or Snapshot problem, use the piartool -as and piartool -ss
utilities to gather more information about the data flow.
14. Next, try retrieving a Snapshot three different ways; the combined results of all three
tests helps pinpoint the source of the problem:
• apisnap from a remote node (uses API + network)
• apisnap from the home node (uses API)
• piconfig < pisnap.dif from the home node (uses internal communication)
To determine if the Archive has been corrupted, use piartool -aw.
15. If this is an Update Manager problem, use the pilistupd utility to see which processes
are signed up for events.
16. Determine if the problem is with all points on all interfaces or just a few points on
some interfaces.
17. Each PI System is distributed with a standard set of points including SINUSOID,
CDEP158, and CDM158. Each PI System is distributed with the Random and
RampSoak Simulators.
18. If this is an interface problem on a remote node, check security. There must be an
entry in the PI Trust Table for that node or specifically for that interface. Also check
the Firewall database. Check the individual interface log files as well as the central
log file using the pigetmsg utility. See Appendix A: PI Messages on page 281. If an
API interface is not able to connect, be sure that the PI Base Subsystem, PI Archive
Subsystem, and PI Snapshot Subsystem are running.
19. If an installation or upgrade problem, check the log file:
• UNIX - /tmp/piinstall.log
• Windows – PIPC\dat\SetupPIServer.log and PIPC\dat\PIServerMaster.log. See
the Getting Started manual for more information.
20. Check ownership and execute permissions on files that are giving trouble. Try
running as Root (UNIX) or Administrator (Windows). If the trouble goes away when
you run as the System Administrator, then you have a permission problem.
21. Read the PI release notes to determine if this is a known problem. Another source of
information is the OSIsoft Technical Support Web site, http//techsupport.osisoft.com,
which has technical notes posted.
If you haven’t solved the problem after working through this checklist, you will need to
phone or email OSIsoft Technical Support.
When PI is running, all of the PI processes should be running. When PI is stopped, all of the
PI processes should be stopped. The exception is pishutev, which only runs briefly at PI
startup.
Even if a process is listed as running, it may be in a state where it is not communicating with
pinetmgr. You can verify that each PI process is communicating properly by using the
utilities outlined in this subsection.
Page 228
11.2 - Verifying PI Processes
11.2.4 Pimsgss
All PI processes send messages to the PI Message Subsystem process, which writes messages
to the PI Message Log.
A simple way to test pimsgss is to run the pigetmsg utility. If pimsgss is not working
correctly, you will see the following:
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.
At PI System startup, there is a short time when pimsgss is not yet running. During this time,
and at any other time when pimsgss is not functioning, PI Systems running on Windows will
direct messages to the system event log. You can read this messages using the Event Viewer
application in the Administrative Tools group. When the pimsgss starts, it will merge
messages from the Windows Event Log into the PI Server Message Log.
The behavior on UNIX differs from the above. PI Systems running on UNIX will send
messages to the individual subsystem ASCII message logs in the PI/log directory when the
pimsgss is not available. These are:
Pinetmgr.log
Pibasess.log
Piarchss.log
Pibackup.log
Pisnapss.log
Piupdmgr.log
Random.log
Rmp_Sk.log
Pipeschd.log
Pibatch.log
Pishutev.log
PIsqlss.log
Pitotal.log
Pialarm.log
$ piconfig
* (Ls - ) piconfig> @table pipoint
*PIConfig Err> Table initialization error (PIPOINT
*@table pipoint
*[-10733] PINET: RPC Resolver is Off-Line
Page 230
11.2 - Verifying PI Processes
$ piartool -ss
Getsnaptablestatistics Failed: [-10733] PINET: RPC Resolver is Off-Line
$ pisnap.sh
PI API version 1.3.9.4
Attempting connection to localhost:5450
Enter tagname: sinusoid
Error: pisn_getsnapshotsx 3745992
Error: piar_getarcvaluex 3745992
Error: piar_getarcvaluesx 100
Tag = SINUSOID Point Number = 1 Type = Real-32
13 Hour Sine Wave!
Snapshot value
Value = ERROR ERROR
Status = ERROR
Latest archive value
Value = ERROR ERROR
Status = ERROR
Archive events are queued when piarchss is not operating correctly. The Event Queue count
is visible from B and piartool -qs.
11.2.9 Pishutev
This PI Subsystem inserts shutdown events into the PI Archive. Although it runs on PI start,
the shutdown events are time stamped with the previous shutdown time. PIShutev exits after
completion; therefore, this process will not be present on systems that have been running for
a while.
Page 232
11.3 - UNIX Process Quotas
pistop_ss.sh piarchss
pistart_ss.sh piarchss
Alternatively, the kill -2 command can be used to stop any PI process. The following
example shows how piarchss is stopped and restarted.
$ cd /export/PI/adm
$ ps -upiadmin
PID TTY TIME COMMAND
9313 ? 0:00 bufserv
834 ttyp4 2:16 random
9335 ? 0:00 iorates
794 ttyp4 0:22 pibasess
1507 ttys1 0:00 ps
760 ttyp4 10:31 PIsnapss
9330 ? 0:00 ioshmsrv
12578 ttyp4 0:00 ksh
726 ttyp4 0:05 pimsgss
777 ttyp4 4:03 piarchss
9320 ? 0:01 mqsrv
9325 ? 0:00 mqmgr
836 ttyp4 0:00 rmp_sk
743 ttyp4 0:09 piupdmgr
709 ttyp4 870:48 pinetmgr
838 ttyp4 0:02 pipeschd
1492 ttys1 0:00 ksh
$ kill -2 777
$ ../bin/piarchss &
[1] 1508
$
Some UNIX systems set process quotas unsuitable for servers. These quotas are used to keep
rogue applications, such as student projects, from monopolizing system resources such as
memory. In general, for systems dedicated as a server, most limits can be set to maximum.
Two key UNIX parameters should be reviewed.
Maximum data segment. This is the maximum private virtual memory size of a
process. The PI Archive and Base Subsystems are memory-intensive. The value of
this parameter should be set to 2 gigabytes, the maximum for 32-bit computers.
Max files/descriptors. This number is the maximum number of file handles or
descriptors a process may open; including TCP/IP connections. This value should be
set well above the maximum number of PI Server connections expected.
If your system has a large process count, you may see errors recorded in the PI Message Log
that report conditions such as no more processes and no more file handles. This can be caused
by a maximum process count limit that is too low. The quota may seem sufficient, but UNIX
often uses spawned processes for operations such as logging in, listing files, network
communications, or just leaving Window sessions open and idle.
Here are some observed behaviors that may be caused by insufficient process count:
Archive shift not completing
PI Archive Subsystem fails to resume normal operations after a shift
Subsystems lose connection with the PI Network Manager
Interfaces and clients lose connection with PI
UNIX commands return the error can’t fork, out of process quota
As a general rule of thumb, you can assume that PI might need as many as 70 processes at
once. Changing this quota varies with the UNIX platform. In all cases, you must log in as
root to do any system configuration.
Page 234
11.4 - PI Server Data Files
11.3.3 HP-UX
Run the sam utility. Select Kernel Configuration, then Configurable Parameters find
“maxuprc” (maximum number of user processes) and “nproc” (maximum number of
processes).
If you change either value, you will need to create a new kernel (sam will ask you about this
when you try to exit), and the new parameters will not take effect until you reboot.
The PI Server data files are located in the PI\dat directory. Archives are likely to be
elsewhere.
Pidiag -fb
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 either 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 owning subsystem
Piarcmem.dat
This binary file is the Snapshot Database used by pisnapss. It contains the most recent values
that have been sent to PI the Snapshot value for each point when PI is shut down. Pisnapss
periodically writes the latest Snapshot values to this file. This is a pifilebase-type database so
its validity can be checked and restored using pidiag -fb and pidiag -fbf.
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 How to
Repair the Archive Registry in this chapter.
Pidignam.dat
This binary file stores each unique digital state name. This is a pifilebase-type database so its
validity can be checked and restored using pidiag -fb and pidiag -fbf.
Pidigst.dat
This binary file stores the digital sets; it references names stored in the above file. This is a
pifilebase-type database so its validity can be checked and restored using pidiag -fb and
pidiag -fbf.
Page 236
11.4 - PI Server Data Files
Pimapevq.dat
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. PIArchss 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.
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. On 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.
Pimsgtxt.dat
This binary file stores formatted message strings used by the pigetmsg utility. This is a
pifilebase-type database so its validity can be checked and restored using pidiag -fb and
pidiag -fbf.
Pipoints.dat
This binary file stores the Point database. This is a pifilebase-type database so its validity can
be checked and restored using pidiag -fb and pidiag -fbf.
Piptalia.dat
This binary file contains alias information. This is a pifilebase-type database so its validity
can be checked and restored using pidiag -fb and pidiag -fbf.
Piptattr.dat
This binary file stores the point attributes. This is a pifilebase-type database so its validity
can be checked and restored using pidiag -fb and pidiag -fbf.
Piptclss.dat
This binary file stores the point classes. This is a pifilebase-type database so its validity can
be checked and restored using pidiag -fb and pidiag -fbf.
Piptunit.dat
This binary file stores the units. This is a pifilebase-type database so its validity can be
checked and restored using pidiag -fb and pidiag -fbf.
Piusr.dat
This file stores the user database. This is a pifilebase-type database so its validity can be
checked and restored using pidiag -fb and pidiag -fbf.
Piusrctx.dat
This file stores the context database. This is a pifilebase-type database so its validity can be
checked and restored using pidiag -fb and pidiag -fbf.
Piusrgrp.dat
This file stores the group database. This is a pifilebase-type database so its validity can be
checked and restored using pidiag -fb and pidiag -fbf.
Shutdown.dat
This text file contains directives that tell the PI Shutdown Interface which points should
receive shutdown events.
The pilistupd utility shows the size of the queues of events maintained by the Update
Manager. The utility requires that PI be running.
From a command prompt at the PI\adm directory, execute the utility pilistupd. This will
show a simple, although sometimes large, table summarizing the current state of update
signups. The table has five columns:
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 4 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
Page 238
11.5 - Identifying the Update Manager Issues: the pilistupd utility
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.
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 4096 events, even if more events
are in the queue. The Update Manager might limit individual consumers from
accumulating too many pending events. This is a display limitation and does imply
data loss.
-v Show version
-h Help
-t Show only the total number pending for this selection (specific cons./prod.)
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 always have a four-character name with “E” appended. 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.
Page 240
11.6 - Repairs
11.6 Repairs
Occasionally a PI data file may become corrupt due to a power outage or some other unusual
circumstance. There are utilities available to rebuild corrupted Archives, the Archive registry,
and the Point Database.
...First pass...
...Sorting input archive...
...Output pass...
676 Loaded in 2( 1 + 1 ) Seconds 338 Event/Sec.
739 Archive Total seconds - ratio: 369
In this example, piarch1.fix does not exist prior to the operation It is created as a fixed
Archive the same size as the input Archive because the -f 0 parameter was specified. After it
is created, it may be registered using the piartool -ar utility, and then data events may be
added to the Archive in the usual way.
If the input file were registered prior to the operation, it would be unregistered during the
operation. When the operation is complete, it may be registered again using the piartool -ar
utility.
Note: Every archive has a parallel annotation file, with an extension .ann. In PI
3.3.361.43, the annotation file will be identified incorrectly after renaming its
associated archive file. Since renaming is necessary in this case, unregister the
renamed file after initial registration, and re-register it.
Page 242
11.6 - Repairs
...First pass...
...Sorting input archive...
Failed to unregister input archive: [-10733] PINET: RPC Resolver is
Off-Line
Archive utility not running - or archive not registered
Continue processing...
...Output pass...
1084 Loaded in 2( 0 + 2 ) Seconds 542 Event/Sec.
1038 Archive Total seconds - ratio: 519
In this example, piarch.005.fix does not exist prior to the operation. It is created as a fixed
archive the same size as the input archive because the -f 0 parameter was specified. The end
time of the output archive is left open because the -et 0 parameter was specified.
10. If you are uncertain which of your backed up archives was the Primary Archive
(archive 0) at the time you last made a backup, use pidiag -ahd and examine the
archive dates. The primary should have the latest start date and no end date:
e:\pi\adm>pidiag -ahd ..\dat\piarch001.dat
11. You will need to do the following steps to reconstruct your Archive Manager data
file. After step 9 above make sure no PI process is running, and then execute the
following command from the PI\adm directory:
pidiag -ar
12. This utility will prompt you for the path and filename of the archive that you want to
assign as the Primary Archive. Enter the name (including the full path) of the Primary
Archive (archive 0) before the crash.
13. If the backup was performed using PI Version 3.4.370 or greater, then skip this step
because the snapshot is backed up as of 3.4.370 and there is no need to rename the
piarcmem.dat file. Otherwise, if the backup was performed with a version of PI prior
to 3.4.370, rename the PI\dat\piarcmem.dat to PI\dat\piarcmem.dat.old.
14. If the backup was performed using PI Version 3.4.370 or greater, then skip this step.
Otherwise, execute the Base Subsystem found in PI\bin to re-create the snapshot file:
pibasess -snapfix
15. Restart PI.
16. You will have to manually register all of the other archives that you want mounted.
pidiag -ar only registers the specified primary archive. Register the other archives in
their new locations:
piartool -ar <path_and_archive_file_name>
17. Use piartool -al and the client tools (PI ProcessBook and PI DataLink) to verify that
all the data has been recovered. If the data is intact, you are done. Run the clients
locally, since the PI Server should be isolated from the network. It is very important
to confirm correct PI Server recovery before exposing the PI System to buffered data.
Failing to do so may cause data loss.
18. Connect the PI Server to the network. Verify the PI Server is reachable from clients
on the network. Monitor all buffered interface nodes.
Page 244
11.6 - Repairs
Note: The PI Server will not allow registering archives with overlapping dates. If you
find overlapping dates, you can use pidiag -ahd to check the exact start and end
times.
Page 246
11.6 - Repairs
3. Run pidiag -ad and collect the dump of piarstat.dat, verifying the output.
4. If the results of the dump look good, attempt the automated recovery. Otherwise, use
the interactive one.
5. Restart PI.
6. Check the message log to see if all archives are loaded. If the interactive version is
used, only the Primary Archive will be loaded.
7. Register any remaining archives. If the interactive version was used, all other
archives will need to be registered.
-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.
Typically, this is not a problem because values are written in time order, but it is something to
consider when running pisnapss.exe with the -f option.
PIsnapss will continue to run normally after the fix-up. Control-C the interactive pisnapss
process and restart it as a service.
Note: Snapshots fixed by this procedure will remain set to NULL until a new
snapshot event is fixed. If a point does not receive events regularly the NULL
snapshot may cause problems with applications expecting normal values. A
Snapshot can always be written manually if needed.
ANY new event that is received for a point with a null snapshot will be absorbed into
the Snapshot, even if that event is an out of order event. If an out of order event is
received, then any data that was in the archive after the out of order Snapshot value
will not be visible.
Note: This procedure builds a new snapshot file with Shutdown events in it. The
Snapshot will be updated as the PI System receives new data. If you follow this
procedure when your snapshot file is normal, you will lose data. You should use this
command only when directed by OSIsoft Technical Support.
To do this, shut down pibasess, piarchss, and pisnapss. Rename the file
PI\dat\piarcmem.dat to another name. At a command prompt, change your current directory
to PI\bin and issue the command:
pibasess -snapfix
The PI Base Subsystem will write a message to the screen indicating that Snapshot recovery
mode has been specified and that recovery is in progress. When recovery is complete,
pibasess will write a final message to the screen and exit. You may then restart the PI
System.
This Snapshot recovery command can be run with the entire PI System shut down.
Page 248
11.6 - Repairs
1. If the erroneous future data can be discarded, start the Snapshot Subsystem with -f
flag as explained above.
2. Otherwise, keep the current file, and after the system startup, delete or edit individual
values using piconfig, as explained above.
3. Start the PI Server in base mode. This starts just the minimum required subsystems—
pinetmgr, pimsgss, piupdmgr, pisnapss, piarchss, and pibasess:
pisrvstart -base
4. Register all the old archive files but the previous primary (which contains future data)
pidiag -ahd can be used to examine unregistered archive file header.
5. Create a new primary archive using piartool -ac.
6. Specify a start-time before any events that might be coming in. Specify the end-time
as *. This instructs the Archive Subsystem to register the new archive as primary.
The start time specified must account for all buffered data. If in doubt set the start
time well before the time the problem was first encountered. Offline archive
processing can merge this data with existing archives if necessary.
7. Verify that the PI System is running correctly. Reconnect the Server to the network.
8. Reprocess the old Primary Archive using the offline tool to either filter out the future
data, or correct its time by the required difference.
9. Reprocess the Event Queue into an archive file and correct timestamps as required.
10. Optionally combine these two archive (old primary and result of Event Queue).
11. Register the corrected archive file.
Page 250
11.7 - Tuning the PI Server
Most PI Servers require no tuning and work well with default settings. In some instances, you
may need to make adjustments through the Timeout Database, discussed below.
Error Description
Note: This technique if only used for advanced troubleshooting. This should only be
done under the advice of OSI Technical Support.
Page 252
11.7 - Tuning the PI Server
write time-outs default to 50,000 microseconds, read and write retries default to 250. We
recommend increasing the time-outs in increments of approximately 25% until the errors
disappear. If the errors persist when the timeout values are over 150,000 microseconds, call
OSI Technical Support.
To increase the time-outs:
piconfig> @table pi_gen, pitimeout
piconfig> @mode edit
piconfig> @istructure name, value
piconfig> readtimeout,62500
piconfig> writetimeout,62500
piconfig> readretry,350
piconfig> writeretry,350
piconfig> @endsection
Note: PI Server installation sets all timeout values to well-tested initial values.
Changes to these values should be done under the advice of OSI Technical Support.
Very short timeout values may cause specific utilities to “spin” faster and thus use
more CPU. Before making changes based on CPU consumption, isolate the CPU to
the offending processes. Use available tools to analyze each process. For example,
if pisnapss is in a high CPU state, run piartool -ss and look at Snapshot read and
write rates because excessive rates may be the true source of CPU load.
Activity Grid
The Archive Subsystem provides a tool for monitoring the rate of read-access to the Archive.
This tool creates, over a finite time period, a grid of activity. The grid indicates which users
and points account for the most activity. This monitoring requires significant computing
resources and therefore is normally turned off. Start the activity grid to identify the users that
present the greatest load on the system and the points that are being queried most often. Once
the load on the system is identified, it is best to turn off the activity grid.
To start the activity grid:
Piartool -aag start
Page 254
11.8 - Solving Other Problems
ProcessBook is not retrieving the updates, the pending number continually grows and
does not shrink. This indicates whether the problem is with the PI Server or with the
client application.
5. If the pending updates are growing, try restarting the PI System. If this does not fix
the problem, contact OSIsoft Technical Support for additional assistance. If the
pending updates remain zero, go to step 4.
6. If all the points are signed up for updates, and refreshing the data from the archive
still yields a flatline trend, the problem could be in the archive, in the data source, or
in communications to the data source.
7. To determine if the Server is working, create a trend for a point with data generated
on the Server, such as “sinusoid,” which is generated by the Random Interface on the
Server.
8. If the trend for sinusoid appears correctly, it means that the archive is working and
communication between Server and client is working. Then go to step 6.
9. If the trend for sinusoid does not appear correctly, go to step 5.
10. Verify that the archive program is working (piartool -as, piartool -al)
11. Try inserting data into a test point (using piconfig or PI DataLink) and try trending
this point. If this is successful, go to step 6. If not, contact OSIsoft Technical Support
for additional assistance.
12. If all these tests are successful, the data source for the flatlined points may not be
working. Examine the Source-point attribute of the point to find out which interface
is feeding data for the point in question.
13. Check the PINetstats Table (See Chapter 1, PI System Management) to verify that the
interface program is running and connected to the Server.
14. Verify that the interface program is communicating with the external data source
(DCS system, RDB system, etc.). The documentation for the specific interface should
explain how to do this.
15. If the data source is running successfully, go to step 7.
16. Security may be preventing the process at some point. Examine the interface log files
and the PI Server log files (pigetmsg). Verify that both the data source interface and
PI ProcessBook have the correct access to the system. Examine all messages about
trusts granted or refused.
17. If the points in question have some access restrictions, there must be established trust
logins. The interface must have access as a PI user with WRITE access to the points.
PI ProcessBook must have read access to all these points.
If none of the above steps have resolved the problem, contact OSIsoft Technical Support for
additional assistance.
Page 256
11.9 - COM Connectors
Occasionally, errors are observed when OSI client applications fail to obtain process data. If
the errors are related to a foreign data historian, the applications generally receive error codes
in the range -11200 to -11209, instead of returning data. As usual, you can use the pidiag -e
utility to translate these errors to text.
The source of the error can be the Redirector or the specific COM Connector in use. Errors
may be logged in either the Windows Event Log or the PI Message Log. In general, the
distinction is this:
The Redirector logs information about its own activities to the Windows Event
Application Log. This includes startup, shutdown and loading of COM Connectors.
The PI Subsystems record errors in foreign system point lookup and data retrieval in
the PI System Message Log.
This section gives some guidelines for troubleshooting data retrieval problems from COM
Connectors. As new techniques become available, they will be posted on the OSI Technical
Support COM Connector page, available at http://techsupport.osisoft.com.
Once you have confirmed from this dialog that OSI PI Server Redirector is installed, continue
with the troubleshooting tips below until the problem is solved.
When you are able to clear the problem, you must restart the Redirector. This is done by
shutting down the Base, Snapshot, and Archive Subsystems and restarting them. There is no
method to restart the Redirector alone. The Redirector is not launched if there is no COM
Connector (a.k.a. mapped) points configured on the system.
Page 258
11.9 - COM Connectors
points. The point class may be of any name as long as it contains the above three point
attributes.
Note: This screenshot is from Windows 2000; the Windows Server Properties dialog
box is similar.
The default settings can become a problem if your system generates a log file of 512Mb of
messages within 7 days. You can avoid this problem by specifying a larger event log or by
choosing the Overwrite events as needed radio button.
Page 260
11.9 - COM Connectors
If the COM Connector cannot be loaded, a message to this effect will be logged.
Troubleshooting steps depend on how the COM Connector is implemented.
COM Connectors are of two different types: in-process or out-of-process. The manual for the
specific COM Connector you are using will tell you the Connector type.
Note: In-process COM objects are not visible to the dcomcnfg utility. One way of
seeing the DLLs loaded by the Redirector is to use the ListDLLs utility available
from the SysInternals Web site http://www.sysinternals.com.
Page 262
Chapter 12. FINDING AND FIXING PROBLEMS: THE PIDIAG
UTILITY
The pidiag utility is a collection of tools for diagnostics, information, and simple repairs. It is
designed to help the PI System Manager and OSI Software technical support in gathering
information about a PI System, troubleshooting and solving some common problems.
The following sections explain in detail the various tools included in pidiag. To invoke
pidiag:
pidiag -xxx
where xxx identifies one tool. Depending on the specific tool, some additional parameters
might follow. The optional parameters are summarized in the following table and described
in this section, unless otherwise noted in the table.
Option Description
-ara Auto recover archive manager data file. Described in this chapter.
-cid [ < ServerID > Create Server ID file optionally passing Server ID and PI API ID. The PI
< APIServerID> ] | API ID must be an integer. Server ID may be a GUID or an integer. -
upgrade option creates Server ID file for a system upgrade. Server ID
[-install] | [-upgrade] and PI API ID are set to integer based on host name. -install option
creates Server ID file for a new installation. Server ID is set to a UID.
The PI API ID is set to integer based on host name.
-dapi [hostname] Create and display PI API Server ID based on supplied host name.
Machine host name is used if host name is not supplied.
Option Description
-fbf 'path' <’outpath’> Recover (fix) file base data file index, optionally copying into a new file.
-qd [HeaderOnly| Dump header or all/filtered events from Event Queue file.
RecNo=n |PointId=<id>]
'path'
-rgs [-?] [-u] 'path' Register or unregister COM component by running .rgs script in 'path'.
{ReplaceableParameter
="Value"}
-uuid [count] Create and display "count" UIDs. 1 UID is created if "count" is not
supplied.
-v Version information.
-xa <path> Export audit records. This option is documented in Auditing the PI
[ -st <start> Server.
-et <end>
[-uid <unique id>]
[-xh <schema url>] ]
Page 264
12.1 - General Information
Tools that operate on files, such as compact and repair options should never be used with
open files. This means in general, that they should be used only when the system is down. If
in doubt, consult OSI technical support before using such tools. It is also advisable to make a
backup copy of the data file before compressing or repairing.
The following can be used to display a short help page with all the options.
pidiag -h
pidiag -?
C:\PI\adm>pidiag -t t+1h
21-Oct-02 01:00:00 PDT - Local: 908931600 UTC: 908956800
C:\PI\adm>pidiag -t "*"
21-Oct-02 20:00:10 PDT - Local: 909000010 UTC: 909025210
Page 266
12.2 - Time Utilities
If week is greater than 0, then day is the relative day (1-7) that the rule is applied. A day
of 1 represents Sunday, a day of 2 represents Monday, and so on. For example, a week of
1 and a day of 1 means the first Sunday in April. If week is -1, then day is an absolute
day (1-31).
Time is the time in seconds after midnight that the rule is applied.
Offset is the time in seconds to subtract from standard time to get the local time. For
example, daylight saving time is in effect, -3600 is subtracted from standard time.
Running pidiag -tz with the {time} argument will display the corresponding local and UTC
times in seconds and whether the passed time is in standard or daylight saving time. If the
time string is ambiguous, it is marked with an asterisk (*). Time strings are ambiguous if they
specify a time in the last hour of daylight savings time before the beginning of standard time.
In the northern hemisphere, this occurs in the fall. In the southern hemisphere, this occurs in
the spring.
C:\PI\adm>pidiag -tz "25-Oct-02 01:30:00"
TZ environment variable: <not set>
Standard Time Name: Pacific Standard Time (PST)
Daylight Time Name: Pacific Daylight Time (PDT)
StartYear, EndYear, Month, Week, Day, Time, Offset
1970, 2038, 4, 1, 1, 7200, -3600
1970, 2038, 10, 5, 1, 7200, 0
Passed Time: 25-Oct-02 01:30:00 PDT Local: 1035509400 UTC: 1035534600
If your time zone does not observe daylight savings time, the utility will indicate this.
C:\PI\adm> pidiag -tz
TZ environment variable: <not set>
Standard Time Name: US Mountain Standard Time (UMST)
Daylight Savings Time: <not observed>
The -dump option dumps the whole time zone table. This includes fall/spring changes in
every year. The dump is in comma-separated variable (CSV) format and can be loaded
directly into a spreadsheet, providing all time-change information for the local time zone.
The -dump option can be combined with -brief. The output with this option includes the
year and spring and fall time changes, each marked with “D” or “S” to denote daylight or
standard time.
The -check option generates no output at all, unless the time zone settings on your system
are invalid. The utility is used this way in the installation script on UNIX systems.
PI now supports the loading of a time zone information table from a binary file called
PI\dat\localhost.tz. If this file is present and valid, it is loaded and used for all time
translations. The table can be constructed as follows:
pidiag -tz -dump -brief > myzone.txt
The record of the resulting text file contains year, spring time change, and fall time change.
Edit the file to reflect the actual change times for your time zone. The file need not contain a
record for every supported year; years that are not specified use the operating system
generated rule. To install the new file, issue the command:
pidiag -tz -if myzone.txt -of test.tz
You can check the validity of test.tz by using pidiag to read it again, using the -if command.
pidiag assumes that any file ending in .tz is a binary file; all others are assumed to be text.
The -if command can be combined with any other. For example, to test the date 31-oct-02
01:30 using the new table, issue the command:
pidiag -tz "31-oct-02 01:30" -if test.tz
To dump the contents of a binary file to text, issue the command:
pidiag -tz -if test.tz -dump > test.txt
If the new timezone information table correctly represents the time transitions, copy the
binary file to PI\dat\localhost.tz and restart PI. Doing this does not affect the timestamps of
data already stored by PI, since these timestamps are stored as UTC. It affects only the
translation of these stored times to local times.
The timezone information now stores additional information such as the names of the
applications that created or modified it, and the first time the table was put into service. This
in-service time will be set on first system startup only if it was loaded from
PI\dat\localhost.tz. To see this additional information, issue the command:
pidiag -tz -full
Note: On UNIX systems, this feature can be used to determine whether or not the
operating system recognizes your passed TZ string as valid. Displayed transition
Page 268
12.3 - File-base Utilities
times, however, tend to reflect your system’s current time zone settings. Changing a
UNIX system’s time zone settings requires platform-specific techniques. You should
reboot your UNIX system after changing its time zone settings.
Most of the PI System internal databases are stored as index files with specific internal
organization. We call this structure file-base. The following tools are provided for diagnostics
and repair of such database files. More information is available in PI Server Data Files in the
chapter PI Troubleshooting and Repair.
Caution: Do not use Compact or Recover tools on open files while the system is
running!
Page 270
12.4 - Archive Management
This option creates a new archive manager data file using the data in the existing data file. It
can be used if the index in the current file is corrupted.
This option creates a new archive manager data file. It prompts the user for the full path of
the Primary Archive file. Upon restarting PI, this file will be the only archive registered.
This option is useful when moving a PI Server to another machine, or when running the same
point configuration with different sets of archives.
If the archive manager file is corrupted, try first the -ara option. If that does not help, use -ar
option. More information on using the -ar and -ara options is provided in How to Repair the
Archive Registry in the chapter PI Troubleshooting and Repair.
Note: The command pidiag -ara can be also used to downgrade the format of the
archive registry from 3.4.370 to earlier versions of the PI Archive.
For examples on using the -ahd option, see Restoring a Complete Server from Backup,
Restoring Archive Files from Backup, or Recovering from Unintended Change to System
Time in the chapter PI Troubleshooting and Repair.
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 will return an
access error.
Page 272
12.4 - Archive Management
Looking at archive statistics and in order to maintain best performance, points should not
have more than one or two index records on average. If this is not the case for many points,
compression parameters should be reviewed for these points or the archive files should be
made smaller. In the above example, points 4 and 17 (recnos 4 and 11 respectively) clearly
have an excessive number of index records.
The archive check command will 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, etc) or software bugs. In the case this happens, the offline archive
utility can be used to reprocess the corrupted archive file, recover the data and fix all issues.
For more information, see Using the Offline Archive Utility (piarchss) on page 40.
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 pidiag -ahd above) 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
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%
[...]
3.3 5
3.4.363/364 6
3.4.370 7
Note: PIdiag -adg accepts wildcard characters in the “path” argument (example:
“D:\PI\dat\piarch.*”). This allows performing easy downgrade of many archive files in
a single command.
Page 274
12.5 - Server ID Utilities
As of PI 3.3 SR1, the Server ID of the PI Server is stored in the PI\dat\PISysID.dat file. The
first time that any PI-SDK application connects to a PI Server from a given node, the PI-SDK
caches this server ID in the client’s local Registry. On subsequent connections, PI-SDK
applications compare the cached Server ID to the actual Server ID of the PI Server during the
Server.Open call to make sure that a connection is being made to the same PI Server.
Although the PISysID.dat file did not exist before PI 3.3 SR1, the PI Server still returned a
Server ID to PI-SDK applications. The PI Server used a hashing algorithm to determine the
Server ID, which took the name of the machine as input and generated a number as output.
This number was not a globally unique identifier (GUID), which meant that the hashing
algorithm could generate the same numeric identifier from two different machine names.
If PI 3.3 SR1 or greater is installed as a new system, the Server ID is generated as a GUID
and stored in the PISysID.dat file. If PI 3.3 SR1 or greater is installed as an upgrade from a
system that is less than 3.3 SR1, then the Server ID is generated using the old hashing
algorithm and stored in the in the PISysID.dat file.
There are three pidiag options, -dapi, -cid, and -did, that can be used to troubleshoot or to
generate a PISysID.dat file. The -dapi option echoes a Server ID to the standard output using
the old hashing algorithm. The usage is:
pidiag -dapi [hostname]
If hostname is not passed, then the host name of the machine is used in the hashing algorithm.
Here is some example output from the -dapi option.
pidiag -dapi MyServer Host: MyServer API Server ID: 6239
The -cid option generates a new PISysID.dat file. The usage is:
-cid [ < ServerID > < APIServerID> ] |install] | [-upgrade]
The optional APIServerID that can be passed on the command line is not used by any
application. If the optional ServerID is passed on the command line, simply pass the same
identifier for the APIServerID. The -install option causes the Server ID to be generated as a
GUID. The -upgrade option causes the Server ID to be generated using the old hashing
algorithm.
The -did option dumps the contents of the PISysID.dat file.
pidiag -did
Dumping file E:\PI\dat\PISysID.dat
1. MajorVersion: 3
2. MinorVersion: 3
3. MajorBuild: 361
4. MinorBuild: 98
5. ServerID: 1eb5cdbe-0666-43a5-900d-235344ee43ea
6. APIServerID: 91049
A new PISysID.dat file would need to be generated in the following scenario: Suppose that
you have a pre-SR1, PI 3.3 Server that you want to move to a different node. The new
machine will be given the same name as the old machine after the migration is complete.
Install PI 3.3 SR1 on the new node and copy the archive files from the old PI 3.3 system to
the new node. A PISysID.dat file on the new 3.3 SR1 Server will be generated with a GUID
as the Server ID because the 3.3 SR1 install was not an upgrade. It would be desirable to
create a PISysID.dat file with a Server ID that was generated with the old hashing algorithm
so that old PI-SDK applications will not complain when they are connecting to the new
server. This new file can be generated as follows.
pidiag -dapi MyServer Host: MyServer API Server ID: 6239
pidiag -cid 6239 6239
Alternatively, if the name of the new Server has already been changed to MyServer, the new
file can be generated as follows.
pidiag -cid -upgrade
Page 276
12.6 - Performance Counter Utilities (Windows Only)
Interface (the Basic version is included with the PI Server distribution) can easily be set up to
historize the value of these performance counters in the PI Archive, as well as the OS-
provided ones.
The following table shows the list of Performance Counter object names for the main PI
Subsystems:
Important Notes
These object names are case sensitive. PIdiag will return 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
12.7 Miscellaneous
Windows Only
Dr. Watson is the default just-in-time Windows debugger. 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.
Note: The PI Base Subsystem must be shut down for this command to succeed.
Also notice the path argument requires a trailing \ or / character.
Page 278
12.7 - Miscellaneous
d:\pi\adm>pidiag -host
Domain <OSI>
Machine <bilbo>
User <Bagins>
IP Addr <205.171.76.181>
Primary Domain Controller: <\\MASTERDC>
This option also tests the availability of the Domain Controller. This call should complete is 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 will result in poor PI System performance.
'TypeLib' = s '{8FC8B7AF-0C07-11D4-84C4-
00C04F6102DF}'
}
}
}
pidiag -rgs MYOBJECT.RGS MODULE=
"c:\Program Files\MyProgram\myobject.exe"
Page 280
APPENDIX A: PI 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.
Page 282
>> Snapshot records loaded, count: 13, found: 13, status: [0] Success
0 pisnapmgr 27-Oct-05 16:23:34
>> PIsnapmgr::loadsnaptables: loaded: C:\PI\dat\piarcmem.dat, status:
[0] Success
0 pisnapss 27-Oct-05 16:23:35
>> PI subsystem pisnapss is now running, version: PI 3.4.370.52
0 pisnapss 27-Oct-05 16:23:35
>> WorkingSet Parameters changed, Current settings: 0.195313, 1984MB,
Previous settings: 0.195313, 1.34766MB
0 pisnapss 27-Oct-05 16:23:35
>> Digital State table synchronized with Base Subsystem
0 pisnapss 27-Oct-05 16:23:35
>> Rpcservertablelist successfully registered to pinetmgr.
0 pinetmgr 27-Oct-05 16:23:35
>> Deleting connection: piartool(2568), Shutdown request received from
piartool(2568) (8), ID: 2
0 Connection Statistics 27-Oct-05 16:23:35
>> ID: 2; Duration: 0.03 min.; kbytes sent: 4.90; kbytes recv:
0.42; app: ; user: ; osuser: ; trust: ; ip address: ; ip host:
0 pinetmgr 27-Oct-05 16:23:35
>> Deleting connection: piartool(3772), Shutdown request received from
piartool(3772) (8), ID: 3
0 Connection Statistics 27-Oct-05 16:23:35
>> ID: 3; Duration: 0.03 min.; kbytes sent: 4.90; kbytes recv:
0.42; app: ; user: ; osuser: ; trust: ; ip address: ; ip host:
0 pinetmgr 27-Oct-05 16:23:36
>> Connection accepted: Process name: piarchss(356) ID: 11
0 pinetmgr 27-Oct-05 16:23:36
>> Connection accepted: Process name: piartool(2720) ID: 12
0 piarchss 27-Oct-05 16:23:36
>> Starting PI process piarchss.
0 pievqreader 27-Oct-05 16:23:37
>> Primary Queue successfully loaded (0 events)
0 piarcmgr 27-Oct-05 16:23:37
>> Primary archive file C:\PI\dat\piarch.001 loaded.
0 piarcmgr 27-Oct-05 16:23:37
>> Archive file C:\PI\dat\piarch.002 loaded.
0 piarcmgr 27-Oct-05 16:23:37
>> Archive file C:\PI\dat\piarch.003 loaded.
0 piarcmgr 27-Oct-05 16:23:37
>> Cache Manager: cache pool set to 2048 records, maximum unflushed
events per point is 256.
0 pinetmgr 27-Oct-05 16:23:37
>> Servertablelist received from: piarchss(356). 5 entries: piarss|1
piarss2|1 piarbatch|1 piarchss_subsysquery|1 piarchss_dbsecurity|1
0 piarchss 27-Oct-05 16:23:38
>> PI subsystem piarchss is now running, version: PI 3.4.370.52
0 piarchss 27-Oct-05 16:23:38
>> WorkingSet Parameters changed, Current settings: 0.195313, 1984MB,
Previous settings: 0.195313, 1.34766MB
0 piarchss 27-Oct-05 16:23:38
Page 284
>> Deleting connection: piartool(3920), Shutdown request received from
piartool(3920) (8), ID: 14
0 Connection Statistics 27-Oct-05 16:23:58
>> ID: 14; Duration: 0.03 min.; kbytes sent: 35.06; kbytes recv:
0.54; app: ; user: ; osuser: ; trust: ; ip address: ; ip host:
0 pinetmgr 27-Oct-05 16:23:58
>> Deleting connection: piartool(3544), Shutdown request received from
piartool(3544) (8), ID: 13
0 Connection Statistics 27-Oct-05 16:23:58
>> ID: 13; Duration: 0.03 min.; kbytes sent: 35.21; kbytes recv:
0.42; app: ; user: ; osuser: ; trust: ; ip address: ; ip host:
0 pinetmgr 27-Oct-05 16:23:58
>> Deleting connection: piartool(2720), Shutdown request received from
piartool(2720) (8), ID: 12
0 Connection Statistics 27-Oct-05 16:23:58
>> ID: 12; Duration: 0.03 min.; kbytes sent: 26.59; kbytes recv:
0.54; app: ; user: ; osuser: ; trust: ; ip address: ; ip host:
0 pinetmgr 27-Oct-05 16:23:58
>> Connection accepted: Process name: pishutev(2540) ID: 20
0 pishutev 27-Oct-05 16:23:58
>> Starting PI process pishutev.
0 pishutev 27-Oct-05 16:24:00
>> PI subsystem pishutev is now running, version: PI 3.4.370.52
0 pishutev 27-Oct-05 16:24:00
>> WorkingSet Parameters changed, Current settings: 0.195313, 10MB,
Previous settings: 0.195313, 1.34766MB
0 pishutev 27-Oct-05 16:24:00
>> Shutdown input file: C:\PI\dat\shutdown.dat.
0 pishutev 27-Oct-05 16:24:00
>> Shutdown events will be written for tag mask *
Point attributes:
shutdown, 1
0 pinetmgr 27-Oct-05 16:24:01
>> Connection accepted: Process name: piartool(3780) ID: 21
0 pinetmgr 27-Oct-05 16:24:03
>> Connection accepted: Process name: pisqlss(3388) ID: 22
0 pisqlss 27-Oct-05 16:24:03
>> Starting PI process pisqlss.
0 pinetmgr 27-Oct-05 16:24:05
>> Servertablelist received from: pisqlss(3388). 3 entries: pisqlss|1
pisqlss_subsysquery|1 pisqlss_dbsecurity|1
0 pinetmgr 27-Oct-05 16:24:05
>> Connection accepted: Process name: piartool(2748) ID: 23
0 pisqlss 27-Oct-05 16:24:06
>> PI subsystem pisqlss is now running, version: PI 3.4.370.52
0 pisqlss 27-Oct-05 16:24:06
>> WorkingSet Parameters changed, Current settings: 0.195313, 10MB,
Previous settings: 0.195313, 1.34766MB
0 pisqlss 27-Oct-05 16:24:06
>> Rpcservertablelist successfully registered to pinetmgr.
0 pinetmgr 27-Oct-05 16:24:08
Page 286
0 pinetmgr 27-Oct-05 16:24:20
>> Deleting connection: piartool(2748), Shutdown request received from
piartool(2748) (8), ID: 23
0 Connection Statistics 27-Oct-05 16:24:20
>> ID: 23; Duration: 0.05 min.; kbytes sent: 38.44; kbytes recv:
0.54; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host:
0 pinetmgr 27-Oct-05 16:24:20
>> Servertablelist received from: pialarm(3300). 3 entries: pialarm|1
pialarm_subsysquery|1 pialarm_dbsecurity|1
0 pinetmgr 27-Oct-05 16:24:20
>> Deleting connection: piartool(3780), Shutdown request received from
piartool(3780) (8), ID: 21
0 Connection Statistics 27-Oct-05 16:24:20
>> ID: 21; Duration: 0.05 min.; kbytes sent: 35.06; kbytes recv:
0.55; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host:
0 pinetmgr 27-Oct-05 16:24:20
>> Connection accepted: Process name: piartool(2592) ID: 29
0 pialarm 27-Oct-05 16:24:21
>> PI subsystem pialarm is now running, version: PI 3.4.370.52
0 pialarm 27-Oct-05 16:24:21
>> WorkingSet Parameters changed, Current settings: 0.195313, 10MB,
Previous settings: 0.195313, 1.34766MB
0 pialarm 27-Oct-05 16:24:21
>> Initializing alarms.
0 pialarm 27-Oct-05 16:24:21
>> Registered to update manager as a consumer
0 pialarm 27-Oct-05 16:24:21
>> Registered for point updates.
0 pialarm 27-Oct-05 16:24:21
>> Initialize group tags (pointsource G )
0 pialarm 27-Oct-05 16:24:21
>> 0 alarm group tags. 0 alarm groups.
0 pialarm 27-Oct-05 16:24:21
>> Restarting from save file C:\PI\dat\pilastalarm.dat
0 pialarm 27-Oct-05 16:24:21
>> 0 alarm tags.
0 pialarm 27-Oct-05 16:24:21
>> Initialize SQC alarm tags (pointsource Q )
0 pialarm 27-Oct-05 16:24:21
>> 0 sqc alarm tags.
0 pialarm 27-Oct-05 16:24:21
>> Rpcservertablelist successfully registered to pinetmgr.
0 pinetmgr 27-Oct-05 16:24:23
>> PInet accepted TCP/IP connection, cnxn ID 30 Hostname:
samson.osisoft.com, 127.0.0.1:1104
0 pinetmgr 27-Oct-05 16:24:23
>> New Pinet 1 connection: PipeE Protocol: 00010008
0 pinetmgr 27-Oct-05 16:24:23
>> New Pinet 1 connection: PipeE Successful Trust-Relation login:
samson.osisoft.com|127.0.0.1|PipeE piadmin.
0 pinetmgr 27-Oct-05 16:24:23
Page 288
>> Deleting connection: piartool(1152), Shutdown request received from
piartool(1152) (8), ID: 27
0 Connection Statistics 27-Oct-05 16:24:32
>> ID: 27; Duration: 0.03 min.; kbytes sent: 39.83; kbytes recv:
0.55; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host:
0 pinetmgr 27-Oct-05 16:24:32
>> Deleting connection: piartool(3256), Shutdown request received from
piartool(3256) (8), ID: 25
0 Connection Statistics 27-Oct-05 16:24:32
>> ID: 25; Duration: 0.03 min.; kbytes sent: 39.83; kbytes recv:
0.55; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host:
0 pinetmgr 27-Oct-05 16:24:38
>> Connection accepted: Process name: piartool(3348) ID: 35
0 pinetmgr 27-Oct-05 16:24:40
>> Connection accepted: Process name: piartool(1240) ID: 36
0 piafserver.exe 27-Oct-05 16:24:43
>> Loading SubSystems from 'C:\Program Files\PIPC\PIAF\SubSystems':
0 pinetmgr 27-Oct-05 16:24:43
>> Connection accepted: Process name: piafserver.exe(3140) ID: 37
0 pinetmgr 27-Oct-05 16:24:44
>> Deleting connection: piartool(2504), Shutdown request received from
piartool(2504) (8), ID: 34
0 Connection Statistics 27-Oct-05 16:24:44
>> ID: 34; Duration: 0.03 min.; kbytes sent: 46.71; kbytes recv:
0.55; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host:
0 pinetmgr 27-Oct-05 16:24:44
>> Deleting connection: piartool(2592), Shutdown request received from
piartool(2592) (8), ID: 29
0 Connection Statistics 27-Oct-05 16:24:44
>> ID: 29; Duration: 0.03 min.; kbytes sent: 41.19; kbytes recv:
0.55; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host:
0 pinetmgr 27-Oct-05 16:24:44
>> Deleting connection: piartool(2628), Shutdown request received from
piartool(2628) (8), ID: 32
0 Connection Statistics 27-Oct-05 16:24:44
>> ID: 32; Duration: 0.03 min.; kbytes sent: 42.55; kbytes recv:
0.55; app: piartool; user: ; osuser: ; trust: ; ip address: ; ip host:
0 pinetmgr 27-Oct-05 16:24:52
>> PInet accepted TCP/IP connection, cnxn ID 38 Hostname:
samson.osisoft.com, 127.0.0.1:1105
0 pinetmgr 27-Oct-05 16:24:52
>> New Pinet 1 connection: RmpSE Protocol: 00010008
0 pinetmgr 27-Oct-05 16:24:52
>> New Pinet 1 connection: RmpSE Successful Trust-Relation login:
samson.osisoft.com|127.0.0.1|RmpSE piadmin.
0 pinetmgr 27-Oct-05 16:24:52
>> PInet accepted TCP/IP connection, cnxn ID 39 Hostname:
samson.osisoft.com, 127.0.0.1:1106
0 pinetmgr 27-Oct-05 16:24:52
>> New Pinet 1 connection: RandE Protocol: 00010008
0 pinetmgr 27-Oct-05 16:24:52
Page 290
>> PInet accepted TCP/IP connection, cnxn ID 44 Hostname:
samson.osisoft.int, 127.0.0.1:1209
PI API-based clients will have a message similar to the following. The client publishes its
name and protocol. The name is a five-character string. The first four letters give the
application name or login name; the fifth character is always E. In this example, the client
name is snapE:
0 pinetmgr 27-Oct-05 17:23:14
>> New Pinet 1 connection: snapE Protocol: 00010008
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:
0 pinetmgr 27-Oct-05 17:23:14
>> New Pinet 1 connection: snapE Successful Trust-Relation login:
samson.osisoft.int|127.0.0.1|snapE piadmin.
If a match is not found, the message is:
0 pinetmgr 27-Oct-05 17:28:14
>> New Pinet 1 connection: snapE No Trust established for:
figaro.osisoft.com|24.20.166.163|snapE using default login.
A default login means that the connection is a member of the world as defined by the security
string associated with PI Server internals such as the point database and archived data. See
Chapter 1, System Management, for a description of the PI Server security model.
PI-SDK-based applications have a similar set of connection establishment messages. There
are two differences. First, the published application name is more detailed. It contains the full
executable name plus the process ID. Second, the trust login information is not published.
Here is a set of messages showing the About PI-SDK application connecting:
0 pinetmgr 27-Oct-05 19:04:44
>> PInet accepted TCP/IP connection, cnxn ID 49 Hostname:
caleb.osisoft.com, 192.1.1.114:4508
0 pinetmgr 27-Oct-05 19:04:44
>> Connection accepted: Process name: AboutPI
SDK.exe(5632):remote(5632) ID: 49
0 pibasess 27-Oct-05 19:04:45
>> Trust <pi3build> Granted to:
OSI\ADMINISTRATOR|caleb|192.1.1.114|AboutPI SDK.exe
(108 ms)
0 pinetmgr 27-Oct-05 19:04:46
>> Successful login ID: 49. Address: 192.1.1.114. Host:
caleb.osisoft.com. Name: AboutPI SDK.exe(5632):remote. User: piadmin.
Trust: caleb
Disconnect Messages
The following messages indicate normal disconnects. The error number (in square brackets)
is given along with its translation.
0 pinetmgr 27-Oct-05 16:25:19
>> Deleting connection: pishutev(2540), Shutdown request received from
pishutev(2540) (8), ID: 20
0 pinetmgr 27-Oct-05 16:44:21
>> Deleting connection: RandE, [-10721] PINET: Client Aborted
Connection. (4), ID: 39 samson.osisoft.com 127.0.0.1:1106
The following messages indicate abnormal disconnects. The error number (in square
brackets) is given along with its translation.
0 pinetmgr 27-Oct-05 19:26:31
>> Deleting connection: snapE, GetQueuedCompletionStatus error:
Network name deleted [64] The specified network name is no longer
available. Connection: snapE (14, 64), ID: 51 samson.osisoft.com
127.0.0.1:1835
Page 292
The following message indicates that an RPC was not completed within the timeout
specified. The requestor passes the timeout when it places the call with pinetmgr. This
timeout is not configurable.
0 pinetmgr 19-Feb-97 17:19:26
[-10722] PINET: Timeout on PI RPC or System Call
Piupdmgr
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...
Error Codes
System error messages usually contain error codes. Error codes are reported in square
brackets. Negative numbers indicate PI System errors. Positive numbers indicate operating
system errors.
Pidiag
Use the pidiag utility to interpret error codes. Do not type the square brackets:
pidiag -e errorcode
This will display the associated error message. For example:
pidiag -e -10722
[-10722] PINET: Timeout on PI RPC or System Call
PIdiag will also translate operating system error codes, which are always positive numbers.
Note that the error code translation takes place on the operating system running pidiag. For
example, on Windows, you could issue the command:
System error messages usually contain error codes. Error codes are reported in square
brackets. Negative numbers indicate PI System errors. Positive numbers indicate operating
system errors.
0 PI_NORMAL Success
-13 PI_ATT_BADDSCODERANGE Digital State Code Out of Range For This Tag
-19 PI_ATT_PTATTZERO Point Attribute Zero Error or Disk Error for Point
Database
-22 PI_ATT_BADTYPVALUE Typical Value Not Between Zero and Top of Range
Page 294
Code Code Identifier Message
-60 PI_ATT_NOPIDAVAIL No more pid slots for retrieving point update lists
-73 PI_EVM_TOOMANYPTS No room for this many points for this list
Page 296
Code Code Identifier Message
-105 PI_ARCH_BADSTARTENDTIME End Time Not After Start Time, or Start Time <0
-112 PI_ARCH_ARCH1OFFLINE Point not created because archive one not on-line
Page 298
Code Code Identifier Message
-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
-519 PI_SQC_CHARTEQUALSRAW Sqc: Chart Tag is the Same as the Raw Tag
-528 PI_SQC_CTLLIMNOTINFILE Sqc: Control Limits Not Found in Control Limit File
Page 300
Code Code Identifier Message
-10414 PI_XS_SIMILARTRUST Trust records must differ more than name and
Piuser
Page 302
Code Code Identifier Message
-10478 PI_FB_NULLPATHSTRING Cannot extract file and path from null string
Page 304
Code Code Identifier Message
-10587 PI_PD_NOEDITBASEATT Base attribute set edit not allowed except for
default change
Page 306
Code Code Identifier Message
-11009 PI_AR_RCOBJTOOBIG Event Contents Are Too Big to Fit in Any Record.
Page 308
Code Code Identifier Message
Page 310
Code Code Identifier Message
-11097 PI_AR_BCKMODEMISMTCH: Backup End must follow Start and vice versa.
-11100 PI_AR_SAMETIMEARG: Start time equal end time argument in archive call.
Page 312
Code Code Identifier Message
supported.
-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
-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 PI Redirector could not get updates from foreign
_SNAPSUPDATESFAIL system.
Page 314
Code Code Identifier Message
Page 316
Code Code Identifier Message
Page 318
Code Code Identifier Message
-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
Page 320
Table A–12. Error Codes15000-15999, With Messages
Page 322
Code Code Identifier Message
duplicate hierarchical level
Page 324
Code Code Identifier Message
events
Page 326
Code Code Identifier Message
-16863 PI_BCKEVENT_FREEZE_TIMEOUT_W VSS Freeze timed out waiting for VSS thaw
AITING_FOR_THAW_EVENT event
Page 328
Table A–14. Error Codes 17000-17999, With Messages
Page 330
APPENDIX B: PI PERFORMANCE COUNTERS
PI Server has a number of performance counter statistics that can to be viewed using
Microsoft’s Performance Monitor utility (System Monitor in Windows 2000).
The following tables list the statistics that may be viewed.
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.
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.
Heading Set Count The total number of heading sets in the module database.
Module Database Record The total number of records in the module database.
Count
Heading Set Create or Rate at which heading sets are created or edited.
Edit/sec
Module Database Create or Rate at which MDB records are created or edited.
Edit/sec
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.
Attribute Description
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.
Record Disk Reads/sec Rate of archive disk reads (includes Cache Record Disk 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
Page 332
Attribute Description
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.
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.
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.
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.
Event Queue Chunk Size Number of events read per Event Queue read operation.
Attribute Description
Out Of Order Rate at which out-of-order events are sent to the snapshot.
Snapshots/sec
Page 334
Attribute Description
Queued Events/sec Rate at which events are sent to the Event Queue.
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
Number of Overflow Number of overflow queue files (0 if only the primary queue is active).
Queues
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
Attribute Description
Inserted Messages/sec The number of messages that were inserted into the PI Message
Subsystem from the Application Event Log per second.
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.
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 (i.e. average, total, standard deviation, etc.).
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.
Page 336
Attribute Description
PostEvents/sec Rate at which data events are posted to the PI Snapshot Subsystem
from execution of SQL INSERT or UPDATE statements.
Attribute Description
Total Point Count The total number of active PI Totalizer Subsystem points.
Attribute Description
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.
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
Attribute Description
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.
PI Session Statistics
Attribute Description
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.
Page 338
PI Subsystem Statistics
Attribute Description
Actual Pending Only for internal debugging purpose. You should use it only under the
Transactions suggestion of OSI Technical Support.
Message Complete Time Total message handling time (including results sending).
Lock Contentions/sec Number of lock conflicts (threads waiting for the same lock).
RPC Threads Total Total number of RPC worker threads (query processing).
Attribute Description
Lost events/sec Events lost due to the PI Update Manager database being full.
Max pending events Maximum pending events reached in the PI Update Manager database.
Attribute Description
Lost events/sec Events lost due to the PI Update Manager database being full.
Attribute Description
Page 340
Table B–16. PI Performance Counters
PERF.LOCALHOST.Logical Free Megabytes displays the unallocated space on the disk drive in
Disk(_Total).Free Megabytes megabytes. One megabyte = 1,048,576 bytes.
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.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 Base Total number of defined points. This number includes the
Subsystem.Point Count Connector Point Count.
Page 342
Tag Explain Text
Email Support
Email support is available 24 hours a day, 7 days a week. Send technical support
inquiries, including the problem description and message logs, to:
techsupport@osisoft.com. Technical Support will respond to your inquiry within 24
hours.
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 in 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).
Page 346
INDEX OF TOPICS
Page 348
PI Server, 6 Case-preserving, 220
Solaris UNIX Systems, 7 Case-sensitive, 220
Windows Services, 6 Digital State Set, 198
backfilling archives flag, 186
creating new primary archive, UNIX operating system, 172
55 Cd command, 186
without compression, 54, 55 Character
backfilling data, 54 special, Changing, 223
Backups t for true, 178, 179
Automating, 66 Classic Point
PI Server, 63 Attributes, 189
Recommendations, 66 Classicctr, 258
Base Subsystem, 230 Clear command, 186
performance counters, 331 Client Applications
Batch Alias Table, 208 Connection Messages, 290
Batch method Security, 125
piconfig, 172 clock
Batch mode, 183 setting on interface nodes, 101
Batch Subsystem clock, system, 23
Batch Unit Table, 207 codes, error
Batch Tables, 209 operating system, 21
BATCHEXPR, 208 COM component
BID register, 279
Batch Subsystem, 209, 214, COM Connector
215
in-process, 262
BIDsearch
out-of-process, 262
Batch Subsystem, 209
troubleshooting, 257, 261
Boolean values, 222
Web site, 257
buffer, 95
Combining Archives, 59
buffering
ComChar, 186, 223
about, 95
Comma Separated Format, 179,
maximum size of buffer, 95 190
recommendations, 95 Command
Buffering ?tbl, 173
PI API, 96 All in piconfig, 186
bufserv Bye, 183
file buffer size, 95 Case, 220
Bye command, 183 character, 186, 223
BytesRecv, 211, 212 piconfig, 172
BytesSent, 211, 212 Comm, 180
C language, API, 96 Endsection, 182
Case command, 220 Error, 184
Page 350
number of archive read Dates
requests, 28 overlapping, 245
out-of-order event Daylight Savings Time
archive, 28 and interface nodes, 101
Overflow Data Record, 30 customizing changes, 267
Overflow Index Record, 30 list of changes, 267
PI Server Performance, 340 Dbsecurity, 173
counter, point, 23 DbsecurityTable, 216
counters Dcomcnfg, 257, 262
performance, 331 Default
CPU Digital State Set, 195
Excessive usage of, 253 default values
CPU usage pigetmsg parameters, 19
by utilities, 252 Delete
Create Mode, 178
Mode, 178 deleting archives, 56
creating archives for old data, 54 deleting connection error message,
creating new primary archives, 55 22
CSV format, 190 Delimited
ctr_lmap, 258 Structure type, 179
ctr_progid, 258 Delimiter, 186
ctr_strmap, 258 Character, 180, 187, 223
data Command, 180
time limit on modifying, 52 Format, 179, 223
Data Digital State, 5, 172
File repairs, 241 Table, 195
Recovering from corrupted Digital State Set
archives, 241 adding, 196
Data Archive capitalization, 198
Adding values, 201 Changing the Name, 198
data buffering default, 195
about, 95 limits, 195
data flow modifying, 197
buffering, 95 Digital State Table
snapshot, 22 merging systems, 153
Database Digital State Value
Firewall, 219 Sending to the Snapshot
Point, 57, 189 database, 200
Timeout, 219 Digital tag
Trust, 218 Creating, 199
Database Security, 173 DigitalSet, 199
Database Security Table, 216 Directory
Page 352
Failed to unregister input archive Command, 176
message, 242 lists all commands, 187
file buffer, 95, See also buffering Hexadecimal notation, 224
maximum size, 95 Hostmask, 173, 219
File corruption, 241 Modify, 120
File handles, 233 HP-UX
File-base Utility, 269 process count, 235
compact, 269 I/O
index, 269 Redirection, 184, 185
Firewall, 219 IBM AIX
Database, 219 process count, 234
Modifying, 118 ID
Security, 117 PINetMgr, 212
troubleshooting, 228 ID Conversion File, piarchss, 43
Fixed index record, 35
Format, 180 Initialization
structure Structure type, 179 archive, 57
Fixed Archive, 36 Input
fixed archives, 33, 35 Command, 183, 220
Flag redirect, 187
Shift-enable, 57 to piconfig, batch files, 183
Flags, 201 Installation
Flatline in a trend Redirector, 257
troubleshooting, 255 Integer Format to String, 266
Force processing, 196 Interactive session
Format piconfig, 172
Delimiter, 179, 182, 223 interface nodes
Fixed, 180 setting clock, 101
Keyword, 180, 186 Interface Nodes
full, archive, 33 definition of, 94
gaps Interface Status Utility, 113
archives, 34 interfaces
General Table Interface and PI API, 96
Timeout, Firewall, Proxy, 219 APS utility, 113
Group definition of, 94
assigning users to, 126 Interface Status Utility, 113
Database, 125 setting system clock, 101
table for, 215 Interfaces
Handle downloading documentation
Batch Subsystem, 209, 214, for, vi
215, 219 internal counters
Help piartool-qs, 25
Page 354
Module Database Security, 116
Repairing, 250 Operators
moving archives, 56 Modify Point Attributes, 189
XE "conversion files, ID" to piconfig, 181
another server, 43 OSBuild, 210
Moving PI Servers, 147 OSIsoft Universal Interface. See
MsgRecv, 211 UNIINT
MsgSent, 211, 212 OSSysName, 210
Name Ostructure, 187
Connection name, 212 Command, 180
naming archives, 52 Ostype, 179, 187
Netmask OSUser
trust logins, 132 trust logins, 133
NetType, 212 OSVersion, 210
Network Out of order event
definitions, display the, 278 counter
Router, 116 archive, 28
Security, 116 out of order events
Network Manager compression, 23
performance counters, 337 out of order events counter, 23
NEWhostmask, 119 Output, 187
Newset keyword, 176 Command, 184
Newtag keyword, 176 overflow events, 25
NEWUnitName, 207 Overflow Offsets
nodes, 94 piartool -al, 47
NT overflow queues, 25
Interface installation overflow XE "primary record"
PIHOME directory, 101 record, 34
Octal notation, 224 Overlapping dates, 245
offline archive utility, 37, 40, 41 Owner
list of parameters, 41 point attribute, 123
Offline Archive Utility Parameter
ID Conversion File, 43 Passing an input file, 184
time conversion file, 44 Passing as Output, 184
Time Filtering, 43 Timing, 219
offline mode Password, 126
pimsgss, 20 blank, 127
offline, message subsystem, 20 changing, 127
OpenVMS default, 127
and PI API, 95 reset piadmin, 278
Operating System Path
Error Codes, 293, 294 piartool -al, 47
Page 356
PI TagConfigurator, 171 number of overflow queues, 25
PI Thread Table, 215 out of order events counter, 23
PI_GEN, 173, 219 point counter, 23
Piadmin, 117, 124, 125 remaining capacity, 25
reset password, 278 total overflow events, 25
Piarc, 173 piartool -ss, 22
Edit mode attribute, 204 PIATRSET, 173
Piarc Table, 202 Pibaalias, 173, 208
piarchss, 37, 40 Pibasess, 230
offline archive utility, 41 Pibatch, 209
Piarchss, 231 PIBatch
piarchss -id, 43 considerations when merging
piarchss offline utility systems, 154
list of parameters, 41 Pibaunit, 173, 207
Piarcmem.dat, 236 Piconfig, 127, 203
piarcreate, 37, 52 Abbreviations, 220
Piarcreate, 52 Commands, 176, 186, 223
piarstat.dat, 56 Configuration.Persistence, 223
Piarstat.dat, 236 Echo command, 184
piartool, 37 Modes, 178
-aw, 49 Overview, 171
creating archives with, 52 Remote sessions, 185
deleting archives, 56 Starting, 172
moving archives, 56 Stopping, 172
-qs, 25 using quotes, 221
registering archives, 56 values sent as strings, 222
unregistering archives, 56 pidemo user account, 125
Piartool, 52 pidiag, 263
-al, 46 about, 21
results from, 47 -ad, 270
-as, 27 -ahd, 271
piartool -ac, 52 -ar, 271
piartool -acd, 52 -ara, 270
piartool -ar, 56 -e errorcode, 265
piartool -au, 56 -fb, 269
piartool -ooo, 23 -fb utility, 236
piartool -ss -fbc <path>, 269
events counter, 23 -fbf <path>, 270
events in queue counter, 24 -h or -?, 265
events read counter, 24 -host, 278
events sent to queue counter, interpreting error messages, 21
24 operating system errors, 21
Page 358
Piusrgrp.dat, 238 piartool -al, 47
Piverify.sh script, 228 primary record, 34
PIVersion, 210 Priority
Point Trust Records, 135
access to, 124 PRODEXPR, 208
data access, 122 ProdIDsearch
Database, 189 Batch Subsystem, 209
Datagroup, 124 Producer
Dataowner, 124 pilistupd utility, 238
object for security, 122 Prompt, 187
Ownership, Changing, 123 ProtocolVersion, 212
Point class, 188 PtClass, 187
Point Attributes Ptclass command, 188
access to, 122 queue
Changing Owner, 123 number of overflow events, 25
Modifying, 189 number of overflow queues, 25
With Operators, 189 remaining capacity, 25
Point Class queue, event
Base, 188 monitoring, 25
Point Class Database, 192, 194 Quit command, 183
point counter, snapshot, 23 Quote, 187
Point Database, 57, 188 character, 223
migration from PI2, 224 Quote marks
Repairing, 250 used in piconfig, 221
table name, 188 RampSoak, 232, 240
PointID, 200 Random, 240
PointSource attribute, 103 Random Simulator, 232
Command line parameters, 102 record
PoolName, 215 archive, 34
predicting archive shifts, 47 Record, 188
primary archive, 33 attributes, 175
Primary Archive, 35, 46 Record Size
Recovering, 242 piartool -al, 47
primary archives records
creating new, 55 determining percentage used,
failing to register, 55 47
Primary index listing details, 49
Connection, 212 Records
Primary key, 172 Trust, Weighting, 135
Default, 181 Recovery tool, 247
Primary Offsets Recsep, 187
RecvErrors, 211, 212
Page 360
shift predicting, 47 Modify, 189
shift, archive, 33 Special Characters, Changing, 223
Shift-enable flag, 57 Specifications
Shutdown Events, 4 Compression, 122
Shutdown.dat, 4, 5, 238 Spreadsheet, 190
Sigd, 188 SQL Subsystem
Sign up for updates, 293 performance counters, 336
Significant decimal digits, 188 Start
sinusoid, 232 Messages, 281
Site-specific files, 2 PI, 1
size of file buffer, 95 UNIX, 3
size, archive records, 34 Windows, 2
Smit utility, 234 piconfig, 172
SMT Redirector, 258
about, vi Starting
snapshot PI, 2
event count, 22 Starttime, 203
events counter, 23 State
events in queue counter, 24 piartool -al, 47
events read counter, 24 STATE, 195
events sent to queue counter, State Sets
24 listing, 195
listing current information, 22 statistics
monitoring data flow, 22 performance counters, 331
number of overflow queues Status, 188
counter, 25
command, 173
out of order events counter, 23
PI processes, 228
point counter, 23
Stdout, 2
remaining queue capacity, 25
Stop
total overflow events counter,
PI, 1
25
on UNIX, 4
Snapshot, 5
on Windows, 3
list values, 201
piconfig, 172
repairing, 247
String to Integer Format, 266
Subsystem
Structure, 187, 188
Adding digital state
values, 200 Specifications, 181
recovering, 248 Type, 179
Troubleshooting, 230 STYP, 188
Snapshot Subsystem Stype, 179
performance counters, 334 Subnet, 118
Span specifying for trust login, 132,
143
Page 362
Attributes, 207 shutdowns, 135
conversion file, 44 Trust Records
Filtering, 43 Weighting, Score, 135
future times in Snapshot Tuning
removing, 248 Utilities timeout value, 252
piconfig millisecond, 206 Tuning the PI System, 251
piconfig TimeFormat, 206 Type
Time Zone, 266, 268 Files, 236
utilities, 265 piartool -al, 47
time limits on modifying data, 52 UniInt
Time Transformation Processing, downloading documentation
245 for, vi
conversion file, 246 UnitName, Batch Subsystem, 207,
time zones 209
and interface nodes, 101 Universal Interface
TimeFormat, 206 downloading documentation
for, vi
TimeNum, 200
UNIX, 212
Timenum Attributes, 207
Case-sensitive, 220
Timeout Database, 219
Sockets protocol, 251
Timestamp
UNIX Process
Corrections, 44
Stopping, 232
Millisecond, 207
UNIX Process Quotas, 233
Timformat, 188
Unregister Archive
Timing Parameters, 219, 251
list unregistered files, 271
Totalizer Subsystem
unregistering archives, 56
performance counters, 337
Update Manager, 30
totalUpdateQueue, 31
MaxUpdateQueue, 31
TotalUpdateQueue, 31
Pending Update Limit, 31
Troubleshooting
Statistics, 340
Checklist, 225
TotalUpdateQueue, 31
PI Update Manager, 230
Troubleshooting, 230
Redirector, 257
Upgrade
Strategy, 225
Post Upgrade Tasks on UNIX,
Trust Database, 128, 218
147
defining a record, 130
User
fields, 131
Adding, 127
how to configure, 131
Database, 126
Trust Login, 128
Name and Password Security,
evaluating, 134 125
examples, 137 Passwords
installation, 136 changing, 127
network definitions, 278
Page 364