Aktuelles
Digital Eliteboard - Das Digitale Technik Forum

Registriere dich noch heute kostenlos, um Mitglied zu werden! Sobald du angemeldet bist, kannst du auf unserer Seite aktiv teilnehmen, indem du deine eigenen Themen und Beiträge erstellst und dich über deinen eigenen Posteingang mit anderen Mitgliedern unterhalten kannst! Zudem bekommst du Zutritt zu Bereichen, welche für Gäste verwehrt bleiben

Registriere dich noch heute kostenlos, um Mitglied zu werden! Sobald du angemeldet bist, kannst du auf unserer Seite aktiv teilnehmen, indem du deine eigenen Themen und Beiträge erstellst und dich über deinen eigenen Posteingang mit anderen Mitgliedern unterhalten kannst! Zudem bekommst du Zutritt zu Bereichen, welche für Gäste verwehrt bleiben

RaspberryPI Übertaktung

    Nobody is reading this thread right now.
A

aragorn

Guest
Hier könnten wir getestete und funktionsfähige Übertaktungen des RPI's zusammenstellen

Wie und mit welchen Parametern kann hier entnommen werden: Infos Die config.txt Konfigurationsdatei


Desweiteren hab ich ein kleines php Script geschrieben um aktuelle Temperatur, CPU Frequenz (es wird der aktuelle, minimal und maximal Wert im Browsercache gespeichert) sowie CPU Auslastung im Webbrowser anzuzeigen.
Es ist ein Refresh von 10 Sekunden eingestellt, das Script läd sich also alle 10 Sekunden neu..
-> nano /var/www/cpu.php
PHP:
<?php
// v0.3
session_start();
session_cache_limiter(1440);
?>

<!DOCTYPE html>
<html>
<head>
<title><?php echo $_SERVER['SERVER_NAME']; ?> - Informations</title>
<meta HTTP-EQUIV=Refresh CONTENT='10'>
<style type=text/css>
 body { font-size: 8pt; color: black; font-family: Verdana,arial,helvetica,serif; margin: 0 0 0 0; }
 .style1 {
    color: #999999;
    font-weight: bold;
 }
 div.progressbar {
    border: 1px solid gray;
    border-style: dotted;
    width: 40%;
    padding: 1px;
    background-color: #E0E0E0;
    margin: 0px;
 }

 div.progressbar div {
    height: 7px;
    background-color: #ff0000;
    width: 0%;
 }
</style>
</head>
<body>

<?php
exec("cat /sys/class/thermal/thermal_zone0/temp",$cputemp);
exec("cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq",$cpufreq);
$cputemp = $cputemp[0] / 1000;
$cpufreq = $cpufreq[0] / 1000;

$RESET = isset($_POST["RESET"]) ? $_POST["RESET"] : "";               
if (!empty($RESET)) {
    if (isset($_SESSION['max_cputemp'])) { unset($_SESSION['max_cputemp']); }
    if (isset($_SESSION['min_cputemp'])) { unset($_SESSION['min_cputemp']); }
    if (isset($_SESSION['max_cpufreq'])) { unset($_SESSION['max_cpufreq']); }
    if (isset($_SESSION['min_cpufreq'])) { unset($_SESSION['min_cpufreq']); }
}

// max
if (!isset($_SESSION['max_cputemp'])) {
    $_SESSION['max_cputemp'] = $cputemp;
} elseif ($_SESSION['max_cputemp'] < $cputemp) {
    $_SESSION['max_cputemp'] = $cputemp;
}
if (!isset($_SESSION['max_cpufreq'])) {
    $_SESSION['max_cpufreq'] = $cpufreq;
} elseif ($_SESSION['max_cpufreq'] < $cpufreq) {
    $_SESSION['max_cpufreq'] = $cpufreq;
}
// min
if (!isset($_SESSION['min_cputemp'])) {
    $_SESSION['min_cputemp'] = $cputemp;
} elseif ($cputemp < $_SESSION['min_cputemp']) {
    $_SESSION['min_cputemp'] = $cputemp;
}
if (!isset($_SESSION['min_cpufreq'])) {
    $_SESSION['min_cpufreq'] = $cpufreq;
} elseif ($cpufreq < $_SESSION['min_cpufreq']) {
    $_SESSION['min_cpufreq'] = $cpufreq;
}

$RESETFORM = "<form name='reset' action='' method='POST'>\n";
$RESETFORM.= "<button type='submit' value='true' name='RESET'>Reset</button>\n";
$RESETFORM.= "</form>\n";
?>

<blockquote>
<pre>

<?php echo $RESETFORM; ?>

<h2>CPU Temperature</h2>
<table border="1" cellpadding="5">
<th>Current</th> <th>Max</th> <th>Min</th>
<tr>
<td><?php echo $cputemp; ?> &deg;C</td>
<td><?php echo $_SESSION['max_cputemp']; ?> &deg;C</td>
<td><?php echo $_SESSION['min_cputemp']; ?> &deg;C</td>
</tr>
</table>

<h2>CPU Frequence</h2>
<table border="1" cellpadding="5">
<th>Current</th> <th>Max</th> <th>Min</th>
<tr>
<td><?php echo $cpufreq; ?> MHz</td>
<td><?php echo $_SESSION['max_cpufreq']; ?> MHz</td>
<td><?php echo $_SESSION['min_cpufreq']; ?> MHz</td>
</tr>
</table>

<span class="style1">Kernel Information:</span>
<?php echo php_uname(); ?><br/>

<span class="style1">Uptime:</span> 
<?php system("uptime"); ?>

<span class="style1">Memory Usage (MB):</span> 
<?php system("free -m"); ?>

</pre>
<p>
<?php
echo "<span class='style1'>CPU Load:</span><br/>\n";
// Change this next line to specify an alternate temporary directory.  Your
// webserver MUST have write access to this directory if you plan to call
// the CPULoad::get_load() method.
define("TEMP_PATH","/tmp/");

class CPULoad {
    function check_load() {
        $fd = fopen("/proc/stat","r");
        if ($fd) {
            $statinfo = explode("\n",fgets($fd, 1024));
            fclose($fd);
            foreach($statinfo as $line) {
                $info = explode(" ",$line);
                //echo "<pre>"; var_dump($info); echo "</pre>";
                if($info[0]=="cpu") {
                    array_shift($info);  // pop off "cpu"
                    if(!$info[0]) array_shift($info); // pop off blank space (if any)
                    $this->user = $info[0];
                    $this->nice = $info[1];
                    $this->system = $info[2];
                    $this->idle = $info[3];
//                    $this->print_current();
                    return;
                }
            }
        }
    }
    function store_load() {
        $this->last_user = $this->user;
        $this->last_nice = $this->nice;
        $this->last_system = $this->system;
        $this->last_idle = $this->idle;
    }
    function save_load() {
        $this->store_load();
        $fp = @fopen(TEMP_PATH."cpuinfo.tmp","w");
        if ($fp) {
            fwrite($fp,time()."\n");
            fwrite($fp,$this->last_user." ".$this->last_nice." ".$this->last_system." ".$this->last_idle."\n");
            fwrite($fp,$this->load["user"]." ".$this->load["nice"]." ".$this->load["system"]." ".$this->load["idle"]." ".$this->load["cpu"]."\n");
            fclose($fp);
        }
    }
    function load_load() {
        $fp = @fopen(TEMP_PATH."cpuinfo.tmp","r");
        if ($fp) {
            $lines = explode("\n",fread($fp,1024));
            $this->lasttime = $lines[0];
            list($this->last_user,$this->last_nice,$this->last_system,$this->last_idle) = explode(" ",$lines[1]);
            list($this->load["user"],$this->load["nice"],$this->load["system"],$this->load["idle"],$this->load["cpu"]) = explode(" ",$lines[2]);
            fclose($fp);
        } else {
            $this->lasttime = time() - 60;
            $this->last_user = $this->last_nice = $this->last_system = $this->last_idle = 0;
            $this->user = $this->nice = $this->system = $this->idle = 0;
        }
    }
    function calculate_load() {
        //$this->print_current();
        $d_user = $this->user - $this->last_user;
        $d_nice = $this->nice - $this->last_nice;
        $d_system = $this->system - $this->last_system;
        $d_idle = $this->idle - $this->last_idle;
        //printf("Delta - User: %f  Nice: %f  System: %f  Idle: %f<br/>",$d_user,$d_nice,$d_system,$d_idle);
        $total=$d_user+$d_nice+$d_system+$d_idle;
        if ($total<1) $total=1;
        $scale = 100.0/$total;
        $cpu_load = ($d_user+$d_nice+$d_system)*$scale;
        $this->load["user"] = $d_user*$scale;
        $this->load["nice"] = $d_nice*$scale;
        $this->load["system"] = $d_system*$scale;
        $this->load["idle"] = $d_idle*$scale;
        $this->load["cpu"] = ($d_user+$d_nice+$d_system)*$scale;
    }
    function print_current() {
        printf("Current load tickers - User: %f  Nice: %f  System: %f  Idle: %f<br/>",
            $this->user,
            $this->nice,
            $this->system,
            $this->idle
        );
    }
    function print_load() {
        printf("User: %.1f%%  Nice: %.1f%%  System: %.1f%%  Idle: %.1f%%  Load: %.1f%%<br/>",
            $this->load["user"],
            $this->load["nice"],
            $this->load["system"],
            $this->load["idle"],
            $this->load["cpu"]
        );
    }
    function get_load($fastest_sample=4) {
        $this->load_load();
        $this->cached = (time()-$this->lasttime);
        if ($this->cached>=$fastest_sample) {
            $this->check_load(); 
            $this->calculate_load();
            $this->save_load();
        }
    }
}

// NOTE: Calling $cpuload->get_load() requires that your webserver has
// write access to the /tmp directory!  If it does not have access, you
// need to edit TEMP_PATH and change the temporary directory.
$cpuload = new CPULoad();
$cpuload->get_load();
$cpuload->print_load();
$CPULOAD = round($cpuload->load["cpu"],3);

echo "<br/>The average CPU load is: ".$CPULOAD."%\n";
echo "<div class='progressbar'>\n";
echo "<div style='width: ".$CPULOAD."%; background-color: rgb(0, 204, 0);' id='serviceload'>\n";
echo " </div>\n";
echo "</div>\n";

echo "<br/><br/><br/>";
echo "<p>Page generated in ". number_format(microtime(true) - $_SERVER['REQUEST_TIME']) ." seconds</p>";
?>
</p>
</blockquote>

</body>
</html>
Aufruf im Browser: [/I]/cpu.php
(Um Maximal/Minimal Werte zu kennen muss cpu.php die ganze Zeit im Browser geöffnet sein)


Übertaktung:
Revision 1 (256MB)
Code:
force_turbo=1
arm_freq=1000
gpu_freq=333
h264_freq=300
v3d_freq=300
core_freq=500
sdram_freq=500
over_voltage=6
temp_limit=65[/SPOILER]

initial_turbo=30
Aus Sicherheitsgründen benutze ich generell eine CPU Temperatur Grenze von 65°C, sobald dieser Wert erreicht ist, taktet sich der RPI wieder auf die standard Werte runter

Bei einem stresstest über einen Zeitraum von ca. 1 Stunde erreichte der RPI mit diesen Übertaktungseinstellungen (im Gehäuse) eine Temperatur von maximal 59°C


Mit einem Wert von arm_freq=1050 und mit den restlichen Werten von oben, gab es leider Probleme mit der SD, die wurde dann bei jedem 2. Reboot als read-only eingebunden..
 
Zuletzt bearbeitet von einem Moderator:
AW: RaspberryPI Übertaktung

Hi,
habe auf den Pogoplug das cpu.php installiert. Es zeigt kein Takt und keine Temp. an. Funktioniert das nur beim Rpi?
 
AW: RaspberryPI Übertaktung

Hi aragorn,

das Script funktioniert wunderbar.
Kann man den Code nicht im Webif des IPC integrieren? Wär doch super :emoticon-0137-clapp

Gruß dev5fr



aragorn ist nur Gast und wird nicht benachrichtigt - schade.
 
AW: RaspberryPI Übertaktung

IPC funktioniert auf vielen Blattformen. Das Übertaktungs-Skript ist aber für den RPI. Das cpu.php funktioniert auf Allen (Temperaturanzeige natürlich nur wenn Sensor vorhanden).

MfG
 
Zurück
Oben