|
Ship and ROV Core Datastreams : CfgFileMonitor
This page last changed on Oct 21, 2013 by rich.
The ROVCTD config file is maintained by the ROVCTD tech. It is part of the labview GUI on both the WesternFlyer and RachelCarson. The file is on the Rovctd computer in the C:\CtdGui dir, and named CTDCoeff.ini *** THE FILE NAME AND PATH ARE CRITICAL !!!! ****** There is a perl program on those computers running as a service that monitors that file every 10 seconds for changes. If a change occurs, the service grabs the file and writes it to an mssql database. The database server is currently either Glacierwind (wfly) or Alaskanwind (ptlo). The database name and table name archiving the cfg file is either DOCR_CTD_Config or VNTA_CTD_Config The perl script reads the filename to be monitored from table CfgFileMonitorService on the corresponding database. The perl script can actually monitor and archive any/many text files simply by adding them to the CfgFileMonitorServiceTable. (Legacy note: The perl script **used to ** test the file name internally and if it matched CTDCoeff.ini then it would reformat it and ftp it to an hpux workstation for use at sea. that feature has been disabled. ) The perl script is in CVS repository on moonjelly in iag/projects/CoreData
For a complete from-scratch install of the service on the rovctd computer, you will need to: PRELIMINARIESThe rovctd computer should be named wf-rctd.wf.mbari.org or rc-rctd.rc.mbari.org The Western Flyer it is has static IP 134.89.20.47 and default user is WF\docricketts The Rachel Carson it has statuc IP 134.89.. and default user is RC\ventana Almost all of the commands below need to be in "Run As Administrator" mode. Make sure that IS has installed the cpu as static IP and with the WF\docricketts or RC\ventana account is given local administrator rights. INSTALL PERLGo to http://www.ActiveState.com and download Active Perl free community edition.. (Language>Active Per, and look for the Windows x86 MSI download, click it and download to your desktop.) Find the windows explorer icon, right-click it and "Run as Administrator" Navigate to the downloaded msi installer file (probably on desktop or in ~/Downloads) and run it. Accept all defaults Open a command window and type perl -v and verify you have a working installation INSTALL EXTRA PACKAGESNext find the cmd.exe console icon, r-click and run as administrator. Then at the prompt, type ppm to run the perl package manager. It will pop-up the ppm GUI window take about 20 seconds to sync its cfg to the perl repository. Select View > AllPackages Then check each of the following packages - if its insalled just skip, else check the little icon to the left of each package to 'mark it for installation'
Following are also needed but were already included in most recent (2013) install
When ready, hit the "install selected packages" icon in upper-right of the gui
PREPARE DIRECTORIES AND FILESAgain using the explorer 'run as administrator'.... Create directory C:\Program Files\CfgFileMonitor Right-click the directory and set perfison for full control to WF\Users or at least WF\DocRicketts etc... This will allow the service to write its log file to the directory Add perl script RovCtdCfgFileMonitor.pl to the directory. If its not already there - create a directory C:\Program Files\CTDGUI and put the current CtdCoeff.ini file in it.
INSTALL AND INITIALIZE THE SERVICEOpen a command window again in 'run as administrator' mode. cd to C:\Program Files\CfgFileMonitor type: perl RovCtdCfgFileMonitor.pl -install it may complain about a type in the dbo package - that is safe to ignore. Your looking for a "service installed" message. Fix any problems, missing packages or file permissions etc. as needed. But as of 2013 Win7 x86 the above was successful... SET SERVICE RUN-AS AND AUTOSTARTNow go to ComputerManagement console and navigate to Services Panel. Highlight the CfgFileMonitor service and r-click, select the LogOn Credentials and chnge from whatever (Local System?) to WF\DocRicketts and Apply Start the service, and also set to Autostart In an explorer window, look at the log file in C:\Program Files\CfgFileMonitor directory to see that the service started and is able to connect to database (every 10 seconds by default) You can touch the CtdCoeff.ini file to and monitor the log file to see that it is detected and pushed to the database. FINALLYReboot the rctd computer and then retest to verify the service restarts itself correctly etc. OTHER HINTSThe service most secure if allowed to use windows integrated security as WF\docricketts or RC\ventana For debug/testing you can modifiy the perl script to use SQLServer managed authentication as expddbo To remove the service... type perl CfgFileMonitor.pl -remove Monitor the log periodically, at least annually to keep the log file from getting too big. REPLICATION TO SHORECfg file data are pulled to shore by sql server jobs run on solstice. The jobs run a XOJO program that pull data to tables in the on-shore expd database.
|
| Document generated by Confluence on Feb 04, 2026 08:53 |