nickjwest has asked for the wisdom of the Perl Monks concerning the following question:

What it is, is that i have a event generator process running on a UNIX machine and was wondering if you can take input from the event generating process on the UNIX box. E.g listen to process 'event_PID' and take that as the input for a script.

Replies are listed 'Best First'.
Re: Taking Input from PID
by matija (Priest) on Apr 18, 2004 at 19:49 UTC
    I think SNMP Trap Translator (which is written in Perl) will either do what you need, or provide invaluable pointers on how to do what you need...
Re: Taking Input from PID
by Vautrin (Hermit) on Apr 18, 2004 at 19:34 UTC

    Am I correct in understanding that you want to communicate with another program, to send information back and forth? Or do you mean that you want to listen on some arbitrary port, and then act on what you find?

    If I were you I'd look at IO::Socket, and use that to open a TCP/Ip port, which you can use either to communicate with another program, or listen in on the port "SNMP event messages" go to. If you're looking for a good book on the ins and outs of network programming, I would recommend Network Programming With Perl, which is available on Safari.


    Want to support the EFF and FSF by buying cool stuff? Click here.