Hi, I want to feed the log-output of an apache2 server into Pd. I know that it is possible to pipe the access_log (or any other log-output) of the apache2 to a process, by defining something like CustomLog "|/usr/bin/send_to_pd" common On the Pd side I would like to use a receive, or a netreceive object. My problem is, that I don´t know how to join those two processes... Should I try to write a script (bash, perl, python?), or is there a way to pipe directly into pd? thanks, marius.
Hallo, Marius Schebella hat gesagt: // Marius Schebella wrote:
I want to feed the log-output of an apache2 server into Pd. I know that it is possible to pipe the access_log (or any other log-output) of the apache2 to a process, by defining something like CustomLog "|/usr/bin/send_to_pd" common On the Pd side I would like to use a receive, or a netreceive object. My problem is, that I don??t know how to join those two processes... Should I try to write a script (bash, perl, python?), or is there a way to pipe directly into pd?
I would write a little script. There are examples how to send to netreceive written in perl and python in the CVS or on pure-data.info, it's really simple.
You could also use the pdsend utility, however doing it in Python is more flexible IMO, especially as you also need to append a ";" after each line to send.
You could direct the apache log output to a FIFO pseudofile created with "mkfifo /path/to/fifo" on Linux, then read from there, or do a "tail"-clone in Python or use bash or whatever.
Frank Barknecht _ ______footils.org_ __goto10.org__
Frank Barknecht schrieb:
I would write a little script. There are examples how to send to netreceive written in perl and python in the CVS or on pure-data.info, it's really simple.
frank, thanks, :) hmm, I couldnŽt find examples, maybe I overlooked them? do you by chance know their names? but the solution I am using now is much easier than I thought (I hope it is stable...?) Everything happens in the configuration file of the apache server:
LogFormat "%a %b blablabla ;" mylogfileformat CustomLog "|/usr/bin/pdsend 3000 192.168.0.23" mylogformat
and [netreceive 3000] in the pd patch. whenever apache receives a request from internet, it sends a message to pd. I did not test that under "real world conditions", but will report, how I get along. This should get online someday... marius.
Hallo, Marius Schebella hat gesagt: // Marius Schebella wrote:
frank, thanks, :) hmm, I couldn?t find examples, maybe I overlooked them? do you by chance know their names?
There here: http://pure-data.info/community/patches
http://pure-data.info/Members/kogger/netperlpd http://pure-data.info/Members/fbar/tools/pdsender.py
but the solution I am using now is much easier than I thought (I hope it is stable...?) Everything happens in the configuration file of the apache server:
LogFormat "%a %b blablabla ;" mylogfileformat CustomLog "|/usr/bin/pdsend 3000 192.168.0.23" mylogformat
and [netreceive 3000] in the pd patch.
Ah, that sounds cool.
Frank Barknecht _ ______footils.org_ __goto10.org__
On 9/5/06, Frank Barknecht fbar@footils.org wrote:
LogFormat "%a %b blablabla ;" mylogfileformat CustomLog "|/usr/bin/pdsend 3000 192.168.0.23" mylogformat
and [netreceive 3000] in the pd patch.
Ah, that sounds cool.
You can also use nc for that kind of stuff.
$ man nc
nc - TCP/IP swiss army knife
netcat is a simple unix utility which reads and writes data across net‐ work connections, using TCP or UDP protocol.
On Wed, 2006-09-06 at 08:26 +0200, Marius Schebella wrote:
Alexandre Quessy schrieb:
You can also use nc for that kind of stuff.
nc?
m.
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
maybe you can use comport for this...
i'd use something like /vat/tmp/pd_apache instead of /usr/bin/send_to_pd
youcan specify the file to open with |devicename /var/log/pd_apache( | [comport]
be sure to use a recent comport because the devicename function was bugged until 24/8/2006
ciao. davide.
www.davidemorelli.it
----- Original Message ----- From: "Marius Schebella" marius.schebella@chello.at To: "PD List" pd-list@iem.at Sent: Tuesday, September 05, 2006 12:51 PM Subject: [PD] piping into pd
Hi, I want to feed the log-output of an apache2 server into Pd. I know that it is possible to pipe the access_log (or any other log-output) of the apache2 to a process, by defining something like CustomLog "|/usr/bin/send_to_pd" common On the Pd side I would like to use a receive, or a netreceive object. My problem is, that I don´t know how to join those two processes... Should I try to write a script (bash, perl, python?), or is there a way to pipe directly into pd? thanks, marius.
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list