Re: PHP_ProcessWatcher
| From: | Michael Wallner | Date: | Fri, 07 Nov 2003 13:15:53 +0000 |
| Subject: | Re: PHP_ProcessWatcher | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-23337@lists.php.net to get a copy of this message | ||
Hi Stefan Neufeind, you wrote:
> On 7 Nov 2003 at 13:42, Michael Wallner wrote:
>>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?
1st: Running a loop is optional (even not working yet).
2nd: Consider this:
--- ### ---
<executes>
<shell>echo '%' >> /var/log/pwatch</shell>
<php>mail_me('%')</php>
</executes>
---
foreach($watch[...][executes] as $mode => $action) {
if ( $mode == 'php' ) {
eval(str_replace('%', $str, $action);
}
...
}
--- ### ----
> Yeah, and I mean it would be nice to also be able to get a parsed
> output of ps (parsed into an array).
Well this is sored in PHP_ProcessWatcher::_procs, which could be made
publicly availbale, or even through a method.
> 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.
Ah, I see - alright, seems reasonable to me.
Regards,
--
Michael - < mike(@)php.net >
Attachment: [application/pgp-signature]
Attachment: [application/pgp-signature]