PQINSERT

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXIT STATUS
EXAMPLE
SEE ALSO
DIAGNOSTICS

NAME

pqinsert - insert files as products in an LDM product queue.

SYNOPSIS

pqinsert [−ivx] [−l logdest] [−q queue] [−s seqno] [−f feedtype] [−p product ID] filename...

DESCRIPTION

This program is an example of how to insert data into an LDM product queue. Its primary function is as a coding example. It may also be used to test the ldm system. It might also be useful to resend data after a downstream node has been offline, or to queue locally generated products for transmission.

Each file given on the command line is converted to a separate ldm data product. By default, the file name is used as product identifier. This default can be changed using the −p option to specify some other product identifier. The product feed type is specified by the −f option. The current time used as product arrival time. The product is then inserted at the end of the specified queue.

OPTIONS

−i

Compute the MD5 signature from the product-identifier rather than from the product’s data. You should only use this option if computing the MD5 signature from the product’s data takes too long and if the product-identifier is unique.

−f feedtype

Asserts that the data being sent has feed type feedtype. The default is ‘EXP’, indicating an experimental feedtype.

−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).

−p productID

Asigns the data the product identifier productID. If multiple files are being inserted, the product identifier becomes <productID>.<sequenceNumber>. The default product identifier is the name of the file being inserted.

−q queue

Pathname of the queue into which to insert the files. The default is $(regutil /queue/path).

−s seqno

Sets the product sequence number associated with the first product to seqno. Subsequent products (files on the command line) are numbered sequentially. Defaults to zero.

−v

Verbose flag. If present, the log will contain a line for each product file that was inserted.

−x

Requests that debugging information also be printed (currently none).

EXIT STATUS

If the program exits with a failure status, then the user should check the log messages for details on the failure. If the exit-status is non-zero, then it will be that of the last input file for which an error occurred, which will hide previous errors; consequently, inserting files one-at-a-time is advisable if you need to know for which file an error occurred.

0

Success. All input files were inserted into the product-queue.

1

A failure occurred in the operating-system. No files were processed.

2

The product-queue couldn’t be opened for writing. No files were processed.

3

A problem occurred while processing an input file, which was not added to the product-queue. Other files might have been added.

4

An input file is already in the product-queue according to its MD5 signature.

6

The MD5 signature computation couldn’t be initialized. No files were processed.

EXAMPLE

The command

pqinsert -v -q /var/data/nldn/ldm.pq -f NLDN 19940906220206

will insert the file ‘19940906220206’ at the end of ‘/var/data/nldn/ldm.pq’ with feedtype ‘NLDN’.

SEE ALSO

pq(3), ldmd(1), pqact(1), pqsend(1)

DIAGNOSTICS

Error messages and log messages are written to the log file.