Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Understanding FIFO pipes and Syslog

by Plankton (Vicar)
on Oct 03, 2010 at 18:27 UTC ( #863196=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    $ sudo mkfifo /var/log/blackhole.pipe
  2. or download this
    $ cat /etc/syslog.conf 
    # test logger script
    local1.*      |/var/log/blackhole.pipe
  3. or download this
    $ logger -p "test test"
    $ logger -p "test test"
    $ logger -p "test test"
    $ logger -p "test test2"
  4. or download this
    $ cat /var/log/blackhole.pipe
    Oct  3 11:16:09 localhost plankton: test test
    Oct  3 11:16:15 localhost last message repeated 2 times
    Oct  3 11:16:19 localhost plankton: test test2
  5. or download this
    $ cat 
    #!/usr/bin/perl -w
    # should never really come down here ...
    close $fifo_fh;
  6. or download this
    $ sudo ./ 
    read from pipe [Oct  3 11:22:45 localhost plankton: test test]
    read from pipe [Oct  3 11:22:52 localhost plankton: test test2]

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://863196]
Approved by biohisham
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2018-08-19 02:19 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (186 votes). Check out past polls.