Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get CPU/GPU/memory information

I need to get any information about the CPU/GPU/memory.The number of cores, memory value, memory and cpu usage... I found a way to do this for IE:How to Use JavaScript to Find Hardware Information

solutions for other browsers I do not know. Any idea how to do it? maybe webgl has access to information about your computer? or flash? or any other technology?

Thank you very much

like image 943
Alex Nester Avatar asked Mar 17 '13 19:03

Alex Nester


People also ask

How do I know what memory my GPU has?

In the Display Settings box, select Advanced Display Settings and then choose the Display Adapter properties option. On the Adapter tab in the box, you should see the brand of the graphics card and its memory amount listed.


1 Answers

This code will print GPU infos an will list all info you can have with the performance object of this browser (there is no standard for the BOM so it changes for each browser).

<html>    <body>    <canvas id="glcanvas" width="0" height="0"></canvas>    <script>      var performance = window.performance || window.mozPerformance || window.msPerformance || window.webkitPerformance || {};        document.write("<br>");      for (var value in performance) {        document.write(value + "<br>");      }        document.write("<br><br><br>");        var canvas;      canvas = document.getElementById("glcanvas");      var gl = canvas.getContext("experimental-webgl");        document.write(gl.getParameter(gl.RENDERER) + "<br>");      document.write(gl.getParameter(gl.VENDOR) + "<br>");      document.write(getUnmaskedInfo(gl).vendor + "<br>");      document.write(getUnmaskedInfo(gl).renderer + "<br>");          function getUnmaskedInfo(gl) {        var unMaskedInfo = {          renderer: '',          vendor: ''        };          var dbgRenderInfo = gl.getExtension("WEBGL_debug_renderer_info");        if (dbgRenderInfo != null) {          unMaskedInfo.renderer = gl.getParameter(dbgRenderInfo.UNMASKED_RENDERER_WEBGL);          unMaskedInfo.vendor = gl.getParameter(dbgRenderInfo.UNMASKED_VENDOR_WEBGL);        }          return unMaskedInfo;      }    </script>  </body>

Output in Chrome :

onresourcetimingbufferfull onwebkitresourcetimingbufferfull timing navigation memory now getEntries getEntriesByType getEntriesByName clearResourceTimings setResourceTimingBufferSize webkitClearResourceTimings webkitSetResourceTimingBufferSize mark clearMarks measure clearMeasures addEventListener removeEventListener dispatchEvent    WebKit WebGL WebKit NVIDIA Corporation NVIDIA GeForce GTX 775M OpenGL Engine 

Output in Firfox :

now getEntries getEntriesByType getEntriesByName clearResourceTimings setResourceTimingBufferSize mark clearMarks measure clearMeasures toJSON timing navigation onresourcetimingbufferfull    Mozilla Mozilla 

Output in Safari :

navigation timing now    WebKit WebGL WebKit NVIDIA Corporation NVIDIA GeForce GTX 775M OpenGL Engine 
like image 169
Thomas Avatar answered Sep 19 '22 18:09

Thomas