Windows NT Home Node Shutdown Events

On Windows NT, both PI Server tags and those which are buffered on the local node should have shutdown=TRUE. On reboot of the NT node, the PI service pishutev will run automatically. It only uses the shutdown.dat file when starting as a service. For the case when the PI Server is rebooted, the shutdown.dat file should be the same as shown under the remote API node topic. All tags with the shutdown attribute set to TRUE will receive shutdown events. This should include locally buffered points, calculated, totalized, and alarm points.

For the case when the PI system is restarted the PI Server tags should receive shutdown events but not the locally buffered interface tags. The pisrvstart.bat file needs to be modified so that the shutdown.dat file is not run by pishutev. The section between the "Change this section" comments below has been changed.


rem $Archive: /PI/3.2/nt/scripts/pisrvstart.bat $


rem Non-Interactive PI Startup as NT Services


rem Start the Base PI Services


echo Starting Base PI System Services...


set piss=pinetmgr pimsgss

for %%i in (%piss%) do ( ..\bin\%%i -start & pidiag -w 5000 )


set piss=piupdmgr pibasess pisnapss piarchss

for %%i in (%piss%) do ( ..\bin\%%i -start & piartool -block %%i -verbose)

if "%1" == "-base" (goto theend)


rem Start the Extended PI Services


echo Starting Extended PI System Services...

rem === Change this section >>>>>>

rem Do pishutev separately.

..\bin\pishutev -f shutdown_C.dat

..\bin\pishutev -f shutdown_G.dat

..\bin\pishutev -f shutdown_AT.dat

rem set piss=pishutev pisqlss pitotal pibatch pialarm pipeschd

set piss=pisqlss pitotal pibatch pialarm pipeschd

rem <<<<<< Change this section ===

for %%i in (%piss%) do ( ..\bin\%%i -start & pidiag -w 5000 )


rem Check for No Site Startup Flag


if "%1" == "-nosite" (goto theend)

pidiag -w 10000

call pisrvsitestart.bat


A separate shutdown.dat file copy should be made to include only those points that are not buffered. This may require a separate shutdown.dat file for each point source as shown here.

! shutdown_C.dat: Shutdown for Calculated server points.

! login info - no longer used - ignored.


! tag mask


! tag attribute selection (logical AND for all attrib)

! point attributes,value to select points receiving shutdown



Note it would be appropriate for the interface itself to send shutdown events to the home node when it is stopped (UNIINT-based interfaces use "I/O timeout" or "Intf shut" to indicate shutdown to differentiate between server and client shutdown with the /stopstat="Intf shut" command line parameter). The interface documentation will have specific instructions on implementing shutdown. PINet nodes (VMS clients) currently support sending shutdown events for interfaces collected on the node when the PINet node is shut down.

Calculated and alarm tags (pointsource C, G,) are examples of locally collected tags that should be listed in shutdown.dat files. Note that time-based calculations are not performed when the base system is down. Event-driven calculations are likely to be wrong when the system has been shutdown and the triggering events have been buffered. A shutdown event in this case alerts the end user to invalid data.

Enabling Operational Intelligence