LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   snmptrapd FIFO (https://www.linuxquestions.org/questions/linux-networking-3/snmptrapd-fifo-258391/)

eccsamba 11-23-2004 10:47 AM

snmptrapd FIFO
 
Hi,
I am using snmptrapd program in solaris environment. I was able to successfully log the data in a simple file. I am trying to log the same data into a FIFO.
My aim to read the FIFO in real time and filter the data and send alarm to administrators accordingly.
I have configured the snmptrapd to log the data into a FIFO
using the command
snmptrapd -c conf -p logs/pid -Lf logs/current
where current is a FIFO in logs directory created using mknod command. I dont see any data coming through the FIFO.
One perspective my program cannot read the FIFO in real time. but i have tested by cat ing similar data into the FIFO. my program responded very well.
cat data > current

my programs structure is, it reads from the FIFO and sends the data into a filter script which continues with further action.

my question, is snmptrapd capable of logging stuff into the FIFO to be further read.

regards
ecc

bignerd 11-23-2004 02:39 PM

I'm no expert on named pipes so this may not be of any assistance. The one thing I know is that if a named pipe is opened for write only before it has been opened for read then the operation will fail.

Could it be your order of accessing the pipe? Perhaps try accessing the named pipe for read with your monitor program/script before you start the snmptrapd.

I notice you used mknod p. You could have used mkfifo instead. But I don't believe that matters.

-b

eccsamba 11-24-2004 08:52 AM

thanks
 
Thanks for your reply,
The order of operation does matter. Since the data coming through the pipe was at very less frequency, it looked as though the program does not work. I switched to a snmptrap with heavy information flow, now it works fine.

thanks anyways
eccsamba.


All times are GMT -5. The time now is 04:53 AM.