![]() We could pipe the output from the original command to another sed with the loop instead to avoid working on the whole stream: $ lscpu | sed -nr '/Model name/ s/.*:\s*(.*). This won't take a noticeable amount of time when we're only parsing the output of lscpu, but on a huge file or on multiple files, it could get pretty slow. Notice that it won't take an address, so we had to chew through the whole stream before selecting the line. This :a s/ / / ta keeps on processing the stream until there are no double spaces anywhere. The doesn't work if there are more than two spaces anywhere, so to delete multiple spaces relentlessly, use a sed loop: $ lscpu | sed -nr ':a s/ / / ta /Model name/ s/.*: (.*). To get rid of double spaces, you can do an extra s command: $ lscpu | sed -nr '/Model name/ s/ / /g s/.*:\s*(.*). (.*) save any number of characters before ' \1 reference to saved pattern.*:\s* anything before a colon, a colon, and any amount of horizontal space /Model name/ find the line with Model name.-n don't print anything until we ask for it.Print out cpu/processor related informationĬPU: Quad core Intel Core2 Quad CPU Q8400 (-MCP-) cache: 2048 KB flags: (lm nx sse sse2 sse3 sse4_1 ssse3 vmx)Ĭlock Speeds: 1: 1998.00 MHz 2: 1998.00 MHz 3: 1998.00 MHz 4: 1998.$ lscpu | sed -nr '/Model name/ s/.*:\s*(.*). Structured easy to read report about various hardware components on the Inxi is a script that uses other programs to generate a well SSE Streaming SIMD Extensions instruction set Model 7 - Pentium III/Pentium III Xeon - external L2 cacheĮxtended brand string: "Intel(R) Core(TM)2 Quad CPU Q8400 2.66GHz"ĪPIC On-chip Advanced Programmable Interrupt Controller present and enabledĬMOV Conditional Move and Compare InstructionsįXSR Fast FP/MMX Streaming SIMD Extensions save/restore The program can be installed with apt on ubuntu The cpuid command fetches CPUID information about Intel and AMD x86 processors. ![]() ![]() Version: Intel(R) Core(TM)2 Quad CPU Q8400 2.66GHz Signature: Type 0, Family 6, Model 23, Stepping 10ĬMOV (Conditional move instruction supported)įXSR (FXSAVE and FXSTOR instructions supported) You can easily read its content and display it to the terminal on standard output by using the cat command. The dmidecode command displays some information about the cpu, which includes the socket type, vendor name and various flags. The /proc/cpuinfo is a read-only file that contains information about the central processing units on a machine. Note that the number of processing units might not always be The nproc command just prints out the number of processing unitsĪvailable. However it is not possible to deduce the number of cores on The vendor, model and speed of the processor are being shownĬorrectly. Product: Intel(R) Core(TM)2 Quad CPU Q8400 2.66GHzīus info: Intel(R) Core(TM)2 Quad CPU Q8400 2.66GHzĬapabilities: fpu fpu_exception wp 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 x86-64 constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dtherm tpr_shadow vnmi flexpriority cpufreq '-class' option can be used to pickup information about a specific lshwīy default shows information about various hardware parts, and the The lshw command can display limited information about the cpu. Hardinfo also performs a few benchmark tests taking a few minutes before the report is displayed. The report can also be written to a text file. The cpu information is towards theīeginning of the report. It would produce a large report about many hardware parts, by readingįiles from the /proc directory. But it can also run from the command line only if Hardinfo is a gtk based gui tool that generates reports about various Would simply print the cpu hardware details in a user-friendly format. Lscpu is a small and quick command that does not need any options. This indicates that there are 4 actual cores. To get the actual number of cores, check the core id for unique values For example a processor with 2 cores and hyperthreading would be reported as a processor with 4 cores. ![]() $ cat /proc/cpuinfo | grep processor | wc -lĤ The number of processors shown by /proc/cpuinfo might not be the actual number of cores on the processor. To count the number of processing units use grep with wc Model name : Intel(R) Core(TM)2 Quad CPU Q8400 2.66GHzįlags : 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 vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dtherm tpr_shadow vnmi flexpriorityĪddress sizes : 36 bits physical, 48 bits virtualĮvery processor or core is listed separately the various detailsĪbout speed, cache size and model name are included in the description.
0 Comments
Leave a Reply. |