We have an interface using PIAPI on LINUX that is sending EMS data to PI to be archived. For my testing and verification purposes on my interface, I only have a DEMO/TEST PI Server Collective to simply verify my data is making it to the snaphot and being archived. Our customers typically purchase and maintain their archive data themselves. So, I haven't played around much with the archives and really have minimal knowledge of the PI Server.
On our Operator Training System (OTS), we have the requirement that at the beginning of each simulation, the current PI archive should be deleted and a new PI archive created automatically. Thus, they do not want an operator to manually use SMT to perform this task, they want it to be done programmatically. So, it appears that from the LINUX server, I can SSH a command that executes a batch file I created on the PI Server, this batch file would call one of the necessary piartool.exe commands that I want performed.
For example, I can ssh a command to be executed on my Primary PI Server:
linuxserver#spsy|/home/spsy> ssh spsy@PI__PRIMARY /cygdrive/c/PIForceArchiveShift.bat
Stdout indicates the batch file command which calls piartool was executed:
C:\cygwin64\home\spsy>"C:\Program Files\PI\adm\piartool.exe" -fs 1>"C:\temp\forceshiftoutput"
This appears to work fine in my test environment, the archive shift is creating a new archive, which is very quick since there are only a couple Tags which are being written to every second. What I need to determine is how long to wait after the archive shift to call piartool -au to perform the Unregister and delete of the old archive that is no longer needed?
Also, as soon as the piartool.exe -fs command is executed, will new data arriving from our interface be written to the newly created archive? Or is it possible we will loss some of our data if the shift is not completed? Do we need some delay before starting up the simul
BTW, I was relieved to see that 19216OSI8 explained why the forceshiftoutput indicated a totally different target name from the actual newly created archive name.