[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pqing from other than stdout or /dev/tty? (fwd)



I'm Cc:ing support-ldm to get this into the support archives ...

------- Forwarded Message

Date:    Tue, 10 Oct 2000 09:05:22 -0400
From:    Kevin Tyle <address@hidden>
To:      Russ Rew <address@hidden>
Subject: Re: pqing from other than stdout or /dev/tty? 

Hi Russ,

Thanks for that info!  Another way I was told
was to use "mknod" with the "-p" option to make
a named pipe--looks like mkfifo does the exact same
thing.  Works great.

Thanks again.

--Kevin

On Mon, 9 Oct 2000, Russ Rew wrote:

> Kevin,
> 
> > I have been able to successfully ingest data with the LDM
> > from our new Dyncorp data service.  What I have done is
> > use an edited version of the ingest program that they provide,
> > and then pipe the data stream, which is written to stdout,
> > to pqing:
> > 
> >   (dyncorp_ingest | pqing -f dds - ) 2> ingest.err
> > 
> > But what I would really like to do is write the data to
> > a separate file--not stdout--and then just handle the ingest
> > from my ldmd.conf.  Similar to how I did it when
> > we were reading from the serial port from the Alden
> > satellite feed:
> > 
> >   exec    "pqing -b 9600 -f ids /dev/ttyS0 -n -p even"
> > 
> > But is there an analogue to the /dev/ttyS0 file that I could
> > write the data to?  I.e. a file that contains the data
> > as it is written out, but doesn't actually accumulate in
> > size, like a regular file?  Is there some /dev file that
> > accomplishes this?
> 
> I think what you want can be done with a FIFO file, a little-used but
> elegant way to communicate between processes on Unix systems.
> 
> First make the FIFO file with something like:
> 
>   mkfifo /tmp/ingest.fifo
> 
> Then have the dyncorp_ingest program write to that "file" (it's not
> really a file in the conventional sense, it's a named pipe):
> 
>   dyncorp_ingest > /tmp/ingest.fifo
> 
> Then you can have pqing read from this "file" when it's invoked from
> ldmd.conf:
> 
>   exec    "pqing -f ids /tmp/ingest.fifo"
> 
> --Russ
> 
> _____________________________________________________________________
> 
> Russ Rew                                         UCAR Unidata Program
> address@hidden                     http://www.unidata.ucar.edu
> 

------- End of Forwarded Message