[[Vorlage(getestet,general)]] {{{#!vorlage Wissen [:Terminal:Ein Terminal öffnen] }}} [[Inhaltsverzeichnis(1)]] [[Bild(Wiki/Icons/terminal.png, 48, align=left)]] '''l'''i'''s'''t '''cpu''' gehört zu einer Gruppe von Kommandozeilen-Befehlen, die alle mit ''"ls"'' beginnen (z.B. `lspci`, `lsusb`, `lspcmcia`) und Informationen zu bestimmten Hardware-Komponenten liefern. Wie der Name schon sagt, in diesem Fall zum Prozessor. Bei zwei Anwendungsfällen ist der Befehl besonders nützlich: 1. Ist die CPU für ein [:CPU-Architektur:64-Bit] Betriebssystem geeignet? 1. Anzahl der Kerne des Prozessors Siehe auch [:Gerätemanager:] und [:Systeminformationen_ermitteln:]. = Installation = lscpu ist in jeder Standardinstallation vorhanden und im Paket * '''util-linux''' enthalten. = Benutzung = Die allgemeine Syntax lautet [1]: {{{#!vorlage Befehl lscpu OPTIONEN }}} Die Angabe von `OPTIONEN` ist nicht zwingend erforderlich. Diese können bei Bedarf mit {{{#!vorlage Befehl lscpu --help }}} angezeigt werden. == Beispiel == Hier die Ausgabe für einen Intel [wikipedia:Liste_der_Intel-Core-Prozessoren#Core_2_Quad:Core2 Quad]: {{{ Architecture: x86_64 [mark]CPU op-mode(s)[/mark]: 32-bit, 64-bit Byte Order: Little Endian CPU(s): 4 [mark]On-line CPU(s) list[/mark]: 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: 23 Stepping: 7 [mark]CPU MHz[/mark]: 2000.000 BogoMIPS: 4666.41 L1d cache: 32K L1i cache: 32K L2 cache: 2048K NUMA node0 CPU(s): 0-3 }}} Auf einem Rechner mit diesem Prozessor kann sowohl eine 32- als auch eine 64-Bit-Version von Ubuntu genutzt werden (`CPU op-mode(s): 32-bit, 64-bit`; `Architecture` verweist dagegen auf die installierte Betriebssystem-Architektur). Die Zählung der Einzelkerne beginnt nicht bei `1`, sondern bei `0` (`0-3` = 4 Kerne). Zu beachten ist, dass nicht die maximale, sondern die augenblickliche Taktfrequenz angezeigt wird. Zum Vergleich die deutlich längere Ausgabe des Befehlszeilen-Klassikers: {{{#!vorlage Befehl cat /proc/cpuinfo }}} {{{ processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Quad CPU Q8200 @ 2.33GHz stepping : 7 cpu MHz : 2000.000 cache size : 2048 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 4 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 10 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 lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm dts bogomips : 4666.74 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Quad CPU Q8200 @ 2.33GHz stepping : 7 cpu MHz : 2000.000 cache size : 2048 KB physical id : 0 siblings : 4 core id : 3 cpu cores : 4 apicid : 3 initial apicid : 3 fpu : yes fpu_exception : yes cpuid level : 10 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 lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm dts bogomips : 4666.43 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 2 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Quad CPU Q8200 @ 2.33GHz stepping : 7 cpu MHz : 2000.000 cache size : 2048 KB physical id : 0 siblings : 4 core id : 1 cpu cores : 4 apicid : 1 initial apicid : 1 fpu : yes fpu_exception : yes cpuid level : 10 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 lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm dts bogomips : 4666.39 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 3 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Quad CPU Q8200 @ 2.33GHz stepping : 7 cpu MHz : 2000.000 cache size : 2048 KB physical id : 0 siblings : 4 core id : 2 cpu cores : 4 apicid : 2 initial apicid : 2 fpu : yes fpu_exception : yes cpuid level : 10 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 lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm dts bogomips : 4666.41 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: }}} Um zu ermitteln, ob der Prozessor 64-bit-fähig ist, verwendet man folgenden Befehl: {{{#!vorlage Befehl lscpu | grep -i 'CPU o' }}} Während ein reiner 32-bit-Prozessor dementsprechend "`32-bit`" zurückmeldet, lautet die Ausgabe bei 64-bit-fähigen CPUs "`32-bit 64-bit`". = Links = * [:Shell/Befehlsübersicht:] - Übersicht über verschiedene Shellbefehle #tag: Shell