Size: 4658
Comment:
|
← Revision 13 as of 2009-07-15 14:32:38 ⇥
Size: 6954
Comment: converted to 1.6 markup
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
<<TableOfContents(2)>> |
|
Line 2: | Line 4: |
---- |
|
Line 9: | Line 9: |
---- Author: Erich Wiezorrek[[BR]] Version: 1.0[[BR]] Date: October 28, 2205[[BR]] ---- |
|
Line 28: | Line 18: |
All | All commands below assume that you are logged using the ''pacs'' account on host ''hos4-d'' and that the ''psetup'' configuration has been executed. {{{ ssh -X pacs@hos4-d psetup }}} All CUS patches are collected in the ''/home/pacs/cus'' directory tree. |
Line 32: | Line 29: |
Go to the directory where to place the input MIB files. Create the directory if it doesn't exist (BUT is shall exist on our operational server). |
Go to the ''/home/pacs/cus'' directory and create a cus patch directory for today in the format ''patches_YYYYMMDD''. When there is more than one patches append ''A'',''B'' ... to the date to distinguish them. Copy all new CUS procedures and uplink tables to this directory. |
Line 36: | Line 33: |
cd ~/mib/raw }}} Unzip the empty_mib_files.zip archive to make sure all necessary input files for the MIBingestion exists.[[BR]] Unzip the PACS_MIB_7_18.zip archive. When asked to overwrite files select the option to overwrite all files.[[BR]] On the operational server those archives are in the parent directory. {{{ unzip ../empty_mib_files.zip unzip ../PACS_MIB_7_18.zip }}} Go to the parent directory and run MIBpreparation and MIBingestion. {{{ cd .. preparemib ~/mib/raw ~/mib ingestmib | & tee test.log |
cd ~/cus mkdir patches_YYYYMMDD cd patches_YYYYMMDD cp fromeSomewhere . |
Line 54: | Line 39: |
Congratulation, it's done. | Assuming that all CUS procedures file names and only those end with ''.txt'' following command is ingesting them to the database. {{{ cus -f -m "XXXth update for EQM IMT" -import *.txt }}} Replace ''XXXth'' with the current ordinal number for this CUS update. The same command is used to update the ''readonly'' database as well. Don't miss the parenthesis around the command otherwise your terminal session will be permamently configured to use this readonly database. {{{ ( readonlyCUS; cus -f -m "xxxth update for EQM IMT" -import *.txt ) }}} Similar commands are used to ingest the uplink calibration tables. {{{ cus -f -m "XXXth update for EQM IMT" -uploadcal tableFileName ( readonlyCUS; cus -f -m "XXXth update for EQM IMT" -uploadcal tableFileName ) }}} <!> {X} <<BR>> As updates to the CUS procedures can change to number and order of the telecommand sequence of an observation mode the procedure step [[#checktemplates|"Recreating TCL template scripts and comparing with a previous release"]] must be executed even if there are no updates in the parameters for the TCL template scripts.<<BR>> <!> {X} |
Line 58: | Line 63: |
== Loading the initial CUS definitions: == | == Updating TCL template script requests == |
Line 60: | Line 65: |
Go to the directory where to place CUS files. Create the directory if it doesn't exist (BUT is shall exist on our operational server). |
Create a patch directory named ''CCS_template_scripts_update_YYYYMMDD''. Go to this directory. |
Line 64: | Line 68: |
cd ~/cus }}} Unzip the cus-definitions.zip archive which holds all initial CUS definitions including the CUS tables.. {{{ unzip cus-definitions.zip }}} Load the TC definitions from the currently loaded MIB {{{ cd ~/cus cus -loadmib 1 <<EOF |& tee test.log initial MIB version EOF }}} Load the CUS tables {{{ cat listOfCalibrationTables |xargs -t -i cus -m "Initial version" -uploadcal tables/\{\} \{\} }}} Load the CUS definitions (observing modes, building blocks, procedures) {{{ cus -m "Initial version" -import registryDefinitions |
mkdir ~/cus/CCS_template_scripts_update_YYYYMMDD cd ~/cus/CCS_template_scripts_update_YYYYMMDD |
Line 87: | Line 72: |
The way how to upgrade your TCL templates depends on the input from the operations group: * voice or email describing changes to the requested observation parameters * nice CSV files describing templates requests * Helmut's Exel sheet file '''(not described here)''' |
|
Line 88: | Line 77: |
Congratulation, it's done. | === voice or email describing changes to the requested observation parameters === |
Line 90: | Line 79: |
Copy the '''createTemplates''' file from the last patch directory. Edit this file with your fauvorite editor. {{{ cp ~/cus/CCS_template_scripts_update_LastPatchDate/createTemplates . xemacs createTemplates }}} |
|
Line 91: | Line 85: |
== Loading a MIB update == | The file consists of single records holding ''ccshandler'' commands to create the template TCL scripts. |
Line 93: | Line 87: |
ccshandler -template [-file=fileName] obsMode paramList [-file=fileName] | |
Line 94: | Line 89: |
Go to the directory where to place the input MIB files. Create the directory if it doesn't exist (BUT is shall exist on our operational server). Remove all existing files ending with "*.dat". |
Command options: * -template: mandatory option to activate template generator mode * -file: specifies the file name to store the resulting TCL procedure template. If the -file option is missing the template will be printed to standard output. * obsMode: name of the observing mode to be called * paramList: parameters for the observing mode. A parameter specification consists of the parameter name followed by an equal sign (=) followed by the parameter value followed by a semicolon (;). More than one parameter specifications must be concatenated without white space in between. Please note that the "obsMode" must be followed by a "paramList". If there are no observation parameters specify an empty list by setting a single semicolon. === nice CSV files describing templates requests === CSV files can be converted to ''createTemplates'' format by using the script /home/pacs/cus/create_CCS_template_requests. The resulting records must be merged into old ''createTemplates'' file. A typical session with two CSV input files will look like |
Line 98: | Line 103: |
cd ~/mib/raw rm *.dat |
( echo ; cat 20051020A.csv ) | ../create_CCS_template_requests - | sort > a.tmp ( echo ; cat 20051020B.csv ) | ../create_CCS_template_requests - | sort > b.tmp cat b.tmp a.tmp createTemplates | sort -u -k 3,3 -k 4,4 > c.tmp sdiff -s -w5000 c.tmp createTemplates mv c.tmp createTemplates chmod a+x createTemplates rm {a,b}.tmp |
Line 101: | Line 111: |
Unzip the empty_mib_files.zip archive to make sure all necessary input files for the MIBingestion exists.[[BR]] Unzip the new PACS MIB archive. When asked to overwrite files select the option to overwrite all files.[[BR]] On the operational server the empty_mib_files.zip archive is in the parent directory. |
~- Notes: The scripe ''create_CCS_template_requests'' ignores the first line of input so a blank line is inserted with the ''echo'' command. -~ <<Anchor(checktemplates)>> == Recreating TCL template scripts and comparing with a previous release == Create a patch directory named ''CCS_template_scripts_update_YYYYMMDD'' if not created already in the previous section. Go to this directory. |
Line 108: | Line 120: |
unzip ../empty_mib_files.zip unzip yourPath/PACS_MIB_x_y.zip |
mkdir ~/cus/CCS_template_scripts_update_YYYYMMDD cd ~/cus/CCS_template_scripts_update_YYYYMMDD |
Line 111: | Line 123: |
Go to the parent directory and run MIBpreparation and MIBingestion. | Either use the '''createTemplates''' created in the previous section or copy the one from the last patch directory. {{{ # # BUT only if NO createTemplates files is created in the previous section # cp ~/cus/CCS_template_scripts_update_LastPatchDate/createTemplates . }}} Create all TCL template files by executing the ''createTemplates'' script. This will last some minutes. {{{ ./createTemplates }}} A first check for errors is the detection of empty TCL files. {{{ find . -size 0 }}} To compare these TCL template files with those generated by the previous patch |
Line 114: | Line 144: |
preparemib ~/mib/raw ~/mib ingestmib | & tee test-PACS-MIB-x-y.log |
./compareTCLtemplates.sh CURRENT_PATCH_DIR PREVIOUS_PATCH_DIR | grep -v identical |
Line 117: | Line 146: |
If the MIB contains new TC definitions to be used by CUS those definitions must be loaded by CUS.[[BR]] The problem is to know the new MIB version number to be used during loading. The "cus -listmibs" shall list MIB versions which have not been loaded yet. If there is only a line printed "New mibs available" but no numbers this means there are NO new MIBs. |
When there are files list as being different or missing then execute the following procedure step to transfer the TCL template scripts to the HPCSS. |
Line 124: | Line 149: |
In the statements below replace TBW with the MIB version number to be used listed with the "cus -listmibs" command. |
== Transferring TCL template scripts to the HPCSS == First print out the list of different of missing TCL template scripts. |
Line 127: | Line 153: |
cd ~/cus cus -listmibs cus -loadmib TBW <<EOF |& tee test-TBW.log MIB version TBW EOF |
./compareTCLtemplates.sh CURRENT_PATCH_DIR PREVIOUS_PATCH_DIR | grep -v identical | a2ps -1 -P printer |
Line 134: | Line 156: |
Congratulation, it's done. == Loading an update of CUS definitions (observation, building block, procedure): == Go to the directory where to place CUS files.[[BR]] Create the directory a patch directory and step into this directory.[[BR]] '''Don't''' use "patch1" but use a more verbose name.[[BR]] |
Put the special USB stick from Stijn into an USB port of the host hos4-d. Copy all TCL template scripts to an directory on the USB stick. '''Don't forget to umount the USB stick'''. |
Line 145: | Line 159: |
cd ~/cus mkdir patch1 cd patch1 |
cd CURRENT_PATCH_DIR mkdir /media/usb-storage-0904B2110E0009E5:0:0:0p1/PACS_TCL_UPDATE/ cp -v *tcl /media/usb-storage-0904B2110E0009E5:0:0:0p1/PACS_TCL_UPDATE/ su -c "/bin/umount /media/usb-storage-0904B2110E0009E5:0:0:0p1/" |
Line 149: | Line 164: |
Place the CUS definition text files in this directory. {{{ cp whatever . }}} Loading the CUS tables if there are any updates.[[BR]] Replace COMMENT with a real comment, FILE is the actual filename. The TABLE name is optional if missing the filename is used. {{{ cus -f -m "COMMENT" -uploadcal FILE [TABLE] }}} Load the CUS definitions (observing modes, building blocks, procedures) if there are any updates.[[BR]] Replace COMMENT with a real comment, FILE is the actual filename. {{{ cus -f -m "COMMENT" -import FILE }}} Congratulation, it's done. |
Contents
Updating the CUS database for IMT at Astrium
Procedure
- to update the PACS EQM IMT database with the CUS procedure definitions
- to update the PACS EQM IMT database with the CUS uplink table definitions
to recreate the CcsHandler template TCl scripts for the HPCSS
General:
Usually updates for the CUS database are received via email form where they have to be extracted to single files. The rest of this procedure descriptions assumes following file extensions.
- .txt for the CUS procedures (modes, blocks, ...)
- no extension (at least not .txt or .csv) for CUS uplink tables
.csv for CcsHandler "AOT" calls definitions
All commands below assume that you are logged using the pacs account on host hos4-d and that the psetup configuration has been executed.
ssh -X pacs@hos4-d psetup
All CUS patches are collected in the /home/pacs/cus directory tree.
Updating CUS procedures and tables
Go to the /home/pacs/cus directory and create a cus patch directory for today in the format patches_YYYYMMDD. When there is more than one patches append A,B ... to the date to distinguish them. Copy all new CUS procedures and uplink tables to this directory.
cd ~/cus mkdir patches_YYYYMMDD cd patches_YYYYMMDD cp fromeSomewhere .
Assuming that all CUS procedures file names and only those end with .txt following command is ingesting them to the database.
cus -f -m "XXXth update for EQM IMT" -import *.txt
Replace XXXth with the current ordinal number for this CUS update.
The same command is used to update the readonly database as well. Don't miss the parenthesis around the command otherwise your terminal session will be permamently configured to use this readonly database.
( readonlyCUS; cus -f -m "xxxth update for EQM IMT" -import *.txt )
Similar commands are used to ingest the uplink calibration tables.
cus -f -m "XXXth update for EQM IMT" -uploadcal tableFileName ( readonlyCUS; cus -f -m "XXXth update for EQM IMT" -uploadcal tableFileName )
As updates to the CUS procedures can change to number and order of the telecommand sequence of an observation mode the procedure step "Recreating TCL template scripts and comparing with a previous release" must be executed even if there are no updates in the parameters for the TCL template scripts.
Updating TCL template script requests
Create a patch directory named CCS_template_scripts_update_YYYYMMDD. Go to this directory.
mkdir ~/cus/CCS_template_scripts_update_YYYYMMDD cd ~/cus/CCS_template_scripts_update_YYYYMMDD
The way how to upgrade your TCL templates depends on the input from the operations group:
- voice or email describing changes to the requested observation parameters
- nice CSV files describing templates requests
Helmut's Exel sheet file (not described here)
voice or email describing changes to the requested observation parameters
Copy the createTemplates file from the last patch directory. Edit this file with your fauvorite editor.
cp ~/cus/CCS_template_scripts_update_LastPatchDate/createTemplates . xemacs createTemplates
The file consists of single records holding ccshandler commands to create the template TCL scripts.
- ccshandler -template [-file=fileName] obsMode paramList [-file=fileName]
Command options:
- -template: mandatory option to activate template generator mode
- -file: specifies the file name to store the resulting TCL procedure template. If the -file option is missing the template will be printed to standard output.
- obsMode: name of the observing mode to be called
- paramList: parameters for the observing mode. A parameter specification consists of the parameter name followed by an equal sign (=) followed by the parameter value followed by a semicolon (;). More than one parameter specifications must be concatenated without white space in between.
Please note that the "obsMode" must be followed by a "paramList". If there are no observation parameters specify an empty list by setting a single semicolon.
nice CSV files describing templates requests
CSV files can be converted to createTemplates format by using the script /home/pacs/cus/create_CCS_template_requests. The resulting records must be merged into old createTemplates file.
A typical session with two CSV input files will look like
( echo ; cat 20051020A.csv ) | ../create_CCS_template_requests - | sort > a.tmp ( echo ; cat 20051020B.csv ) | ../create_CCS_template_requests - | sort > b.tmp cat b.tmp a.tmp createTemplates | sort -u -k 3,3 -k 4,4 > c.tmp sdiff -s -w5000 c.tmp createTemplates mv c.tmp createTemplates chmod a+x createTemplates rm {a,b}.tmp
Notes: The scripe create_CCS_template_requests ignores the first line of input so a blank line is inserted with the echo command.
Recreating TCL template scripts and comparing with a previous release
Create a patch directory named CCS_template_scripts_update_YYYYMMDD if not created already in the previous section. Go to this directory.
mkdir ~/cus/CCS_template_scripts_update_YYYYMMDD cd ~/cus/CCS_template_scripts_update_YYYYMMDD
Either use the createTemplates created in the previous section or copy the one from the last patch directory.
# # BUT only if NO createTemplates files is created in the previous section # cp ~/cus/CCS_template_scripts_update_LastPatchDate/createTemplates .
Create all TCL template files by executing the createTemplates script. This will last some minutes.
./createTemplates
A first check for errors is the detection of empty TCL files.
find . -size 0
To compare these TCL template files with those generated by the previous patch
cd .. ./compareTCLtemplates.sh CURRENT_PATCH_DIR PREVIOUS_PATCH_DIR | grep -v identical
When there are files list as being different or missing then execute the following procedure step to transfer the TCL template scripts to the HPCSS.
Transferring TCL template scripts to the HPCSS
First print out the list of different of missing TCL template scripts.
./compareTCLtemplates.sh CURRENT_PATCH_DIR PREVIOUS_PATCH_DIR | grep -v identical | a2ps -1 -P printer
Put the special USB stick from Stijn into an USB port of the host hos4-d. Copy all TCL template scripts to an directory on the USB stick. Don't forget to umount the USB stick.
cd CURRENT_PATCH_DIR mkdir /media/usb-storage-0904B2110E0009E5:0:0:0p1/PACS_TCL_UPDATE/ cp -v *tcl /media/usb-storage-0904B2110E0009E5:0:0:0p1/PACS_TCL_UPDATE/ su -c "/bin/umount /media/usb-storage-0904B2110E0009E5:0:0:0p1/"