You are here: Re: Number of CPUs using PHP? « PHP Programming Language « IT news, forums, messages
Re: Number of CPUs using PHP?

Posted by Andy Hassall on 07/19/07 16:56

On Thu, 19 Jul 2007 09:08:55 -0700, Shekar <shekariyer@gmail.com> wrote:

>Is there a class/module/function in PHP that will help me identify the
>number of CPUs on a system?
>php_uname() does not provide that information. Though I can execute a
>system command, I do not have a
>consistent method that will work across platforms like Linux, SunOS,
>AIX, HP-UX and Windows*

Not that I'm aware of, and I can't spot anything on PEAR - it's not the sort
of information you need very often. So you'll probably have to use php_uname
and then branch out to OS-specific methods (/proc/cpuinfo etc.)

You may also run into the definition of what is one CPU - multi-core and
hyperthreading cloud the issue, resulting in widely varying per-CPU licensing
terms for various commmercial products. Is this what you want the information
for?

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

 

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

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