LDM Configuration/Setup

Obtain source(s) of data feed(s)

First, find out who your upstream feed site(s) will be. If you don't know, then contact the Unidata Program Center at <support-idd at unidata.ucar.edu> with the following information:

Note that you can have a primary upstream site as well as an alternate upstream site for any given data feed.

Edit the file etc/ldmd.conf

This file tells an LDM what to do on startup. Several things that you should or might have in this file -- depending on your exact situation -- are.

Request authorization by upstream site(s)

Ask the administrator(s) of the LDM(s) at the upstream site(s) to add "allow" entries for your LDM to their LDM's ldmd.conf file. For example,

      allow UNIDATA  your.ldm.host
      allow NLDN  your.ldm.host
    

To verify that the upstream authorization is in place, execute the following command:

      notifyme -vl - -h upstream-site
    

This should print a list of products that the upstream site is receiving and that your LDM is allowed to receive.

Edit the file etc/pqact.conf

This file tells the pqact utility how to locally process incoming data products. Options include filing the data product, executing a local program, and piping the data product to the standard input of a local program. If you're not going to process data products locally, then you don't need to edit this file.

For a detailed explanation about configuring this file, consult the chapter on pqact Configuration. Start with the pqact.conf file in the LDM distribution, and modify it to meet your needs. After any modification, check that the syntax of the file is correct by executing the following command:

      ldmadmin pqactcheck
    

Edit the LDM-user's crontab(1) file

Edit the crontab(1) file of the LDM-user by executing the command crontab -e as the LDM-user. Then:

Activate the just-installed LDM

  1. Go to the LDM installation directory:
  2. 	    $ cd $LDMHOME
          
  3. Stop the currently-running LDM, if necessary:
  4. 	    $ ldmadmin stop
          
  5. Switch the runtime symbolic link to the just-installed LDM (where $VERSIONDIR is the version-dependent subdirectory of the just-installed LDM.):
  6. 	    $ rm runtime && ln -s $VERSIONDIR
          
  7. Start the LDM
  8. 	    $ ldmadmin start
          
  9. Make sure the LDM is working
  10. 	    $ ldmadmin watch
          

We like to combine the above steps to minimize the time that the LDM is off-line:

	    $ cd $LDMHOME && ldmadmin stop && rm runtime && ln -s $VERSIONDIR
	    && ldmadmin start && ldmadmin watch
    

Ensure that the LDM is started at boot-time

Although boot-time start-up procedures vary amongst operating systems, each can be tailored to start the LDM. It is best to start the LDM as late as possible to avoid interfering with processes that could hang the system (e.g., the syslog daemon). One possible LDM script is:

p>
      export PATH=/bin:/usr/bin:/usr/etc:/usr/ucb
      LDMADMIN=/home/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"
            #  /bin/su - ldm -c "$LDMADMIN delsurfqueue"
            #  /bin/su - ldm -c "$LDMADMIN mksurfqueue"
	        }
        	echo 'Starting LDM using "ldmadmin start".'

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

Consult the documentation on your operating system or with your system administrator for the details on how to incorporate this script (or something similar) into the boot-time start-up procedure of your system.