注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

阿弥陀佛

街树飘影未见尘 潭月潜水了无声 般若观照心空静...

 
 
 

日志

 
 
关于我

一直从事气象预报、服务建模实践应用。 注重气象物理场、实况场、地理信息、本体知识库、分布式气象内容管理系统建立。 对Barnes客观分析, 小波,计算神经网络、信任传播、贝叶斯推理、专家系统、网络本体语言有一定体会。 一直使用Java、Delphi、Prolog、SQL编程。

网易考拉推荐

Configuring an LDM Installation  

2012-03-13 22:48:44|  分类: LDM |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

If you already have a previous version of the LDM installed and working, then you can probably skip these steps.

Steps

  1. Vet the LDM registry

  2. Obtain upstream data-feeds

  3. Request authorization at the upstream LDM

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

  5. Edit the pqact configuration-file, etc/pqact.conf, if appropriate

  6. Edit the scour configuration-file, etc/scour.conf, if appropriate

  7. Edit the LDM user's crontab(1) file

  8. Ensure email forwarding

  9. Ensure that the LDM is started at boot-time


Vet the LDM registry

Make any necessary changes to the configuration-parameters in the LDM registry. If this is your first installation, then pay particular attention to the parameters /hostname, /reconciliation-mode, /queue/size, and /queue/slots. These parameters can be set via the regutil(1) utility.

If you are upgrading an existing LDM installation or are planning to use the GEMPAK or McIDAS decoders, then make sure that the data directory printed by the command "regutil /pqact/datadir-path" is the same as the current working directory assumed by the scour configuration-file, and the pqact configuration-file.

Workshop-specific instructions.


Obtain upstream data-feeds

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

  • The name of your site (e.g., University of Elbonia, Mud Science Center)
  • The LDM administrator's
    • Name
    • Phone number
    • Email address
  • The fully-qualified hostname of the computer that will run the LDM
  • Desired feedtypes.
Note that you can (and probably should) have two upstream hosts for any given data-feed.

Request authorization at the upstream LDM

Ask the administrator of the upstream LDM to add ALLOW entries for your LDM to the upstream LDM's configuration-file, ldmd.conf. For example,

ALLOW UNIDATA  your.ldm.host ALLOW NLDN  your.ldm.host 

Workshop-specific instructions.


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

This file tells an LDM what to do on startup. Possibilities include executing programs, requesting data, and authorizing connections. The default file that comes with the distribution contains examples. More information on this configuration-file can be found on the ldmd.conf webpage.

Here are some examples:

  • REQUEST entries for your upstream LDMs. For example

    REQUEST  ANY  ".*"  host1.site1.edu         # initially primary-mode REQUEST  ANY  ".*"  host2.site2.edu         # initially alternate-mode 

    For a given feedtype and data-product identifier ERE, you may have more than one such request. You should ensure, however, that the set of data-products referenced by every feedtype/pattern pair is either identical to that of other pairs or completely disjoint from them. So, for example, don't do this

    REQUEST  UNIDATA  ".*"  host1.site1.edu REQUEST  ANY      ".*"  host2.site2.edu       # overlaps previous 
    or this
    REQUEST  IDS|DDPLUS  ".*"   host1.site1.edu REQUEST  IDS|DDPLUS  "^SA"  host2.site2.edu   # overlaps previous 

    For a given LDM, a trade-off exists between data-product latency and CPU load. This trade-off can be controlled to some extent by the number of REQUEST entries to a given upstream LDM. For more information, see the ldmd.conf webpage.

  • ALLOW entries to authorize certain downstream LDMs to receive certain data-products from your LDM. For example

    ALLOW  ANY-NLDN-WSI-PCWS-NOGAPS  \.edu$ ALLOW  IDS|DDPLUS                \.com$  ^SA  ^SAUS 
    For more information, see the ldmd.conf webpage.
  • An EXEC entry for pqact, if you want to save arriving data-products in a file or process them in some way. For example

    EXEC "pqact"        

    Note that you might have more than one such EXEC entry if, for example, you use the pqact configuration-files that come with the GEMPAK or McIDAS packages. For example

    # Exec GEMPAK specific pqact(1) processing EXEC "pqact -f NNEXRAD /usr/local/ldm/etc/GEMPAK/pqact.gempak_nexrad" EXEC "pqact -f ANY-NNEXRAD /local/ldm/etc/GEMPAK/pqact.gempak_decoders"        
  • An EXEC entry for rtstats if the LDM is a member of the Unidata IDD and is a gateway LDM for your institution. LDM statistics are the best way to monitor IDD performance and to identify problems. It is, therefore, crucial that all gateway LDM-s on the IDD report statistics. Also, data on LDM statistics is vital in preparing reports used to obtain funding to support the LDM system.

    IDD statistics are displayed on the IDD rtstats webpages.

  • EXEC entries for ingesting data-products from a NOAAPORT receiver -- if you built the LDM package to support this.

Workshop-specific instructions.


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

This file tells the pqact utility how to locally process various classes of data-products. Processing actions 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.

More information on this configuration-file.

  • Configuring for Unidata Decoders
  • Configuring for GEMPAK
  • Configuring for McIDAS

    Workshop-specific instructions.


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

    This file tells the scour utility what old files should be deleted and when to delete them. This is useful if a pqact process is saving data-products as local files; and you want to keep only the most recent files to prevent the file system from becoming full. If you're not doing this, then you probably don't need to edit this file.

    More information on this configuration-file.

    Workshop-specific instructions.


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

    Edit the crontab file of the LDM-user by, for example, executing the command

    crontab -e
    as the LDM-user. Then
    • Add an entry to rotate the LDM logfiles by starting a new logfile every day at midnight, changing the names of the old logfiles, and ensuring that the number of logfiles doesn't grow without bound:

      0 0 * * * bash -l -c 'ldmadmin newlog'
      More information on rotating logfiles.
    • Add an entry to purge old files if necessary. If you are executing the pqact utility to decode incoming data-products into local files, then add an entry like the following to purge outdated files so that your disk doesn't become full:

      0 1,4,7,10,13,16,19,22 * * * bash -l -c 'ldmadmin scour'
      The above runs the scour program to remove too-old files every three hours. You might choose different times.
    • Add an entry to accumulate performance metrics on the LDM system if you wish and have the necessary utilities installed:

      0,5,10,15,20,25,30,35,40,45,50,55 * * * * bash -l -c 'ldmadmin addmetrics'
      This entry will accumulate metrics every 5 minutes. You might choose a different interval. See Monitoring the LDM System/Metrics.
    • Add an entry to rotate the metrics data files if you are accumulating metrics:

      0 0 * * 0 bash -l -c 'ldmadmin newmetrics'
      This entry will rotate the metrics data files at the beginning of each week. You might choose a different period. See Monitoring the LDM System/Metrics.
    • Add an entry to periodically check the LDM system:

      0,15,30,45 * * * * bash -l -c 'ldmadmin check >/dev/null'
      This entry will check the LDM system every 15 minutes and send an email to the LDM user if the system isn't OK. You might choose a different interval.

      In particular, this entry will notify the LDM user if a data-product hasn't been received in the past number of seconds given by the /insertion-check-interval parameter in the LDM registry (to see that value, execute the command regutil /insertion-check-interval).

    • If you intend to ingest data-products from a NOAAPORT receiver, then you should read the section on logging in the NOAAPORT ingestion webpages.

    NOTE: These examples

    1. Assume that the LDM user uses the bash(1) shell; and
    2. Use the -l option to obtain the LDM user's login environment.
    You might have to do something different in order to obtain the same results.

    Workshop-specific instructions.


    Ensure email forwarding

    Email for the LDM user can be generated by a crontab(1) entry or by someone trying to contact the LDM administrator at a site. Consequently, you should ensure than any email sent to the LDM user is forwarded to a responsible person. On most UNIX?-like systems (on which the sendmail(8) daemon is used to deliver email) this is done by having a line like the following:

    user@host 
    in the file .forward in the LDM user's home-directory. This file must also be be owned by the LDM user and be world-readable. For security, this file should not be writable by anyone other than the LDM user.

    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 in the boot process to avoid interfering with processes that could hang the system (e.g., the syslog daemon). One possible LDM script is:

    export PATH=/bin:/usr/bin  LDMHOME=/usr/local/ldm LDMBIN=$LDMHOME/bin LDMADMIN=$LDMBIN/ldmadmin PQCHECK=$LDMBIN/pqcheck PQCAT=$LDMBIN/pqcat PQ=$LDMHOME/data/ldm.pq LOG="logger -p local0.err $0:"  case "$1" in  start)     $LOG 'Starting LDM system...'     if [ -x $LDMADMIN ] ; then  if su - ldm -c "$LDMADMIN isrunning"; then             $LOG "LDM system is already running."  else      if [ ! -f $PQ ] ; then   $LOG "Product-queue doesn't exist.  Creating..."   if ! su - ldm -c "$LDMADMIN mkqueue"; then       $LOG "Aborting..."       exit 1   fi      else   #   # Test the product-queue for corruption.   #   if ! $PQCHECK -l /dev/null -q $PQ; then       case $? in       1)  $LOG "System error checking product-queue.  Aborting..."    exit 1    ;;       2)  $LOG "Adding writer-counter to product-queue..."    if ! $PQCHECK -F -q $PQ; then        $LOG "Aborting..."        exit 1    fi    ;;       3)  $LOG "Product-queue was incorrectly closed.  " \        "Checking..."    if $PQCAT -s -l /dev/null; then        $LOG "Product-queue appears OK. "        $LOG "Clearing writer-counter..."        if ! $PQCHECK -F -q $PQ; then     $LOG "Couldn't clear counter.  Aborting..."     exit 1        fi    else        $LOG "Product-queue appears corrupt.  Deleting."        rm $PQ        if ! su - ldm -c "$LDMADMIN mkqueue -f"; then     $LOG "Couldn't make new product-queue.  Aborting..."     exit 1        fi    fi    ;;       4)  $LOG "Product-queue is corrupt.  Deleting."    rm $PQ    if ! su - ldm -c "$LDMADMIN mkqueue -f"; then        $LOG "Couldn't make new product-queue.  Aborting..."        exit 1    fi    ;;       esac   fi      fi      su - ldm -c "$LDMADMIN clean"      su - ldm -c "$LDMADMIN start"  fi     fi     ;;  stop)     $LOG 'Stopping the LDM system.'     if [ -x $LDMADMIN ] ; then         su - ldm -c "$LDMADMIN stop"     fi     ;;  esac 

    Note that some user-shells do not conform to the the UNIX standard and will not understand the "if ! ..." expressions in the above (e.g., SunOS 5.8's /bin/sh). You can test your user-shell with the following command:

    if ! false; then echo OK; fi 

    Instead of using the logger utility as above, you might wish to use something else (e.g., the echo utility) -- depending on your operating system. Note that the -p option is system-dependent.

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

    Workshop-specific instructions.


  •   评论这张
     
    阅读(752)| 评论(0)
    推荐 转载

    历史上的今天

    在LOFTER的更多文章

    评论

    <#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    页脚

    网易公司版权所有 ©1997-2017