projects / phoronix-test-suite.git / commitdiff
Build Results
 
Summary

Description: Phoronix Test Suite open-source benchmarking development
Last Change: Sun 12/21/14 7:56

Recent Commits
Time
Signed-Off By
Description
Commit Diff
Sun 12/21/14 7:56
Michael Larabel  
pts-core: Allow min/max... 
Sat 12/20/14 11:53
Michael Larabel  
pts-core: Add... 
Mon 12/15/14 13:00
Michael Larabel  
phoromatic: Move IP info... 
Mon 12/15/14 12:07
Michael Larabel  
phoromatic: Attempt to... 
Mon 12/15/14 11:45
Michael Larabel  
phoromatic: Add... 
Mon 12/15/14 11:26
Michael Larabel  
phoromatic: Improve... 
 
> --git a/CHANGE-LOG b/CHANGE-LOG
index 49de048
..09b9a73 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -10,+10,@@ Phoronix Test Suite (Git)
 - 
phodeviRecognize 'HIS' (Hightech Information Systemgraphics cards
 
phodeviRecognize 'ZOTAC' graphics cards
 
phodeviFix redundant monitor model reporting detection on Catalyst
+- phodeviAdd support for NVIDIA-Settings GPUUtilization in gpu.usage sensor

 Phoronix Test Suite 4.8.4
-Sokndal
 7 November 2013
diff 
--git a/pts-core/objects/phodevi/sensors/gpu_usage.php b/pts-core/objects/phodevi/sensors/gpu_usage.php
index 5a76e31
..bacda99 100644
--- a/pts-core/objects/phodevi/sensors/gpu_usage.php
+++ b/pts-core/objects/phodevi/sensors/gpu_usage.php
@@ -3,+3,@@
 
/*
     Phoronix Test Suite
     URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
-    Copyright (C) 2009 - 2011, Phoronix Media
-    Copyright (C) 2009 - 2011, Michael Larabel
+    Copyright (C) 2009 - 2013, Phoronix Media
+    Copyright (C) 2009 - 2013, Michael Larabel

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -26,6 +26,7 @@ class gpu_usage implements phodevi_sensor
     static $probe_radeon_fences = false;
     static $probe_intel_commands = false;
     static $probe_nvidia_smi = false;
+    static $probe_nvidia_settings = false;

     public static function get_type()
     {
@@ -37,7 +38,7 @@ class gpu_usage implements phodevi_sensor
     }
     public static function get_unit()
     {
-        if(self::$probe_ati_overdrive || self::$probe_nvidia_smi)
+        if(self::$probe_ati_overdrive || self::$probe_nvidia_smi || self::$probe_nvidia_settings)
         {
             $unit = 'Percent';
         }
@@ -88,7 +89,14 @@ class gpu_usage implements phodevi_sensor
         }
         else if(phodevi::is_nvidia_graphics())
         {
-            if(pts_client::executable_in_path('nvidia-smi'))
+            $util = phodevi_parser::read_nvidia_extension('GPUUtilization');
+
+            if(is_numeric($util) && $util >= 0 && $util <= 100)
+            {
+                self::$probe_nvidia_settings = true;
+                return true;
+            }
+            else if(pts_client::executable_in_path('nvidia-smi'))
             {
                 $usage = self::nvidia_core_usage();

@@ -108,6 +116,10 @@ class gpu_usage implements phodevi_sensor
         {
             return self::ati_overdrive_core_usage();
         }
+        else if(self::$probe_nvidia_settings)
+        {
+            return phodevi_parser::read_nvidia_extension('GPUUtilization');
+        }
         else if(self::$probe_nvidia_smi)
         {
             return self::
 
Phoronix.com
Linux Driver Forums
Copyright © 2014 by Phoronix Media