Page 1 of 1

how can i get cpu information in a guest-linux-system?

Posted: 25. Oct 2010, 22:11
by iiiyyyhhhsss
I can get cpu information by using the command "dmidecode" in a host-linux-system.

But, I failure in a guest-linux-system.

who can tell me how?

Re: how can i get cpu information in a guest-linux-system?

Posted: 25. Oct 2010, 22:33
by Perryg
dmidecode runs as su or sudo and works the same on a guest as it does on a host.
Are you sure that the Linux OS you are trying to use this on has it installed?

Re: how can i get cpu information in a guest-linux-system?

Posted: 26. Oct 2010, 03:54
by iiiyyyhhhsss
Perryg wrote:dmidecode runs as su or sudo and works the same on a guest as it does on a host.
Are you sure that the Linux OS you are trying to use this on has it installed?


Yes,i has "dmidecode" installed, and i use "dmidecode" as su...

And I can't get cpu-information but bios-information,,,,,what i can get is :
************************************
SMBIOS 2.5 present.
5 structures occupying 352 bytes.
Table at 0x000E1000.

Handle 0x0000, DMI type 0, 20 bytes.
BIOS Information
Vendor: innotek GmbH
Version: VirtualBox
Release Date: 12/01/2006
Address: 0xE0000
Runtime Size: 128 kB
ROM Size: 128 kB
Characteristics:
ISA is supported
PCI is supported
Boot from CD is supported
Selectable boot is supported
8042 keyboard services are supported (int 9h)
CGA/mono video services are supported (int 10h)
ACPI is supported

Handle 0x0001, DMI type 1, 27 bytes.
System Information
Manufacturer: innotek GmbH
Product Name: VirtualBox
Version: 1.2
Serial Number: 0
UUID: 39DACAC1-4937-4400-8D92-110020A54EA5
Wake-up Type: Power Switch
SKU Number: Not Specified
Family: Virtual Machine

Handle 0x0003, DMI type 126, 13 bytes.
Inactive

Handle 0x0002, DMI type 126, 7 bytes.
Inactive

Handle 0xFEFF, DMI type 127, 147 bytes.
End Of Table
*****************************************


As you can see,I can't get anything about cpu-information.

Re: how can i get cpu information in a guest-linux-system?

Posted: 26. Oct 2010, 04:43
by Perryg
More than likely the reason is due to it being a virtual processor.
If you want to see the CPU info with flags you need to run

Code: Select all

cat /proc/cpuinfo

Re: how can i get cpu information in a guest-linux-system?

Posted: 26. Oct 2010, 06:18
by iiiyyyhhhsss
thak you.
actually what i want to get is cpuid.

But, i can't get cpuid by using "cat /proc/cpuinfo".
Perryg wrote:More than likely the reason is due to it being a virtual processor.
If you want to see the CPU info with flags you need to run

Code: Select all

cat /proc/cpuinfo

Re: how can i get cpu information in a guest-linux-system?

Posted: 28. Oct 2010, 05:14
by iiiyyyhhhsss
In a host os ,I can get ID-Information :

[root@people-earth people]# dmidecode -t processor
# dmidecode 2.10
SMBIOS 2.5 present.

Handle 0x0004, DMI type 4, 40 bytes
Processor Information
Socket Designation: LGA 775
Type: Central Processor
Family: Core 2 Quad
Manufacturer: Intel
ID: 7A 06 01 00 FF FB EB BF
Signature: Type 0, Family 6, Model 23, Stepping 10
Flags:

***********************************

But, in a guest os,
"dmidecode" show nothing about ID-Information,
so does "cat /proc/cpuinfo".