Results 1 to 3 of 3

Thread: Single-Core CPUs reported as 'Unknown'

Hybrid View

  1. #1
    Join Date
    Nov 2007
    Posts
    20

    Default Single-Core CPUs reported as 'Unknown'

    Hello,
    I found out, on Systems with Single-Core CPUs information about the processor are not shown (Processor: Unknown (Total Cores: 1). At least for AMD-Athlon 1000MHz, AthlonXP 2200+ and a mobile Intel Celeron 540.

    This is because there is no 'physical id' listed in /proc/cpuinfo, at least for the processors listed above.

    In regard to the corresponding file (pts-functions-system-cpu.php)
    Code:
    $physical_cpu_ids = read_cpuinfo("physical id");
    $physical_cpu_count = count(array_unique($physical_cpu_ids));
    ...
    ...
    if($physical_cpu_count == 1)
    {
        //just one processor
        $info = append_processor_fr...
    }
    will allways fail and $info stays empty and it will be reported 'Unknown'.
    A simple code change corrects this:

    Code:
    if($physical_cpu_count == 1 || empty($physical_cpu_count))
    not sure if this is the desired code quality , but i hope it helps in some way. At least on my systems with CPUs not reporting an physical id it works.
    Code:
     phoronix-test-suite system-info
    
    ======================================
    Phoronix Test Suite v1.0.4 (TRONDHEIM)
    System Information
    ======================================
    
    Hardware:
    Processor: Intel Celeron CPU 540 @ 1.86GHz (Total Cores: 1), Motherboard: Unknown, Chipset: Intel Mobile PM965/GM965/GL960, System Memory: 2018MB, Disk Space: 70GB, Graphics: Intel Mobile GM965/GL960, Screen Resolution: 1280x800
    Marox

  2. #2

    Default

    Thanks, I'll commit it to git.

  3. #3

    Default

    Fix found in PTS 1.0.5 release today.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •