Navigation

    Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    Recalbox Manager Monitoring Fix

    Recalbox
    recalbox manager monitoring fix
    1
    1
    1119
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • sevenx
      sevenx last edited by sevenx

      Hallo Zusammen

      Da ich aktuell mit der neusten Version unterwegs bin und diverse Probleme mit dem Manager Monitoring hatte, machte ich mir kurzerhand einen Fix:

      /usr/recalbox-manager/project/manager_frontend/views/monitor.py
      Folgenden Import hinzufügen unterhalb von import os:
      from subprocess import call

      Dann ca. Zeile 42 folgenden Inhalt:
      critical_limit = float(open(os.path.join(device_dir, RECALBOX_THERMAL_MAXTEMP_LIMIT_FILE), 'r').read().strip())

      mit folgendem Code ersetzen:

      •        try:
                  critical_limit = float(open(os.path.join(device_dir, RECALBOX_THERMAL_MAXTEMP_LIMIT_FILE), 'r').read().strip())
              except:
                  try:
                      critical_limit = float(call(["vcgencmd get_config int | grep temp_limit | cut -d '=' -f 2"]).strip())
                  except:
                      critical_limit = 85.0 * 1000.0*
        

      Zusätzlich habe ich die Temperatur mit einer Progressbar versehen
      /usr/recalbox-manager/project/manager_frontend/temapltes/manager_frontent/monitoring.html

      <!-- Ab Hier -->
      {% extends "manager_frontend/base.html" %}
      {% load i18n %}

      {% block manager_content %}
      {% if PSUTIL_AVAILABLE %}
      <div class="dashboard-system-infos">

      <div class="row cpu">
          <div class="small-12 columns">
              <p class="title-3">{% trans "CPU" %}</p>
          </div>
          {% for core_percent in cpu_infos.usage %}{% with core_int=core_percent|floatformat:"0" %}
          <div class="small-6 columns{% if forloop.last %} end{% endif %} core-item">
              <div class="row">
                  <div class="small-12 medium-4 columns core-number text-right">
                      <p>{% blocktrans with number=forloop.counter %}Core&nbsp;{{ number }}{% endblocktrans %}</p>
                  </div>
                  <div class="small-12 medium-8 columns core-usage-progress">
                      <div class="progress success radius">
                          <span class="meter" style="width: {{ core_int }}%"></span>
                          <span class="value">{{ core_int }}%</span>
                      </div>
                  </div>
              </div>
          </div>
          {% endwith %}{% endfor %}
      </div>
      
      <hr>
      
      <div class="row">
          <div class="small-12 columns medium-8">
              <div class="row memory">
                  {% with memory_usage_int=memory_infos.usage_percent|floatformat:"0" %}
                  <div class="small-12 columns">
                      <p class="title-3">{% trans "Memory" %}</p>
                  </div>
                  <div class="small-12 medium-3 columns medium-text-right free">
                      {% blocktrans with size=memory_infos.free_unified|filesizeformat %}Free: {{ size }}{% endblocktrans %}
                  </div>
                  <div class="small-12 medium-6 columns usage">
                      <div class="progress success radius">
                          <span class="meter" style="width: {{ memory_usage_int }}%"></span>
                          <span class="value">{{ memory_usage_int }}%</span>
                      </div>
                  </div>
                  <div class="small-12 medium-3 columns medium-text-left total">
                      {% blocktrans with size=memory_infos.total|filesizeformat %}Total: {{ size }}{% endblocktrans %}
                  </div>
                  {% endwith %}
              </div>
          </div>
          <div class="small-8 columns medium-4 thermal-cpu-infos">
              <p class="title-3">{% trans "CPU Temperature" %}</p>
      
              <div class="row temperature">
                  <div class="small-8 columns">
                      <div class="progress success radius">
                          {% with temp_percent_int=cpu_thermal_infos.percent_usage|floatformat:"0" %}
                          <span class="meter" style="width: {{ temp_percent_int }}%"></span>
                          <span class="value">{{ cpu_thermal_infos.current }}°c</span>
                          {% endwith %}
                      </div>
                  </div> 
                  <div class="small-4 columns">
                      {% trans "Max" %}: {{ cpu_thermal_infos.max }}°c
                  </div> 
              </div>
          </div>
      </div>
      
      <hr>
      
      <div class="row filesystem">
          <div class="small-12 columns">
              <p class="title-3">{% trans "File system" %}</p>
              <table class="expand">
                  <thead>
                      <tr>
                          <th class="device">{% trans "Device" %}</th>
                          <th class="mountpoint">{% trans "Mount" %}</th>
                          <th class="type">{% trans "Type" %}</th>
                          <th class="usage">{% trans "Usage" %}</th>
                          <th class="used">{% trans "Used" %}</th>
                          <th class="free">{% trans "Free" %}</th>
                          <th class="total">{% trans "Total" %}</th>
                      </tr>
                  </thead>
                  <tbody>
                      {% for disk in filesystem_infos %}{% with usage_percent=disk.used_percent|floatformat:"0" %}
                      <tr class="device-item">
                          <td class="device">{{ disk.device }}</td>
                          <td class="mountpoint">{{ disk.mountpoint }}</td>
                          <td class="type">{{ disk.fstype }}</td>
                          <td class="usage">
                              <div class="progress success radius">
                                  <span class="meter" style="width: {{ usage_percent }}%"></span>
                                  <span class="value">{{ usage_percent }}%</span>
                              </div>
                          </td>
                          <td class="used">{{ disk.used_bytes|filesizeformat }}</td>
                          <td class="free">{{ disk.free|filesizeformat }}</td>
                          <td class="total">{{ disk.total|filesizeformat }}</td>
                      </tr>
                      {% endwith %}{% endfor %}
                  </tbody>
              </table>
          </div>
      </div>
      

      </div>
      {% endif %}
      {% endblock %}
      <!-- bis hier kopieren -->

      Nach erfolgreichem Speichern Recalbox neustarten oder den Manager neustarten.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      Want to support us ?

      75
      Online

      87.8k
      Users

      25.8k
      Topics

      178.7k
      Posts

      Copyright © 2021 recalbox.com