pqing, dds, pps, ddplus, ids, hds, afos − product queue ingester for Unidata LDM |
pqing [-5cFnvx] [-b baud] [-f feedtype] [-l logdest] [-q q_path] [-p parity] [-r rawfile] [-s size] feedname |
This program performs real-time capture of meteorological data into an LDM product queue (see pq(3)). It is part of the Unidata Local Data Management system (LDM). The input data is assumed to be in the form of ‘‘meteorological messages’’ specified by the World Meteorological Organization in WMO Publication 386 (‘‘WMO format’’), or in AFOS format. It reads from feedname looking for messages. Each message is encapsulated as a ‘‘data product’’ and the WMO header or AFOS identifer is assigned as the product’s identifying key. The product is then inserted at the end of the specified product queue for further processing. The product queue should already exist (see pqcreate(1)). This program is typically run in the background with a local ldmd(1) server (OR pqsend(1)) to supply input to a distribution tree. Multiple instances of pqing may insert products from different feeds into the same product queue. This program can read from a file of previously captured raw data or an asynchronous text feed such as the Alden’s International Data Service. As a convenience, the program changes its default baud rate based on its name (argv[0]). For example, if the program is invoked as ids , the baud rate set to 9600. For afos, the default baud rate is 4800. The program name also effects a ‘‘feedtype’’ field in the product data structure, which helps to uniquely identify a data product. Conventionally, ddplus, ids, hds and afos are links to pqing . |
−v |
Verbose flag. If present, the log will contain a line for each product that was ingested, giving the time read, header, and size of the product. |
||
−x |
Debug flag. Way too much output. |
−r rawfile |
The path name of a file to be used to capture the raw data seen on the input without processing it in any way. This can later be used for testing by giving this file as the feedname argument. WARNING: If this program is invoked with this option and is left running, then the file system will eventually fill up. |
−l logdest |
Log to logdest. One of ’’ (system logging daemon), ’-’ (standard error stream), or file logdest. Default is the standard error stream if the process has a controlling terminal (i.e., the process isn’t a daemon); otherwise, either the LDM log file or the system logging daemon (execute this program with just the option ’-?’ to determine which). |
−f feedtype |
Assert that the feedtype is feedtype, one of hds, ddplus, ids, etc. Useful when sending data from a file. If the feedtype is AFOS, then the input is parsed as AFOS products, otherwise, WMO format is assumed. |
−s size |
The size, in bytes, of the largest expected |
data-product. Unidentified data larger than this is discarded. The default is 1,048,576. |
−b baud |
Set the baud rate of the feed. This makes no difference unless data is being read from a tty. The default varies according to feedtype. |
-q q_path |
The pathname of the data product queue. The default is $(regutil /queue/path) This configuration default can be overridden by setting the environment variable LDMPQFNAME. |
−P port |
Get input via TCP connection to host feedname at port. |
−p even|odd|none |
Check the parity of the feed. This makes no difference unless data is being read from a tty. The default varies according to feedtype. |
−c |
For an HDS feed, the feed contains checksums. If the checksum is invalid, the product is not enqueued. For other FOS feeds (DDS, IDS, DDPLUS), check for the tty parity errors. If one occurs, the product is not enqueued. This option is assumed if the data is being read from a tty. |
||
−F |
Enable XON/XOFF software flow control for input from a tty. The default is to disable software flow control. |
||
−n |
Disable the checksum or parity check on data being read from a tty. This would be used on textual FOS feeds in situations where data quanity was more important than quality. |
||
−5 |
Perform checksum calculation on entire product. By default, in calculating the checksum pqing determines whether the product’s leading control string qualifies the product as a WMO product, and if so it then calculates the checksum on the portion of the product that does not include the leading control string. This way, products that differ only by sequence number will have identical signatures. The -5 option disables this feature, causing pqing to calculate the checksum based on the entire product, including the sequence number. |
The source for the ingester, whether a tty device or a file, is specified by the required feedname argument. Possible values of the feedname are: |
/dev/ttyx or /dev/ttyxx |
Asynchronous feed on a UNIX system. xx identifies the serial port. |
filename |
Specification of file containing raw data previously captured by one of the LDM programs pqing, ingestd, feedtest, or ldmd. Use of the filename ‘‘−’’ forces the program to read from standard input. |
On receipt of the following signals, the specified action occurs: |
SIGUSR1 |
Refresh logging (if configure(1) executed without the --with-ulog option) and write accumulated statistics to the logfile. |
SIGUSR2 |
Toggle the verbose flag. |
On successful insertion of a product into the product queue, SIGCONT is sent to pqing’s process group, informing all queue processes that are members of the same process group that a new product has arrived. |
ldmd(1), pqsend(1), pqexpire(1), ingestd(1), ulog(3), pq(3), syslogd(8), WWW URL http://www.unidata.ucar.edu/software/ldm/. |
Error and log messages are written using the ulog(3) interface. Nothing is written to standard output by the program. A summary of ingest statistics is output when the process terminates. Statistics may also be appended to the log file at any time while the process is running by sending a SIGUSR1 signal to the process. |