public function getCPU()
    {

        // Time?
        if (!empty($this->settings['timer'])) {
            $t = new Timer('CPU');
        }

        // Parse dmesg
        if (preg_match_all('/^cpu\d+ at [^:]+: (\S+) ([^,]+), (\d+)MHz/m', $this->dmesg, $cpu_matches, PREG_SET_ORDER) == 0) {
            return [];
        }

        // Store them here
        $cpus = [];

        // Store as many as possible
        foreach ($cpu_matches as $cpu_m) {
            $cpus[] = array(
                'Model' => $cpu_m[2],
                'MHz' => $cpu_m[3],
                'Vendor' => $cpu_m[1],
            );
        }

        // Give them
        return $cpus;
    }
public function getCPU()
    {

        // Time?
        if (!empty($this->settings['timer'])) {
            $t = new Timer('CPU');
        }

        // Parse dmesg
        if (preg_match_all('/^cpu\d+ at [^:]+: (\S+) ([^,]+), (\d+)MHz/m', $this->dmesg, $cpu_matches, PREG_SET_ORDER) == 0) {
            return [];
        }

        // Store them here
        $cpus = [];

        // Store as many as possible
        foreach ($cpu_matches as $cpu_m) {
            $cpus[] = array(
                'Model' => $cpu_m[2],
                'MHz' => $cpu_m[3],
                'Vendor' => $cpu_m[1],
            );
        }

        // Give them
        return $cpus;
    }
public function getCPU ( ) { // Time? if ( ! empty ( $ this -> settings [ 'timer' ] ) ) { $ t = new Timer ( 'CPU' ) ; } // Parse dmesg if ( preg_match_all ( '/^cpu\d+ at [^:]+: (\S+) ([^,]+), (\d+)MHz/m' , $ this -> dmesg , $ cpu_matches , PREG_SET_ORDER ) == 0 ) { return [ ] ; } // Store them here $ cpus = [ ] ; // Store as many as possible foreach ( $ cpu_matches as $ cpu_m ) { $ cpus [ ] = array ( 'Model' => $ cpu_m [ 2 ] , 'MHz' => $ cpu_m [ 3 ] , 'Vendor' => $ cpu_m [ 1 ] , ) ; } // Give them return $ cpus ; }
Get cpu's
Get cpu s