pqsend - program to send products from a local product queue to an LDM server


pqsend -h remote [-dvx] [-l logdest] [-f feedtype] [-p pattern] [-q queue] [-T TotalTimeo] [-o offset] [-t timeout] [-i interval]


This program sends LDM data from a local product queue (see pq(3)) to an LDM server, ldmd(1). The server would be on another machine, or the queue used by pqsend would not be the queue in use by the server.

This program "offers" data, and is an alternative to the "request" mechanism used by server to ask for data. In most cases, the "request" method would be preferred. This program would typically be used with pqing(1) to distribute the ingesters to various machines in a tightly coupled local network. pqsend may also be used for one time synchronization product queues after outages or reconfigurations.


−h remote

Attempts to send data to LDM server on remote. This is a required argument.


Verbose logging. A line is emitted for every product in the queue that is sent. The emitted line contains the UTC date and time, the program name, the product ingest time, feedtype, sequence number, size in bytes, and the product identifier.


Debugging information is also emitted.

−l logdest

Log to dest. 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

Offers only products that have a feedtype that is a member of the feedtype set. The default is "ANY", specifying all feed types. See pqact(1) for a list of basic feed types and the use of feedtype expressions to specify combinations of basic feed types.

−p pattern

Offers only products whose product-identifier is matched by the extended regular expression pattern. The default is ".*", which matches all product-identifiers.

−q queue

The pathname of the data product queue. The default is $(regutil /queue/path). The configuration value can be overridden by setting the environment variable LDMPQFNAME.

−i interval

Polling interval, in seconds. When the end of the queue is reached, the program sleeps and checks for new products in the product queue every interval seconds. When pqsend is run in the same process group as the programs that insert products into the product queue, a signal informs pqsend and all other interested processes in the process group whenever a new product is available, so polling is not necessary in this case. The default interval is 15 seconds.


Decouple the -T and -o options; otherwise, the time-offset value can’t be greater than the total time-out value and the product-queue cursor will never be earlier than the total time-out ago.

−T TotalTimeo

Total timeout, in seconds. Maximum time for the program to execute. The default total timeout is 3600 seconds (1 hour).

−o offset

Offset time, in seconds. Offer products created offset seconds earlier than the current time. The default value is TotalTimeo.

−t timeout

Remote procedure call (RPC) timeout, in seconds. The default RPC timeout is 25 seconds.



Normal termination.


Immediate termination.


Refresh logging (if configure(1) executed without the "--with-ulog" option) and write status and product statistics to log output.


Cyclically increment the verbosity of the program. Assumming the program was started without the -v or -x switches, the first SIGUSR2 will make it verbose and LOG_INFO priority messages will appear. The second will turn on the LOG_DEBUG priority messages as well. A third will take it back to the normal state.


Wake up if sleeping, because there is a new product in the queue.


An ACCEPT line in the ldmd.conf file used by the remote will effect what data is actually sent. This program signs on with a HIYA remote procedure call to determine this. The remote performs an intersection of the command line feedtype specification and the data which the remote is willing to accept, suppling its pattern specifications. Any pattern supplied on the command line by this program is not used.


The following invocation will offer IDS products from the product queue /tmp/ldm.pq and send them to an LDM server running on host ldmhost.dept.univ.edu

pqsend -q /tmp/ldm.pq -f IDS -h ldmhost.dept.univ.edu

The following invocation will attempt to send the last hour’s data of any type from the default product queue to an LDM server running on host ldmhost.dept.univ.edu

pqsend -xvl - -o 3600 -T 3600 -h ldmhost.dept.univ.edu

Log messages will be written to the controlling terminal. The program should be terminated manually when the "End of Queue" message is displayed.


ldmd(1), pqing(1), ulog(3), pq(3), syslogd(8), WWW URL http://www.unidata.ucar.edu/software/ldm/.