Skip to main content

Collect information about x86 CPU

Project description

Uses cpuid instruction to get information about CPU.

Queries OS as well as cpuid to see if the OS / CPU supports AVX instructions.

Quickstart

>>> from x86cpu import info
>>> print(info.model_display, info.family_display)
(69, 6)
>>> print(info.vendor)
GenuineIntel
>>> print(info.brand)
'Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz'

You can run the cpuid command directly. The argument to cpuid goes into the EAX register before calling the CPUID instruction:

>>> from x86cpu import cpuid
>>> cpuid(1)
{'eax': 263761L, 'ebx': 17827840L, 'ecx': 2147154879L, 'edx': 3219913727L}

Some CPUID commands also care about the value in the ECX register. You can set this with a second optional argument to cpuid:

>>> cpuid(13, 1)
{'eax': 1, 'ebx': 0, 'ecx': 0, 'edx': 0}

The package installs a command line tool x86report giving output like this:

$ x86report
x86cpu report
-------------
brand            : Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz
vendor           : GenuineIntel
model (display)  : 69
family (display) : 6
model            : 5
family           : 6
extended model   : 4
extended family  : 0
stepping         : 1
processor type   : 0
signature        : 263761
MMX              : True
3DNow!           : True
SSE              : True
SSE2             : True
SSE3             : True
SSSE3            : True
SSE4.1           : True
SSE4.2           : True
supports AVX     : True
supports AVX2    : True

Code

See https://github.com/matthew-brett/x86cpu

Released under the BSD two-clause license - see the file LICENSE in the source distribution.

The latest released version is at https://pypi.python.org/pypi/x86cpu

Support

Please put up issues on the x86cpu issue tracker.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for x86cpu, version 0.4
Filename, size File type Python version Upload date Hashes
Filename, size x86cpu-0.4-cp27-none-macosx_10_6_intel.whl (41.5 kB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size x86cpu-0.4-cp27-none-win32.whl (26.0 kB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size x86cpu-0.4-cp27-none-win_amd64.whl (27.7 kB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size x86cpu-0.4-cp34-none-win32.whl (26.2 kB) File type Wheel Python version cp34 Upload date Hashes View hashes
Filename, size x86cpu-0.4-cp34-none-win_amd64.whl (27.7 kB) File type Wheel Python version cp34 Upload date Hashes View hashes
Filename, size x86cpu-0.4-cp35-cp35m-macosx_10_6_intel.whl (46.2 kB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size x86cpu-0.4-cp35-none-win32.whl (26.6 kB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size x86cpu-0.4-cp35-none-win_amd64.whl (29.1 kB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size x86cpu-0.4-cp36-cp36m-macosx_10_6_intel.whl (46.2 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size x86cpu-0.4-cp36-none-win32.whl (29.8 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size x86cpu-0.4-cp36-none-win_amd64.whl (33.1 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size x86cpu-0.4-cp37-cp37m-macosx_10_9_x86_64.whl (27.6 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size x86cpu-0.4-cp37-none-win32.whl (29.7 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size x86cpu-0.4-cp37-none-win_amd64.whl (32.9 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size x86cpu-0.4.tar.gz (57.4 kB) File type Source Python version None Upload date Hashes View hashes
Filename, size x86cpu-0.4.zip (63.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page