Re: PHP_ProcessWatcher

From: Date: Fri, 07 Nov 2003 13:00:29 +0000
Subject: Re: PHP_ProcessWatcher
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-23336@lists.php.net to get a copy of this message
On 7 Nov 2003 at 13:42, Michael Wallner wrote: > Hi Stefan Neufeind, you wrote: > > First of all, thanks for your response, and keep in mind that this > class is a first quick shot and at an early development state :) Fine :-))) > In general this sounds interesting to me. But how about handling the > > "events" inside PHP? I mean, being able to call a function and not > > <execute> a separate program? > > This is planned, and should not be a big task. Well, but isn't it somehow again your run()-loop? Or do you think of registering a callback-function? > > And how about resetting the script-timeout in your php-script-loop? > > AFAIK the CL-Interface has implicit infinite timeout. Agreed. Just thought it might be "nice" to do that :-) > > I'm not against the package - parsing output of a > > process-"watching"- tool seems a good idea. But maybe you could > > include advanced features in your tool - or separate some some > > core-functionality (e.g. parsing of a ps-output etc.) in a separate > > package? > > Well the output of ps is very flexible. PHP_ProcWatch just > splits > the headline of the output, uses this as array keys and sorts the > lines below into an array with these array keys. Yeah, and I mean it would be nice to also be able to get a parsed output of ps (parsed into an array). > > If I wish to count all httpd-processes using your lib, dump a list > > of all httpd-pids or simply want to show a "ps ax"-like output that > > is generated by a PHP-script from an array into which you parsed the > > ps- output that would be quite handy from my view. > > Sorry, didn't figure out that paragraph... This is connected to the previous paragraph: It would be nice to be able to get an array with information on running processes or even ob a subset of processes (e.g. all "httpd"-processes). This way you could imagine creating a html-page / xml-page that allows you to monitor all (!) running processes interactively over a webserver. This would just require allowing the parsed ps-output to be passed back to the calling script. Stefan

« previous php.pear.dev (#23336) next »