Announcement

Collapse
No announcement yet.

Bug in cpu detection

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bug in cpu detection

    PTS 1.0.0 incorrectly reports the number of available cpus on one of my test machines. What is strange is that the number of cores is ok.

    I get:
    Processor: 5 x Quad-Core AMD Opteron 8356 @ 2.30GHz (Total Cores: 16)
    While I should have:
    Processor: 4 x Quad-Core AMD Opteron 8356 @ 2.30GHz (Total Cores: 16)

    It looks like PTS is using more than one method for cpu detection and that one of them reports bad data.

  • #2
    All the CPU detection is done through /proc/cpuinfo. Can you post the full output of cat /proc/cpuinfo ?
    Michael Larabel
    http://www.michaellarabel.com/

    Comment


    • #3
      Here is a link to my cpuinfo

      cpuinfo.txt

      It seems that the physical ids are starting from 1 instead of 0. The PTS code in pts-core/functions/pts-functions_system_cpu.php -> processor_string is taking the last physical id + 1.

      I don't know if this kind of setup happens a lot of times, but a fix would be to count the number of unique physical ids. It is probably the safest method.

      Comment


      • #4
        I thought that might have been what the problem was. Check out git to see if it's fixed, or just try:

        Code:
                $physical_cpu_count = count(array_unique($physical_cpu_ids));
        Michael Larabel
        http://www.michaellarabel.com/

        Comment


        • #5
          it's fixed!

          Comment

          Working...
          X