# # $Id: nbspd.conf,v 1.40 2006/02/28 19:55:19 nieves Exp $ # # Sample configuration file for nbspd # # This configuration file uses the tcl language. # All options are commented out by the three '###' symbols. # What they show are the default values hard-coded in the program. # The default setting of the multicast ip's and ports are equivalent # to the setting below. To disable some channels, modify the list to # include only those wanted. # ### set multicastip "224.0.1.1 224.0.1.2 224.0.1.3 224.0.1.4" ### set multicastport "1201 1202 1203 1204" # By default, the interface to use is chosen by the kernel. In a # multihomed machine, the interface to use can be specified either by # its ip address, e.g., # # set ifip "192.168.12.100" # # or by its name, e.g. # # set ifname "xl0" (or "fxp0", etc) # ### set ifname "" ### set ifip "" # In FreeBSD the default is 65 kb and the maximum is 224 kb. # In linux the defauilt is around 86 kb and the maximum 262 kb. # In windows the default can be as low as 8 kb, so a setting like # # set udprcvsize [expr 256 * 1024] # # would be more reasonable. A setting <= 0 leaves the OS default. # ### set udprcvsize -1 # The default umask # ### umask 022 # Directory where the received (unpacked) product files are saved # before being passed to the filters. # ### set spooldir "/var/noaaport/nbsp/spool" # Directory where the fifo (device) files used by the filters are placed, # and the external (user) filters. # ### set devdir "/var/noaaport/nbsp/dev" # The list of filters distributed with the program: # the rad-sat-text (rst) filter, the digatmos filter, and the gempak filter. # The filters that are enabled by default are the rstfilter and dafilter. # The emwin filter includes the functionality # of the rstfilter, but the emwin server is not enabled by default. # Use this list only if you do not enable the emwin server, otherwise # you would end up calling the rstfilter twice. # ### set filterlist "/usr/local/libexec/nbsp/rstfilter:\ /usr/local/libexec/nbsp/dafilter:\ /usr/local/libexec/nbsp/gpfilter" # Use this list if the emwin server is enabled (by setting the servertype # variable below). # ### set filterlist "/usr/local/libexec/nbsp/dafilter:\ /usr/local/libexec/nbsp/gpfilter" # If the nntp gateway is configured (e.g. inn), this enables the nntp filter # ### set filterlist "/usr/local/libexec/nbsp/dafilter:\ /usr/local/libexec/nbsp/gpfilter:\ /usr/local/libexec/nbsp/nntpfilter" # The filter called by the emwin server. The filter calls the rst filter # and then does some further processing. If the emwin server is not enabled # the rst filter can be called independently by including it in the # filterlist above. # # set emwinfilter "/usr/local/libexec/nbsp/emwinfilter" # If the emwin server is enabled, setting this variable to 0 # causes the server to not invoke the emwin and rst filters # when there are no connections. The default is to invoke the filters # always so that the file is processed by the rst filter even when # there are no clients to transmit it. # ### set emwinfilteralways 1 # The pid and the status (statistics) file # ### set pidfile "/var/run/nbspd.pid" ### set statusfile "/var/noaaport/nbsp/nbspd.status" # The internal state fifo file and its mode # ### set statefifo "/var/noaaport/nbsp/nbspd.fifo" ### set statefifomode 0644 # The file creation mode of the products and the subdirectories # where the products are saved (expressed here in octal form) # ### set productmode 0644 ### set subdirmode 0755 # How often to re-compute the statistics saved in the status file (in seconds) # ### set statsperiod 60 # Which server to spawn. The default is none, so the program does not # redistribute anything. The other values are 4 for emwin protocol, # or 1 or 2 for the native NBS1, NBS2 protocols, or any combination of # the three. With NBS1 the full content of the file is transmitted # (similar to emwin) and with NBS2 only the file path information # is transmitted (the same information sent to the filters). # If the emwin server is enabled, the emwin filter rc file must also be # installed. # ### set servertype 0 # port to listen for network clients # ### set serverport 1000 # A value of -1 here allows an unlimited number of network clients. # ### set maxnetclients -1 # Seconds waiting for broadcast before an error message is written # ### set rdbroadcastimeout 120 # Milliseconds to wait writing to a filter fifo # ### set wrfifotimeout 500 # Milliseconds to wait while writing to network clients # ### set wrclienttimeout 1000 # Milliseconds to wait reading from the queue (filter and server) # ### set rdqueuetimeout 1000 # Milliseconds to wait reading from the processor queue # ### set rdprocqueuetimeout 1000 # The block size parameter for the memory IO files that are used # to save the incoming frames prior to being processed, and the initial # size allocated for the file. The blocksize should # be set to something around the average size of a frame, and the minimum # size should be such that most of the products transmitted fit in it. # (Both sizes are in bytes.) # ### set memfileblocksize 2048 ### set memfileminsize 131072 # Maximum size of any channel of the filter/server queue, # and how often (in secs) to report when the size is exceeded. # Reaching the soft limit generates a warning. The hard limit is an # absolute maximum. Either or both can be disabled by setting them to 0. # (Size here refers to the number of elements in the queue, not the byte size.) # Each entry in the queue occupies about 20 + strlen(full path) bytes, about # 80 bytes total. # ### set queuemaxsoft 4096 ### set queuemaxhard 0 ### set qrepquotaperiod 60 # These numbers operate similar to the soft and hard # quotas for the DB queues. The second pair of numbers are given # in terms of the memory of the pctl (the sizes are in mb), and # both pairs are used. The last number determined how often (in secs) # to sync the mf db. # ### set pctlmaxsoft 2048 ### set pctlmaxhard 0 ### set pctlmaxmemsoft 128 ### set pctlmaxmemhard 0 ### set pctlsyncperiod 3600 # The directory containg the db queue files, the db memory cache size (in Mb) # and the file creation mode. # ### set dbhome "/var/noaport/nbsp/db" ### set dbcachemb 16 ### set dbfilemode 0644 # The name of the db files of the filter and network server queues # (without the extension), and of the processor queues. # ### set qdbfname "q" ### set pctldbfname "pctl.db" ### set pctlmfdbfname "pctlmf.db" # The file that holds the spool files database. # ### set nbspdbfname "nbsp.db" # The next four parameters control the configuration in slave mode. # A slave mode of zero (default) is the master configuration. # In mode 1 (nbs slave) the entire file content is transmitted, # while in 2 (fpath slave) only the location (full path) of the # file is transmitted (requires NSF setup). # There is no default master host set. If slavemode is set to 1 or 2, the # mastername parameter must set also. # ### set slavemode 0 ### set mastername "" # The default port to connect to the master in slave mode, the # reading timeout and reconnect waiting period (in seconds). # ### set masterport 1000 ### set rdslavetmout 10 ### set reopenslavetmout 2 # The next two parameters are the strings that hold the regular expressions # for the accept and reject filters. In the default configuration nothing # is set, which means that everything is accepted and saved in the spool # directory. # # The algorithm works as follows. First the accept RE is checked. # If the accept RE is NULL, then every product # becomes a _candidate_ for acceptance. If the accept is the empty string, # nothing is accepted. If the accept RE is non-null and non-empty, # then it is used and a product becomes a candidate only if its file name # matches the RE. Secondly the reject is checked. If it is NULL or empty, # all candidates pass and are saved, otherwise the reject RE is applied # and all those product candidates whose file name match it are then rejected. # The special string "*", is a match-all pattern and the empty string "" # is a match-none pattern (for both the accept and reject patterns). # Some examples are given below. # # In the default configuration, most RE parameters (with the exceptions noted # below) are not set (they are NULL), so everything matches. # ### set acceptpatt ### set rejectpatt # The next parameters are similar, but they control what products the # prcessor sends to the filter and the server queues for postprocessing # and distribution. # ### set filterqacceptpatt ### set filterqrejectpatt ### set serverqacceptpatt ### set serverqrejectpatt # The next parameters are similar, but they control what products are # distributed to clients. # ### set nbsacceptpatt ### set nbsrejectpatt ### set emwinacceptpatt ### set emwinrejectpatt # Files with names matching this pattern are saved in the spool directory # in compressed form if they are transmitted in that form # (e.g., radar data, sat images). To uncompress those files on the fly, use # set savezacceptpatt "" # However, a beter alternative is to leave the uncompression for the # postprocessing phase by the filters. # # ### set savezacceptpatt "_(sdus[2357]|tig)" # A record of the received files can be kept in a db to monitor # retransmissions and avoid processing duplicate files. The db # operations can be expensive so inserting all records can be degrade # performance more than help. This filter can be configured so that only # certain files are monitored for retransmissions. The files placed here # should be those for which the cost of reprocessing is more than # the overhead of the db management. The default is to insert everything, # which means that retransmissions are not reprocessed if the original file # was received well. # # set nbspdbacceptpatt # set nbspdbrejectpatt # # For example, to monitor the retransmission of only grib and bufr files, # a setting like # set nbspdbacceptpatt {\+(grib|bufr)} # can be used. # # examples # # To acept files only from the San Juan station # ### set acceptpatt "tjsj" # To accept only from the national hurricane center # ### set acceptpatt "knhc" # To accept only from both of these (the character in the middle is # a vertical bar "|" # ### set acceptpatt "tjsj|knhc" # To accept everything except one station, leave acceptre unset, # and then # ### set rejectpatt "kwal" # To accept only from stations with names starting with kw, but # rejecting "kwal" # ### set acceptpatt "kw" ### set rejectpatt "kwal" # An alternative to setting the values of those strings directly here # is to read them from an external file using a tcl construct such as # ### set acceptpatt [exec cat "/usr/local/etc/nbsp/noaaport.accept"] ### set rejectpatt [exec cat "/usr/local/etc/nbsp/noaaport.reject"] # # Directories containing the local overrrides # set nbspdconfdir "/usr/local/etc/nbsp" set nbspdlocalconfdirs [list $nbspdconfdir/defaults $nbspdconfdir/site]; # Read the local overrides set _confname "nbspd.conf"; foreach _d $nbspdlocalconfdirs { set _localconfname ${_d}/${_confname} if {[file exists ${_localconfname}] == 1} { source ${_localconfname}; } } unset _d; unset _confname; unset _localconfname;