Code covered by the BSD License  

Highlights from
CPU Info

4.5

4.5 | 2 ratings Rate this file 16 Downloads (last 30 days) File Size: 3.2 KB File ID: #33155
image thumbnail

CPU Info

by Ben Tordoff

 

06 Oct 2011 (Updated 09 Nov 2011)

Read various bits of information about the CPU and operating system.

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

| Watch this File

File Information
Description

This function reads various bits of information about the CPU and operating

system, including:

 * CPU name

 * CPU clock speed

 * CPU Cache size (L2)

 * Number of physical CPU cores

 * Operating system name & version

These are provided by /proc/cpu (Unix), sysctl (Mac) or WMIC (Windows).

Requires MATLAB R2010a or above.

MATLAB release MATLAB 7.10 (2010a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
11 Nov 2011 Stephen  
24 Dec 2011 Daniel Dolan

This function does exactly what it says it should. Is there a way to pull a serial number from the CPU?

04 Jan 2012 Ben Tordoff

Hi Daniel, I don't know much about CPU serial numbers, but from what I've read they don't exist in modern CPUs. See e.g.: http://en.wikipedia.org/wiki/Processor_Serial_Number#Controversy_about_privacy_issues

When I ask for the serial on my CPUs (on linux) I just get "none specified".

It might be possible to get the motherboard serial number, although I haven't managed to get it on Linux without sudo'ing (not a problem on Windows as far as I can tell).

What is it you want to achieve?

Cheers. Ben

Please login to add a comment or rating.
Updates
09 Nov 2011

Fix for multi-socket Windows boxes.

Tag Activity for this File
Tag Applied By Date/Time
cpu Ben Tordoff 17 Oct 2011 08:51:14
operating system Ben Tordoff 17 Oct 2011 08:51:14
cpu Daniel Dolan 24 Dec 2011 12:29:00
potw Lindsay Coutinho 27 Dec 2011 11:12:02
pick of the week Lindsay Coutinho 27 Dec 2011 11:12:03

Contact us at files@mathworks.com