Results 1 to 4 of 4

Thread: trondheim-12 patch for gpu usage

Hybrid View

  1. #1
    Join Date
    Apr 2008
    Location
    York, UK
    Posts
    134

    Default 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. #2

    Default

    Should be in both branches now, thanks.

  3. #3
    Join Date
    Apr 2008
    Location
    York, UK
    Posts
    134

    Default 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;

  4. #4

    Default

    In git, thanks.

Posting Permissions

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