Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Number of CPUs using PHP?
July 19, 2007, 4:08 pm
rate this thread
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*
Re: Number of CPUs using PHP?
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
Andy Hassall :: email@example.com :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool