You are here: Re: make benchmark with script php « PHP Language « IT news, forums, messages
Re: make benchmark with script php

Posted by C. on 09/27/07 16:19

On 26 Sep, 19:34, artev <mailnotspa...@notspamm.nn> wrote:
> Il Wed, 26 Sep 2007 11:52:21 -0000, C. ha scritto:
>
> > On Sep 25, 11:32 pm, artev <mailnotspa...@notspamm.nn> wrote:
> >> is there some php's application for to value the really features of a
> >> server:max ram , cpu, velocity for to elaborate php script etc.., db ?
>
> > Yes, if you're running on a Unix/Linux box, you've got the Posix
> > functions, and you can shell out to talk to lsof, ps etc. On Linux you
> > can read stuff from the /proc filesystem.
>
> ok I use linux;
> but this is for to see the hardware features;
> but if want to see the memory and/or cpu in use?
>
> > What's the velocity of a PHP script?
>
> > If you're looking for an out-of-the box solution, there's nothing
> > exclusively written in PHP I'm aware of. Nagios might be relevant.
>
> regards velocity for script I found a solution with times...;
> but really I necessit to see how much memeory and cpu I use ;

$load_avgs=explode(' ', `cat /proc/loadavg`);
$vmstat=file('/proc/vmstat');
$mem=explode("\n", `free | tr -s ' ' ','`);
list($dummy,$total_mem, $used_mem,$shared_mem,$buffer_mem,
$cache_mem)=explode(',', $mem[1]);
....
$proc_specific='/proc/' . getpid();
$files_open=`ls {$proc_specific}/fd | wc -l`;
// look in $proc_specific/maps for memory regions in use, see man proc
for other intersting bits.

C.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация