Announcement

Collapse
No announcement yet.

Filesystem detection patch

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

  • Filesystem detection patch

    This patch will add the filesystem of the device used to run the installed PTS tests to the gathered system info. This is helpful when examining results of highly I/O limited tests such as sqlite. This code requires /bin/stat

    Code:
    diff --git a/pts-core/functions/pts-functions_system.php b/pts-core/functions/pts-functions_system.php
    index a27fa6f..3ba18b2 100644
    --- a/pts-core/functions/pts-functions_system.php
    +++ b/pts-core/functions/pts-functions_system.php
    @@ -306,6 +306,14 @@ function pts_report_power_mode()
    
            return $return_status;
     }
    +function filesystem_type()
    +{
    +       $fs = shell_exec("/bin/stat " . BENCHMARK_ENV_DIR . " -L -f -c %T 2>/dev/null");
    +       if( "" == $fs)
    +               return "Unknown";
    +
    +       return $fs;
    +}
     function pts_hw_string()
     {
            $hw_string = "Processor: " . processor_string() . " (Total Cores: " . cpu_core_count() . "), ";
    @@ -324,7 +332,8 @@ function pts_sw_string()
            $sw_string .= "Kernel: " . kernel_string() . " (" . kernel_arch() . "), ";
            $sw_string .= "X.Org Server: " . graphics_subsystem_version() . ", ";
            $sw_string .= "OpenGL: " . opengl_version() . ", ";
    -       $sw_string .= "Compiler: " . compiler_version() . " ";
    +       $sw_string .= "Compiler: " . compiler_version() . ", ";
    +       $sw_string .= "PTS Filesystem: " . filesystem_type() . " ";
    
            return $sw_string;
     }
    ======================================
    Phoronix Test Suite v0.8.0 (TRONDHEIM)
    System Information
    ======================================

    Hardware:
    Processor: Intel CPU T2080 @ 1.73GHz (Total Cores: 2), Motherboard: Unknown, Chipset: ATI 5a31, System Memory: 883MB, Disk Space: 8GB, Graphics: ATI RC410, Screen Resolution: 1280x800

    Software:
    OS: PCLinuxOS release 2007 (PCLinuxOS) for i586, Kernel: 2.6.22.10.tex1 (i686), X.Org Server: 1.4.0.90, OpenGL: 1.4 (2.1 Mesa 7.0.3-rc2), Compiler: GCC 4.1.1, PTS Filesystem: ext2/ext3
Working...
X