Re: Determine overhead of PHP script.
| From: | Rasmus Lerdorf | Date: | Mon, 03 Jun 2002 04:23:37 +0000 |
| Subject: | Re: Determine overhead of PHP script. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-100367@lists.php.net to get a copy of this message | ||
PHP has a built-in mechanism for logging high-watermark memory usage by
scripts. Make sure you compile PHP using --enable-memory-limit then you
can modify your Apache LogFormat and stick %{mod_php_memory_usage}n in
there somewhere which will be replaced with the peak memory usage for that
script in bytes.
-Rasmus
On Mon, 3 Jun 2002, Analysis & Solutions wrote:
> JH:
>
> On Sat, Jun 01, 2002 at 10:29:38PM -0400, John Holmes wrote:
> > Is there a way to determine the overhead or memory usage of a PHP script
> > as it runs?
>
> You could do some sort of exec() or system() type call. For example, on
> a NetBSD (and similar unix type machines) you can do "ps -o rss,command"
>
> Enjoy,
>
> --Dan
>
> --
> PHP classes that make web design easier
> SQL Solution | Layout Solution | Form Solution
> sqlsolution.info | layoutsolution.info | formsolution.info
> T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
> 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>