Workshop-Specific Instructions

The following comprises workshop-specific instructions and details for the 2003 LDM Training Workshop.


Create the LDM user-account

$ sudo /usr/sbin/useradd -d /usr/local/ldm -g workshop -m -s /bin/bash ldm
$ sudo passwd ldm
Changing password for user ldm.
New password: ************
Retype new password: ************
passwd: all authentication tokens updated successfully.

For reference, see LDM Basics: LDM user.


Create directories for data-files and LDM logfiles

Because user's home-directories aren't backed-up on the workshop computers, there is no need to perform this step. Skip it.


Edit file /etc/syslog.conf

Ensure that LDM log-messages are not written to the system logfile by adding "local0.none" to the line

*.info;mail.none;authpriv.none;cron.none  /var/log/messages
changing it to
*.info;mail.none;authpriv.none;cron.none;local0.none  /var/log/messages

Ensure logging of LDM messages by adding the following line anywhere:

local0.debug  /usr/local/ldm/logs/ldmd.log

Edit the LDM user's profile-file

Add the following lines to the file $HOME/.bash_profile:

export LDMHOME=$HOME
export PATH=$HOME/decoders:$HOME/util:$HOME/bin:$PATH
export MANPATH=$HOME/man:/usr/share/man

Build and Install the Distribution

$ cd $VERSIONDIR/src
$ make distclean
...
$ ./configure &>configure.log
$ less configure.log
$ make &>make.log
$ less make.log
$ make install &>install.log
$ less install.log
$ sudo make install_setuids
...
$ make clean
...

Vet the ldmadmin script

The only variable that needs to be modified is pq_size.

Because we are going to receive only the IDS|DDPLUS and NNEXRAD data-feeds, the product-queue creation-parameters should be the following:

size       = (1 h) * (16 MB/h + 170 MB/h)= 186 MB
maxNumProd = (1 h) * (16000/h + 18000/h) = 34000
(See, for example, Thelma's data-volume summary webpage.) Thus, the pq_size assignment-statement should be the following:
$pq_size = "186000000 -S 34000";

Request authorization at the upstream LDM

Add the following entry to the file $HOME/etc/ldmd.conf to allow all workshop LDM-s to obtain data from any workshop LDM:

ALLOW	ANY	workshop[0-9][0-9]\.ucar\.edu

For reference, see LDM Basics: ldmd.conf.


Edit the LDM configuration-file, etc/ldmd.conf

Add the following entry to the LDM configuration file, ldmd.conf, to request the IDS|DDPLUS and NNEXRAD data-feeds:

REQUEST	IDS|DDPLUS	.*	workshopnn.ucar.edu	PRIMARY
REQUEST	NNEXRAD		.*	workshopnn.ucar.edu	PRIMARY
where workshopnn is the name of the workshop computer that will be upstream of yours (which will be decided during the class).

For reference, see LDM Basics: ldmd.conf.


Edit the pqact configuration-file, etc/pqact.conf

Because we will only process data-products of the IDS|DDPLUS data-feed, have the following entry be the only active one in the configuration-file:

IDS|DDPLUS
	^(..)(..).. .... (..)(..)
	FILE
	data/IDS_DDPLUS/\1/\2/(\3:yyyy)(\3:mm)(\3:dd)T\4.txt
Remember to start the continuation-lines with a tab character.

For reference, see LDM Basics: pqact.conf.


Edit the scour configuration-file, etc/scour.conf

Have the following entry be the only active one in the configuration-file:

data/IDS_DDPLUS 2
This will remove all files in the data directory hierarchy that are more than two days old.

For reference, see LDM Basics: scour.conf.


Ensure that the LDM is started at boot-time

Create the boot-time script by executing the following commands via cut-and-paste:

sudo sh -c 'cat >/etc/init.d/ldmd' <<'EOF'
export PATH=/bin:/usr/bin:/usr/sbin
LDMADMIN=/usr/local/ldm/bin/ldmadmin

case "$1" in

start)
    if [ -x $LDMADMIN ] ; then
	$LDMADMIN queuecheck >/dev/null 2>&1 || {
	    echo "Corrupt LDM product-queue.  Recreating."

	    /bin/su - ldm -c "$LDMADMIN delqueue"
	    /bin/su - ldm -c "$LDMADMIN mkqueue"
	}

	echo 'Starting LDM using "ldmadmin start".'

	/bin/su - ldm -c "$LDMADMIN clean"
	/bin/su - ldm -c "$LDMADMIN start"
    fi
    ;;

stop)
    if [ -x $LDMADMIN ] ; then
	/bin/su - ldm -c "$LDMADMIN stop"
    fi
    ;;

esac
EOF
sudo chmod +x /etc/init.d/ldmd

Create the necessary symbolic links to the above script by executing the following commands via cut-and-paste:

(cd /etc/rc3.d;
    sudo ln -s ../init.d/ldmd S99ldmd; sudo ln -s ../init.d/ldmd K01ldmd)
(cd /etc/rc5.d;
    sudo ln -s ../init.d/ldmd S99ldmd; sudo ln -s ../init.d/ldmd K01ldmd)