Dashboard > Accelerator Software > Home > LCLS Production Cheat Sheet
  Accelerator Software Log In View a printable version of the current page.  
  LCLS Production Cheat Sheet
Added by Greg White, last edited by Greg White on Sep 15, 2008  (view change)
Labels: 
(None)

DRAFT

Servers

lcls-builder for building and releasing software
lcls-srv01 for running interactive applications, like SEAL, matlab etc
lcls-daemon1 yea, what is this for?

Accounts

physics
softegr
iocegr
physics and softegr will ask you whether you want to use a profile in your name, mainly for storing matlab preferences.

LCLS Network

Control room environment

login as physics

Software release

Define the following environment variable

export CVSROOT=:ext:<username>@lcls-prod02:/afs/slac/g/lcls/cvs/

Changing some software

The process is to cehck it out of cvs into some area of your own choosing. Then edit it, and commit it back into cvs. Then update the release area with your changed software.
cvs co -d $CVSROOT <module> or pathname
make your changes
cvs commit -m "your comment"

[softegr@lcls-builder ~]$ cd $LCLS_ROOT
[softegr@lcls-builder lcls]$ cvs co tools/script/aidalistI.sql
greg@lcls-prod02's password: 
U tools/script/aidalistI.sql

Q: tags? What's tag syntax

Key environment vars

LCLS_ROOT
LCLS_ ...
others

Logging into LCLS CA (lcls production)

Connect to lcls-builder, from AFS, go through a DMZ machine like lcls-prod02. Eg

ssh -lgreg lcls-prod02
ssh -lsoftegr lcls-builder

Directories

Note that to change software in these directories you must be logged in as the user (physics, or softegr etc) that owns the directory, or you won't be able to do the cvs update.
epics/:
package/:
physics/:
physics/package/:
rtems/:
${LCLS_ROOT}/tools/: mainly configuration files and scripts for executables hosted in other
directories, like epics/extensions, physics/package etc.
$LCLS_ROOT/tools/script/: executable and sourced scripts dumping ground.
Data files go in $LCLS_DATA.

Data Area

Data area is defined by $LCLS_DATA.
On CA network, this is

/u1/lcls/

The data area is mounted on lcls-prod02 as

/mccfs2/u1/lcls/

The data area is available on the (SLAC only) web at: http://mccas0.slac.stanford.edu/u1/lcls/

Copying files from AFS to LCLS CA

To Copy files from AFS to LCLS CA you must PULL to CA (eg lcls-builder) from lcls-prod02, since firstly the AFS filesystem is not available on lcls-builder, secondly SCCS PUB network machines (loosely also called "AFS") cannot be logged into directly from machines on LCLS CA (like an OPI or lcls-builder), and thirdly the SSH authentication tickets and tokens for individuals are not set up in the LCLS CA machines. So, you have to pull to an LCLS CA machine's NFS filessytem, from the AFS filesystem. E.g.

Log in as softegr on lcls-builder:

[softegr@lcls-builder conf]> $ pwd
/usr/local/lcls/physics/package/aida/conf
[softegr@lcls-builder conf]> $ scp greg@lcls-prod02:/afs/slac/g/cd/soft/ref/package/aida/common/script/aidaSetEnv.csh .

The "." is important - it means copy to here with the same name.

Copying files from LCLS CA to AFS

To Copy files from LCLS CA to AFS you must PULL to lcls-prod02, from CA (eg lcls-srv01). E.g.

Log in with your AFS account on lcls-prod02:

kinit (giving your password)
[lcls-prod02]:u/cd/greg> scp physics@lcls-srv01:greg/tmp/xalcheck/checkDevices.out .

The "." is important - it means copy to here with the same name.

Scripts

How to determine whether a script is executing in development or LCLS Production.

Courtesy of Jingchen.

if [ -d /afs/slac/g/lcls ]; then
        # must be a host on the public networks, 
        # then you can go on to use, e.g., $HOSTNAME (or other criteria
        # like IP) to determine if it is on DMZ       
        if [ -z `echo $HOSTNAME | grep lcls-` ]; then
		# must be a AFS host but on other public networks
	else
		# must be a AFS host on DMZ
	fi
elif [ -d /usr/local/lcls ]; then
	# must be a host on the CA network  
else
        echo "ERROR: this ${HOSTNAME} is not supported for LCLS dev/prod" 
        exit 1
fi

Aida on LCLS Production

The necessary jar files for running Aida on LCLS CA are in:

/usr/local/lcls/physics/package/{aida,err,except}/lib/*.jar

The URL of the Aida NameServer IOR file, as visible from the LCLS CA network, is:

http://mccas0.slac.stanford.edu/aida/NameServer${AIDA_MODE}.ior

where AIDA_MODE must be valued "DEV" or "PROD". For production data, this will be PROD.

CVS Examples

Removing a file from CVS.

Remove with cvs remove

[softegr@lcls-builder script]$ cvs remove aidalistI.sql
greg@lcls-prod02's password: 
cvs remove: scheduling `aidalistI.sql' for removal
cvs remove: use 'cvs commit' to remove this file permanently
[softegr@lcls-builder script]$ cvs commit -m "moved to tools/oracle" aidalistI.sql

Naming

Henrik's MAD - EPICS - SLC name translator, is here in CVS:
http://www.slac.stanford.edu/cgi-wrap/cvsweb/matlab/toolbox/model_nameConvert.m?cvsroot=LCLS

Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.8 Build:#814 Oct 02, 2007) - Bug/feature request - Contact Administrators