Announcement

Collapse
No announcement yet.

trondheim-12 patch for gpu usage

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

  • trondheim-12 patch for gpu usage

    This also applies to master.

    This fixes a typo which causes havoc with monitoring graphs.

    Code:
    diff --git a/pts-core/functions/pts-functions_system_parsing.php b/pts-core/functions/pts-functions_system_parsing.php
    index fa0d899..d491491 100644
    --- a/pts-core/functions/pts-functions_system_parsing.php
    +++ b/pts-core/functions/pts-functions_system_parsing.php
    @@ -227,7 +227,7 @@ function read_ati_extension($attribute)
                    $info = shell_exec("aticonfig --pplib-cmd \"get activity\" 2>&1");
                    if(($pos = strpos($info, "Activity")) > 0)
                    {
    -                       $activity_info = substr($info, strpos($info, "Activity:") + 8);
    +                       $activity_info = substr($info, strpos($info, "Activity:") + 9);
                            $activity_info = trim(substr($activity_info, 0, strpos($activity_info, "percent\n")));
                            $ati_info = $activity_info;
                    }

  • #2
    Should be in both branches now, thanks.
    Michael Larabel
    http://www.michaellarabel.com/

    Comment


    • #3
      Another minor patch

      Fixes minumum reported usage to allow 0%, also applies to cpu.usage.

      Code:
      diff --git a/pts-core/modules/system_monitor.php b/pts-core/modules/system_monitor.php
      index c6c1037..2c32ea1 100644
      --- a/pts-core/modules/system_monitor.php
      +++ b/pts-core/modules/system_monitor.php
      @@ -320,7 +320,7 @@ class system_monitor extends pts_module_interface
      
                                      foreach($m_array[$i] as $temp)
                                      {
      -                                       if($temp < $low || $low == 0)
      +                                       if($temp < $low || ($low == 0 && $type[$i] <> "Usage"))
                                                      $low = $temp;
                                              else if($temp > $high)
                                                      $high = $temp;

      Comment


      • #4
        In git, thanks.
        Michael Larabel
        http://www.michaellarabel.com/

        Comment

        Working...
        X