<<<L3

Connaître son ordinateur

1. Processeur

/proc/cpuinfo

> cat /proc/cpuinfo

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 60
model name	: Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz
stepping	: 3
microcode	: 0x7
cpu MHz		: 800.000
cache size	: 6144 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 4
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm
bogomips	: 6399.38
clflush size	: 64
cache_alignment	: 64
address sizes	: 39 bits physical, 48 bits virtual
power management:
....

lscpu

> lscpu 

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 158
Model name:            Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
Stepping:              9
CPU MHz:               1184.531
CPU max MHz:           3500,0000
CPU min MHz:           800,0000
BogoMIPS:              5999.92
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              6144K
NUMA node0 CPU(s):     0-3
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch invpcid_single intel_pt ssbd ibrs ibpb stibp kaiser tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d

dmidecode

sudo dmidecode -t 4 

# dmidecode 2.11
# SMBIOS entry point at 0x000f04c0
SMBIOS 2.7 present.

Handle 0x003D, DMI type 4, 42 bytes
Processor Information
	Socket Designation: SOCKET 0
	Type: Central Processor
	Family: Core i5
	Manufacturer: Intel
	ID: C3 06 03 00 FF FB EB BF
	Signature: Type 0, Family 6, Model 60, Stepping 3
	Flags:
		FPU (Floating-point unit on-chip)
		VME (Virtual mode extension)
		DE (Debugging extension)
		PSE (Page size extension)
		TSC (Time stamp counter)
		MSR (Model specific registers)
		PAE (Physical address extension)
		MCE (Machine check exception)
		CX8 (CMPXCHG8 instruction supported)
		APIC (On-chip APIC hardware supported)
		SEP (Fast system call)
		MTRR (Memory type range registers)
		PGE (Page global enable)
		MCA (Machine check architecture)
		CMOV (Conditional move instruction supported)
		PAT (Page attribute table)
		PSE-36 (36-bit page size extension)
		CLFSH (CLFLUSH instruction supported)
		DS (Debug store)
		ACPI (ACPI supported)
		MMX (MMX technology supported)
		FXSR (FXSAVE and FXSTOR instructions supported)
		SSE (Streaming SIMD extensions)
		SSE2 (Streaming SIMD extensions 2)
		SS (Self-snoop)
		HTT (Multi-threading)
		TM (Thermal monitor supported)
		PBE (Pending break enabled)
	Version: Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz
	Voltage: 1.2 V
	External Clock: 100 MHz
	Max Speed: 3800 MHz
	Current Speed: 3200 MHz
	Status: Populated, Enabled
	Upgrade: Socket BGA1155
	L1 Cache Handle: 0x003F
	L2 Cache Handle: 0x003E
	L3 Cache Handle: 0x0040
	Serial Number: Not Specified
	Asset Tag: Fill By OEM
	Part Number: Fill By OEM
	Core Count: 4
	Core Enabled: 4
	Thread Count: 4
	Characteristics:
		64-bit capable

Technologies vectorielles disponibles : SSE et AVX

cat /proc/cpuinfo | grep "flags" | uniq | cut -d':' -f2 | tr ' ' '\n' | grep "sse"
sse
sse2
ssse3
sse4_1
sse4_2
cat /proc/cpuinfo | grep "flags" | uniq | cut -d':' -f2 | tr ' ' '\n' | grep "avx"
avx
avx2

Nombre de processeurs : /sys/devices/system/cpu/

ls /sys/devices/system/cpu/ | grep -E "cpu[0-9]+" | wc -l
4

Fréquence maximum

cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq 
3201000

soit 3.2 Ghz

mémoires caches

a=`ls /sys/devices/system/cpu/cpu0/cache/ | wc -l` && expr $a - 1
3

On peut extraire de plus amples informations en affichant les éléments dans /sys/devices/system/cpu/cpu0/cache/index[0..3] :

Cache L1 Data 32ko

cd /sys/devices/system/cpu/cpu0/cache/index0
cat -b level type size ways_of_associativity number_of_sets 
     1	1
     2	Data
     3	32K
     4	8
     5	64

Cache L1 Instructions 32ko

cd ../index1
cat -b level type size ways_of_associativity number_of_sets 
     1	1
     2	Instruction
     3	32K
     4	8
     5	64

Cache L2 Unifié 256ko

cd ../index2
cat -b level type size ways_of_associativity number_of_sets 
     1	2
     2	Unified
     3	256K
     4	8
     5	512

Cache L3 Unifié 6Mo

cd ../index3
cat -b level type size ways_of_associativity number_of_sets 
     1	3
     2	Unified
     3	6144K
     4	12
     5	8192

Utiliser le petit programme suivant pour obtenir les informations sur le cache :

  1. #!/bin/sh
  2. input_dir="/sys/devices/system/cpu/cpu0/cache"
  3. levels=`ls -d ${input_dir}/index[0-9]`
  4. levels=`echo $levels | tr ' ' '\n' | wc -l`
  5. level=0
  6. while [ $level -lt $levels ] ; do
  7.     size=`cat ${input_dir}/index${level}/size | awk '{ printf("%6s",$1);}'`
  8.     type=`cat ${input_dir}/index${level}/type | awk '{ printf("%12s",$1);}'`
  9.     levl=`cat ${input_dir}/index${level}/level`
  10.     assc=`cat ${input_dir}/index${level}/ways_of_associativity`
  11.     lnsz=`cat ${input_dir}/index${level}/coherency_line_size`
  12.     echo "L$levl $type $size ${assc}-way-set-associative ${lnsz} bytes"
  13.     level=`expr $level + 1`
  14. done
  15.  

L1         Data    32K 8-way-set-associative 64 bytes
L1  Instruction    32K 8-way-set-associative 64 bytes
L2      Unified   256K 4-way-set-associative 64 bytes
L3      Unified  6144K 12-way-set-associative 64 bytes

lstopo

Installer le package hwloc

> sudo apt install hwloc
> lstopo
Keyboard shortcuts:
 Zoom-in or out .................... + -
 Try to fit scale to window ........ f F
 Reset scale to default ............ 1
 Scroll vertically ................. Up Down PageUp PageDown
 Scroll horizontally ............... Left Right Ctrl+PageUp/Down
 Scroll to the top-left corner ..... Home
 Scroll to the bottom-right corner . End
 Exit .............................. q Q Esc

2. Carte mère (MSI H77MA-G43)

dmidecode -t 2

sudo dmidecode -t 2

# dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
	Manufacturer: MSI
	Product Name: H77MA-G43 (MS-7756)
	Version: 1.0
	Serial Number: To be filled by O.E.M.
	Asset Tag: To be filled by O.E.M.
	Features:
		Board is a hosting board
		Board is replaceable
	Location In Chassis: To be filled by O.E.M.
	Chassis Handle: 0x0003
	Type: Motherboard
	Contained Object Handles: 0

3. Mémoire

/proc/meminfo

cat /proc/meminfo

MemTotal:        8226928 kB
MemFree:         6135524 kB
Buffers:          313364 kB
Cached:           820804 kB
SwapCached:            0 kB
Active:          1126180 kB
Inactive:         768892 kB
Active(anon):     762172 kB
Inactive(anon):     2464 kB
Active(file):     364008 kB
Inactive(file):   766428 kB
Unevictable:          16 kB
Mlocked:              16 kB
HighTotal:       7428968 kB
HighFree:        5819076 kB
LowTotal:         797960 kB
LowFree:          316448 kB
SwapTotal:       8270844 kB
SwapFree:        8270844 kB
Dirty:               168 kB
Writeback:             0 kB
AnonPages:        760676 kB
Mapped:           202584 kB
Shmem:              3736 kB
Slab:             117536 kB
SReclaimable:      97196 kB
SUnreclaim:        20340 kB
KernelStack:        4016 kB
PageTables:        13460 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    12384308 kB
Committed_AS:    4131780 kB
VmallocTotal:     122880 kB
VmallocUsed:       56652 kB
VmallocChunk:      54548 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       81912 kB
DirectMap2M:      831488 kB

dmidecode -t 16,17

sudo dmidecode -t 16,17

# dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x003F, DMI type 16, 23 bytes
Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: None
	Maximum Capacity: 32 GB
	Error Information Handle: Not Provided
	Number Of Devices: 4

Handle 0x0041, DMI type 17, 34 bytes
Memory Device
	Array Handle: 0x003F
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 4096 MB
	Form Factor: DIMM
	Set: None
	Locator: ChannelA-DIMM0
	Bank Locator: BANK 0
	Type: DDR3
	Type Detail: Synchronous
	Speed: 1333 MHz
	Manufacturer: Kingston
	Serial Number: 541C701A
	Asset Tag: 9876543210
	Part Number: 9905403-400.A00LF 
	Rank: 2
	Configured Clock Speed: 1333 MHz

Handle 0x0043, DMI type 17, 34 bytes
Memory Device
	Array Handle: 0x003F
	Error Information Handle: Not Provided
	Total Width: Unknown
	Data Width: Unknown
	Size: No Module Installed
	Form Factor: DIMM
	Set: None
	Locator: ChannelA-DIMM1
	Bank Locator: BANK 1
	Type: Unknown
	Type Detail: None
	Speed: Unknown
	Manufacturer: [Empty]
	Serial Number: [Empty]
	Asset Tag: 9876543210
	Part Number: [Empty]
	Rank: Unknown
	Configured Clock Speed: Unknown

Handle 0x0044, DMI type 17, 34 bytes
Memory Device
	Array Handle: 0x003F
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 4096 MB
	Form Factor: DIMM
	Set: None
	Locator: ChannelB-DIMM0
	Bank Locator: BANK 2
	Type: DDR3
	Type Detail: Synchronous
	Speed: 1333 MHz
	Manufacturer: Kingston
	Serial Number: 871CDF78
	Asset Tag: 9876543210
	Part Number: 9905403-400.A00LF 
	Rank: 2
	Configured Clock Speed: 1333 MHz

Handle 0x0046, DMI type 17, 34 bytes
Memory Device
	Array Handle: 0x003F
	Error Information Handle: Not Provided
	Total Width: Unknown
	Data Width: Unknown
	Size: No Module Installed
	Form Factor: DIMM
	Set: None
	Locator: ChannelB-DIMM1
	Bank Locator: BANK 3
	Type: Unknown
	Type Detail: None
	Speed: Unknown
	Manufacturer: [Empty]
	Serial Number: [Empty]
	Asset Tag: 9876543210
	Part Number: [Empty]
	Rank: Unknown
	Configured Clock Speed: Unknown

4. Disques

lshw

sudo lshw -class disk

  *-disk                  
       description: ATA Disk
       produit: WDC WD10EARS-00Y
       fabriquant: Western Digital
       identifiant matériel: 0
       information bus: scsi@2:0.0.0
       nom logique: /dev/sda
       version: 80.0
       numéro de série: WD-WCAV5N502286
       taille: 931GiB (1TB)
       fonctionnalités: partitioned partitioned:dos
       configuration: ansiversion=5 signature=0002360e
  *-cdrom
       description: DVD-RAM writer
       produit: CDDVDW SH-S223C
       fabriquant: TSSTcorp
       identifiant matériel: 1
       information bus: scsi@4:0.0.0
       nom logique: /dev/cdrom
       nom logique: /dev/cdrw
       nom logique: /dev/dvd
       nom logique: /dev/dvdrw
       nom logique: /dev/sr0
       version: SB06
       fonctionnalités: removable audio cd-r cd-rw dvd dvd-r dvd-ram
       configuration: ansiversion=5 status=nodisc

hwinfo

hwinfo --disk

> hal.1: read hal dataprocess 4619: arguments to dbus_move_error() were incorrect, assertion "(dest) == NULL || !dbus_error_is_set ((dest))" failed in file ../../dbus/dbus-errors.c line 282.
This is normally a bug in some application using the D-Bus library.
libhal.c 3483 : Error unsubscribing to signals, error=The name org.freedesktop.Hal was not provided by any .service files
17: IDE 200.0: 10600 Disk                                       
  [Created at block.243]
  Unique ID: 3OOL.54D+2nquCJF
  Parent ID: w7Y8.X4nJrxWpv37
  SysFS ID: /class/block/sda
  SysFS BusID: 2:0:0:0
  SysFS Device Link: /devices/pci0000:00/0000:00:1f.2/host2/target2:0:0/2:0:0:0
  Hardware Class: disk
  Model: "WDC WD10EARS-00Y"
  Vendor: "WDC"
  Device: "WD10EARS-00Y"
  Revision: "80.0"
  Serial ID: "WD-WCAV5N502286"
  Driver: "ahci", "sd"
  Driver Modules: "ahci"
  Device File: /dev/sda
  Device Files: /dev/sda, /dev/disk/by-id/ata-WDC_WD10EARS-00Y5B1_WD-WCAV5N502286, /dev/disk/by-id/scsi-SATA_WDC_WD10EARS-00_WD-WCAV5N502286, /dev/disk/by-id/wwn-0x50014ee2b022e571, /dev/disk/by-path/pci-0000:00:1f.2-scsi-2:0:0:0
  Device Number: block 8:0-8:15
  BIOS id: 0x80
  Geometry (Logical): CHS 121601/255/63
  Size: 1953525168 sectors a 512 bytes
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #12 (SATA controller)

smartctl

installer avec sudo apt-get install smartmontools

sudo smartctl -i /dev/sda

smartctl 5.41 2011-06-09 r3365 [i686-linux-3.2.0-29-generic-pae] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Caviar Green (Adv. Format)
Device Model:     WDC WD10EARS-00Y5B1
Serial Number:    WD-WCAV5N502286
LU WWN Device Id: 5 0014ee 2b022e571
Firmware Version: 80.00A80
User Capacity:    1 000 204 886 016 bytes [1,00 TB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Fri Sep 13 13:23:34 2013 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

4. Cartes graphiques

lspci

lspci | grep "VGA compatible controller"
00:02.0 VGA compatible controller: Intel Corporation Haswell Integrated Graphics Controller (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GK106 [GeForce GTX 660] (rev a1)

lspci -nnk | egrep -iA3 "VGA"

00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell Integrated Graphics Controller [8086:0412] (rev 06)
	Subsystem: Micro-Star International Co., Ltd. Device [1462:7823]
	Kernel driver in use: i915
00:03.0 Audio device [0403]: Intel Corporation Haswell HD Audio Controller [8086:0c0c] (rev 06)
--
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK106 [GeForce GTX 660] [10de:11c0] (rev a1)
	Subsystem: Micro-Star International Co., Ltd. Device [1462:2871]
01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:0e0b] (rev a1)
	Subsystem: Micro-Star International Co., Ltd. Device [1462:2871]

lshw

sudo lshw -enable pci -class display

  *-display               
       description: VGA compatible controller
       produit: Haswell Integrated Graphics Controller
       fabriquant: Intel Corporation
       identifiant matériel: 2
       information bus: pci@0000:00:02.0
       version: 06
       bits: 64 bits
       horloge: 33MHz
       fonctionnalités: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       ressources: irq:46 mémoire:db400000-db7fffff mémoire:c0000000-cfffffff portE/S:f000(taille=64)
  *-display NON-RÉCLAMÉ
       description: VGA compatible controller
       produit: GK106 [GeForce GTX 660]
       fabriquant: NVIDIA Corporation
       identifiant matériel: 0
       information bus: pci@0000:01:00.0
       version: a1
       bits: 64 bits
       horloge: 33MHz
       fonctionnalités: pm msi pciexpress vga_controller cap_list
       configuration: latency=0
       ressources

drivers utilisés

grep /drivers/ /var/log/Xorg.0.log

[    16.220] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[    16.314] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[    16.314] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[    16.314] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so