SDI Operator's Manual
Revised July 2000

[Search Manual] [Table of Contents] [FAQ] [Go to Previous] [Go to Next]


Reading and Configuring the NCEP/NWSTG Output Data Stream

This section has information on the following topics:

NCEP/NWSTG Output Data Stream Characteristics

The output data from the SDI's NCEP/NWSTG channel is split into two data streams, a binary stream, and a text stream. These two streams are written to two identical pairs of FIFOs in the /tmp directory. The first pair is jmb.fifo.1 (text stream) and jmb.fifo.2 (binary stream). The second pair is jmb.fifo.4 (text stream) and jmb.fifo.5 (binary stream). A fifth FIFO, jmb.fifo.3, contains standard error output from the ingestors.

NOTE:
Each FIFO in a binary/text pair must be read or one will block the other. Either or both pairs may be read.

These FIFO outputs can also be read by connecting to a pair of TCP/IP sockets (either 1501 and 1502, or 1503 and 1504) on the ingest machine. This channels the cat output from the FIFO into the socket. If these port numbers are not appropriate for your needs, you can change them by editing the file /etc/services on the ingest machine.

Note, however, that only one process can read from a single FIFO at any time. So if you have processes reading from jmb.fifo.1 and jmb.fifo.2 you cannot also read from the corresponding ports (1501 and 1502) at the same time.

Feeding off the NCEP/NWSTG Data Stream Locally

A process or program running on the ingestor machine may read from the NCEP/NWSTG stream. This is done by cating the FIFO and reading standard out. The example below cats the text stream to current tty so all of the text stream is output to the screen. The binary stream is sent to dev null.

$ cat /tmp/jmb.fifo.2 >/dev/null &
$ cat /tmp/jmb.fifo.1

The $ symbol in this and subsequent examples represents the Unix prompt.

Feeding off the NCEP/NWSTG Data Stream Remotely

A process or program running on a machine other than the ingest machine may read from the NCEP/NWSTG stream. This is done by connecting to one of the paired ports on the ingestor (1501 and 1502, or 1503 and 1504). The example below uses telnet to connect to the 1501 and 1502 paired ports. The text stream is output to the screen; the binary stream is sent to dev null.

$ telnet ingestor.domain.com 1502 >/dev/null &
$ telnet ingestor.domain.com 1501

Feeding off Multiple NCEP/NWSTG Data Streams

SDI versions 12nov99 and later have the ability to output up to two pairs of the NCEP/NWSTG text and binary streams. To do so, the inet services must be configured so that nporta and nportb define the ports for the first remote feed, and nportc and nportd define the ports for the second remote feed.

Complete the steps below to configure the system to maintain two NCEP/NWSTG remote feeds.

1. In the file /etc/services, locate the lines similar to those below.

nporta         1501/tcp                 #noaaport text stream
nportb         1502/tcp                 #noaaport binary stream
nportc         1503/tcp                 #noaaport text stream
nportd         1504/tcp                 #noaaport bin

If the last two lines (those beginning with nportc and nportd) don't exist, add them.

2. In the file /etc/inetd.conf, locate the lines similar to those below.

nporta   stream   tcp    nowait   nobody  /bin/cat cat /tmp/jmb.fifo.1
nportb   stream   tcp    nowait   nobody  /bin/cat cat /tmp/jmb.fifo.2
nportc   stream   tcp    nowait   nobody  /bin/cat cat /tmp/jmb.fifo.4
nportd   stream   tcp    nowait   nobody  /bin/cat cat /tmp/jmb.fifo.5

If the last two lines (those beginning with nportc and nportd) don't exist, add them.

3. From an xterm, restart inetd.conf by running the commands below.

Type: ps -ef | grep inetd

Note the PID number of the the inetd process. Then enter the following command, where nnnnn is the PID number of the inetd process.

Type: kill -HUP nnnnn

To read from both pairs of ports, connect to the ports or read from the FIFOs as in the examples above. Note that only one process can read from a port at any one time.


[Search Manual] [Table of Contents] [FAQ] [Go to Previous] [Go to Next]