| |
|
|
||||||||
"IRMIS is a collaborative effort
between several EPICS sites to build a common Relational DataBase schema and
a set of tools to populate and search an RDB that contains information about
the operational EPICS IOCs installed at that site." IRMIS (the schema,
crawler programs and UI) was developed by Don Dohan and Claude Saunders at APS.
For general information and distributions see the IRMIS
home page.
IRMIS is used (or will be used) at SLAC to query for PVs and their attributes, and associated resources and PV clients, by a variety of criteria. Querying can be done using the IRMIS desktop UI program, or by writing sql scripts. PV lists obtained from IRMIS can be used in the construction of config files for pv clients (alh, car, cw, possibly displays...)
Elements of IRMIS have been adopted and adapted for the controls software group at SLAC:
Other elements of IRMIS include cabling, device and application schemas. We are not populating these now...but may in the future.
Elements modified or created at SLAC:
This is a java UI for the IRMIS Oracle database, and can be invoked in 3 ways:
1. from XP:for the Production database double click on v:\cd\soft\Projects\IRMIS\IRMIS_APP\irmis.jar
for the Development database double click on v:\cd\soft\Projects\IRMIS\IRMIS_APP_DEV_DB\irmis.jar
2. from a Solaris or Linux workstation:run this script (Production database only):
irmisUI
** If you're on XP, please run as shown in #1 above, the v: drive. Running the solaris or linux version in a teraterm window is slow.
3. from the lclshome edm display:
click the IRMIS button in the Tools section (Production database only)
So far at SLAC, only the idt::pv and the idt::pvClient document types are populated.
The IRMIS Desktop comes up with the idt::pv document displayed.
To see the pvClient document, select File/New Document/idt::pvClient
Query results can be saved to an ascii file for further processing.
Two views have been created to ease sql querying. These views combine data from the IOC_BOOT, IOC, REC and REC_TYPE tables, and the FLD and FLD_TYPE tables. They select currently loaded PVs, where IOC_BOOT.CURRENT_LOAD = 1.
- CURR_PVS has all currently loaded PVs
- CURR_PVS_PLUS_FIELDS has currently loaded PVs and their fields
The plan is to develop a really cool and spiffy way to generate PV Client channel lists for ALH, CW and CAR from the IRMIS db, but for now we have a first pass at a really simple-minded script version. It uses our new irmis_ro account.
The script is:
~jrock/work_lcls_irmis/pvClientQueries/getClientList.csh
You have to cd to ~jrock/work_lcls_irmis/pvClientQueries first in order to run it.
The script currently has no error handling or parameter checking.
The script's parameters are:
PV Client (ALH, CAR or CW)
(optional W) - use this if you want to enter a freeform where clause
For example:
getClientList.csh CAR
or
getClientList.csh ALH W
The script will prompt you for output filename, search criteria and desired client flag values.
The script queries the database based on system (e.g. LCLS), ioc (e.g. XL02) and record name. In any of these, the wildcard character % can be used. For example, %BDES will result in all the BDES values for the given system(s)/IOC(s). XL% will result in all the XL IOCs, % will result in all IOCs, etc.
If you specify "W" as the optional second parameter, you will be prompted for a freeform where clause, instead of being prompted for ioc and record name. For example you could enter
ioc like 'XL%' and (rec_nm like %BDES or rec_nm like %IDES)
The IRMIS database schema is installed in 2 SLAC Oracle instances:
The owner username in both instances is irmisdb. For the password see Judy Rock, Bob Hall or Ken Underwood.
There is a read-only user as well: irmis_ro, password irmisread.
see schema diagram
below.
The PV crawler is run once for each
IOC boot directory structure. The SLAC PV crawler (runSLACPVCrawler.csh)
runs the crawler 3 times to accommodate the various CD IOC directory structures.
The LCLS PV crawler (runLCLSPVCrawler.csh) runs the crawler only once (so far!).
It is separate to enable it to be run on a different schedule if necessary.
PV crawler operation summary
For the location of the crawler scripts, see Source code directories below.
The SLAC scripts that run the crawlers
(including the LCLS crawler script) live in the CD software distribution path.
The IRMIS crawler perl programs themselves are run by the scripts , which are
not gmake-d nor distributed.
runSLACPVCrawler.csh and runLCLSPVCrawlerLx.csh set up for and run the IRMIS pv crawler multiple times to hit all the boot structures and crawl groups. Environment variables set in the crawl scripts, and in pvCrawlerSetup.csh, point the crawler to IOC boot directories, log directories, etc. Throughout operation, errors and warnings are written to the log file.
** For PV Crawlers: the crawler group for any given IOC is determined by its row in the Oracle IOC table. The system column refers to the boot group for the IOC, as shown below.
** The PV client crawlers load all client directories in their config files; currently includes both CD and LCLS.
Log filenames are created by appending a timestamp to the root name shown in the tables below.
| script name |
descr |
|||||||||||||||
runSLACPVCrawler.csh in CD soft escalation directory structure THIS SCRIPT IS STILL RUNNING, BUT VERY LIMITED. IT WILL BE PHASED OUT SOON.
|
crawls PEPII, NLCTA, CD IOCs The PV crawler is run 4 times within this script to accommodate the various boot directory structures:
|
|||||||||||||||
runLCLSPVCrawlerLx.bash in /usr/local/lcls/lcls/tools/irmis/script/
|
crawls LCLS IOCs
|
|||||||||||||||
| runClientCrawlers.csh | Runs PV client crawlers in sequence. LCLS client config files are all scp-ed to /nfs/slac/g/cd/crawler/lcls*Configs for crawling
Also runs load_vuri_rec_client_type.pl for clients that don't handle vuri_rec_client_type records (sequence crawler only, at the moment) |
|||||||||||||||
| runRecClientCleanup.csh | deletes all non-current rec client rows. Logs to /nfs/slac/g/cd/log/irmis/client_cleanupLOG.* | |||||||||||||||
| run_find_devices.bash in /usr/local/lcls/tools/irmis/script/ |
for LCLS only, populate the devices_and_attributes table, a list of device names and attributes based on the LCLS PV naming convention. For PV DEV:AREA:UNIT:ATTRIBUTE, DEV:AREA:UNIT is the device, ATTRIBUTE is the attribute. | |||||||||||||||
| run_load_bsa_root_names.bash in /usr/local/lcls/tools/irmis/script/ |
loads bsa_root_names table by running stored procedure LOAD_BSA_ROOT_NAMES | |||||||||||||||
| ioc_report.bash in /usr/local/lcls/tools/irmis/script/ |
run at the end of the LCLS PV crawl, which is last, creates the web ioc report : http://www.slac.stanford.edu/grp/cd/soft/database/reports/ioc_report.html | |||||||||||||||
| updateMaterializedViews.bash in /usr/local/lcls/tools/irmis/script/ |
refresh materialized view from curr_pvs | |||||||||||||||
| findDupePVs.bash in /usr/local/lcls/tools/irmis/script/ |
find duplicate PVs for reporting to e-mail | |||||||||||||||
| copyClientConfigs.bash in /usr/local/lcls/tools/irmis/script/ |
copy alh, cw and car config files to /nfs for crawling by the client crawler job | |||||||||||||||
| pvForMike.bash in /usr/local/lcls/tools/irmis/script/ |
a test caget which is e-mailed to Mike Z. Unrelated to IRMIS, but a convenient place to run! |
Crawlers are launched by trscrontab on slcs2, user cddev. All run on slcs2, except runLCLSPVCrawlerLx.bash, which runs on lcls-daemon2.
time |
script |
| 12:30 am | runSLACPVCrawler.csh |
| 2:00 am | runLCLSPVCrawlerLx.csh |
| 3:00 am | runClientCrawlers.csh |
| 3:30 am | runRecClientCleanup.csh |
Following the crawls, the calling scripts grep for errors and warnings, and send lists of these to Judy Rock, Bob Hall and Ernest Williams and Jingchen Zhou. To track down the error messages in the e-mail, refer to the log file du jour.
(for soft IOCs, sequences are not crawled because they are not available as .o files)
(this happens when the boot date is 0 - for those IOCs without a TIMEOFBOOT PV - this is OK)
(we don't need this for crawling)
description |
cvs root |
production directory tree root |
details |
| IRMIS software | /afs/slac/package/epics/slaconly/cvs
The IRMIS code has diverged from the main SLAC code. It's in the LCLS repository under tools/irmis/crawler_code_CVS.
|
/afs/slac/package/epics/tools/irmisV2_SLAC /usr/local/lcls/package/irmis/irmisV2_SLAC |
|
| SLAC scripts | /afs/slac/g/cd/soft/cvs | $CD_REF/ext/irmis |
|
| LCLS scripts | /afs/slac/g/lcls/cvs | /usr/local/lcls/tools/irmis |
|
In the SLAC scripts area, each crawler has certain files and directories:
The LCLS script area contains all LCLS-specific scripts, config files, etc.
In the IRMIS software area, each crawler has its own source code directory. The SLAC/LCLS crawler run scripts cd into these directories to run the crawlers, where db.properties can be found. The database instance is set here, along with other properties.
The UI is run from a button on lclshome which invokes the irmisUI script. The jar file is here: /usr/local/lcls/package/irmis/irmisV2_SLAC/apps/deploy/irmis.jar
/afs/slac/package/epics/tools/irmisV2_SLAC/README has info on the applications and also instructions for building the IRMIS UI. (although work on the UI is much better done in Eclipse!!)
IOC boot directories are:
crawl group |
IOC boot directories |
Copy for crawling |
| PEPII, NLCTA, SOFT | GTW00 $CD_IOC | /nfs/mccfs0/u1/pepii/mirror/cd/ioc |
| SOFT-AFS | afs $CD_IOC | |
| MICRO-IOC | afs $CD_IOC | |
| LCLS | /usr/local/lcls/epics/iocCommon | |
| TR01 | GTW00 $CD_IOC | /nfs/slac/g/cd/crawler/ioc_boot_temp/cd/ioc/rfs00nta01 |
The IOC table in the IRMIS schema contains a list of IOCs. The system column designates which crawl grouping the IOC belongs to. For LCLS IOCs, the group is "LCLS", not surprisingly!
An IOC will be hit by the pv crawler if its ACTIVE column is 1 in the IOC table.
An IOC will not be crawled unless its STARTTOD (boot time) has changed since the last crawl.
Specific files will not be crawled unless their mod date or size has changed. Crawling specific files can be triggered by changing the date (e.g. touch).
IOCs without a STARTTOD
PV will be crawled every time.
Qualifying IRMIS PVs populate the bsa_root_names table, which is joined in with Elie's complex views to device data in lcls_infrastructure. For details on the bsa_root_names load, please have a look at the code for the stored procedure which loads it (see one of the tables above)
/afs/slac/package/epics/tools/irmisV2_SLAC/db/ddl/irmis-pv-schema.png

Added table: the ioc_alias table contains aliases for LCLS IOCs. For example, ioc-sys0-al00 alias is AL00.
Programmers' Guides, Users' Guides, Requirements, Design, Papers, Administration, How-To, Hardware, IOC, Database
[SLAC ESD Software Engineering Group][ SLAC Home Page]
Author:
Judy Rock 27-Nov-2006
Modified by: 17-May-2007, jrock, modified to point to new LCLS
crawler run script location for Linux. Note, all modifications are listed on
same line!