Obtain CPU Information
It mainly uses the Assembly command CPUID and RDTSC
Directly run the Code:
// ================================================ ========================================================== * The CPUID command is an assembly command for obtaining CPU information in intel IA32 architecture, the
First introduce the service and then call the
This paper is reproduced from http://blog.sina.com.cn/s/blog_7eeb43210101hf7f.html
public class Computer {public static string CpuID;//1.cpu serial number public static string MacAddress;//2. Mac serial number public static string DiskID; 3. Hard disk ID public static string ipaddress; 4.ip address public static string loginusername; 5. Login username public
The CPU serial number is a unique number that is built inside the processor and cannot be modified. It consists of 96 digits. The high 32-bit is the CPU ID used to identify the CPU type. The low 64 bits each processor is different and uniquely represents the processor. The CPU number can be used to identify each proces
the voidGetcpuidex (unsignedintcpuinfo[4], unsignedintInfoType, unsignedintecxvalue) - { the #ifDefined (_msc_ver)//MSVC the #ifDefined (_win64)//Inline assembly is not supported under 64-bit. 1600:vs2010, it is said that VC2008 SP1 after the support of __cpuidex. the__cpuidex ((int*)(void*) CPUInfo, (int) InfoType, (int) ecxvalue);94 #else the if(Null==cpuinfo)return; the _asm{ the //load. Read the parameters to the register.98 mov edi, CPUInfo; About mov eax, infotype; - mov ecx,
Article Title: View hard disk parameters, CPU parameter temperature, and so on. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1) view hard disk parameters:
Hdparm/dev/hda
My hard disk display:
/Dev/hda:
Multcount = 16 (on)
IO_support = 1 (32-bit)
Unmaskirq = 1 (on)
Using_dma = 1 (on)
Keepsettings = 0 (off)
Readon
version:oracle UDP/IP (generic)
IPC Vendor 1 Proto 2
Fri 24 12:49:27 2015
Check the number of CPUs by querying/proc/cpuinfo
processor:191
Vendor_id:genuineintel
CPU Family:6
model:62
Model Name:intel (R) Xeon (r) CPU e7-8850 v2 @ 2.30GHz
Stepping:7
CPU mhz:1200.000
Cache size:24576 KB
Physical Id:7
Siblings:24
Core Id:13
CPU
Recently saw the forum someone needs to read the system in the Java CPU frequency and usage rate, search the Internet for a while, found some useful things, summed up in this.
First, get the CPU frequency
1, read from the registry
The key Hklm/hardware/description/system/centralprocessor/0/~mhz in the registry corresponds to the CPU's central frequency.
But this method has certain limitations, that is, some
In Linux, view the cpu information-general Linux technology-Linux technology and application information. The following is a detailed description. View cpu information:
[Junjie2 @ ljj ~] $ Cat/proc/cpuinfo
Processor: 0
Vendor_id: GenuineIntel
Cpu family: 6
Model: 13
Model name: Intel (R) Pentium (R) M processor 1.60 GHz
Stepping: 8
First, the service is introduced and then calledThis article is reproduced from http://blog.sina.com.cn/s/blog_7eeb43210101hf7f.html Public classComputer { Public Static stringCpuID;//1.cpu Serial Number Public Static stringMacAddress;//2.mac Serial Number Public Static stringDiskID;//3. Hard Drive ID Public Static stringIpAddress;//4.ip Address Public Static stringLoginusername;//5. Login User name Public Sta
__cpuidex Read CPU serial number
Recent research on the use of __cpuidex, the query to the relevant examples are more complex, so I simplified a part of the content, a simple example, to obtain only the CPU serial number, the final result and through the WMIC command query results consistent.code Example
#include
Microsoft specificGenerates the CPUID instructi
View CPU
1. AIX and HP:Lsdev-c | grep process | WC-l
Lscfg | grep proc lsattr-El proc0
Lscfg | grep mem lsattr-El mem0
2. Solaris:Psrinfo-v | grep "Status of processor" | WC-l
Use psrinfo (1 m) to view details. Because of the widespread use of multi-core/multi-thread technology, you can use the-VP parameter to identify the number of physical CPUs, for example:
# Psrinfo-VPThe physical processor has 32 virtual processors (0-31)UltraSPARC-T1
During the installation of the virtual machine, the following conditions occur:The CPU has been disabled by the guest operating system. You will need to power off or reset the virtual machine at this point"
Edit the vmx file, that is, the file changed to darwin10 at the beginning, and add the following statement.
Cpuid.1.eax = "0000: 0000: 0000: 0001: 0000: 0110: 1010: 0101"
The new I3, I5, i7cpu, and vi
1 CPU hotspot Analysis positioning backgroundCPU resources are still very expensive, in order to feel this expensive, the current CPU price of resources:So for the program apes, it is necessary for the program to use CPU resources reasonably and efficiently . using limited CPU resources to solve the actual problems we
CPU clock speed, that is, the clock frequency (cpuClock speed ). In general, the CPU is as high as, And the is the "CPU clock speed ". Many people think that the CPU clock speed is its running speed. The clock speed of the CPU indicates the speed at which the digital pulse s
CPU Cache
Most CPUs only have Level 1 cache and level 2 cache, and some have Level 3 cache.The cache memory is the temporary memory between the CPU and memory. It has a smaller capacity than the memory but is faster than the memory. The data in the cache is a small part of the memory, but this small part is about to be accessed by the CPU in a short time. When th
1:CPU architecture and how it works 2: Operating Systems and processes
3: Metrics to measure CPU busy
4:CPU resources as a symptom of system performance bottlenecks
5: Which processes are the big players that consume CPU resources?
6: Using the SAR tool to analyze CPU utiliz
Article Title: CPU load in Linux. Linux is a technology channel of the IT lab in China. Some basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open-source systems view the Nagios alarm information yesterday and find that one of the servers is overloaded with CPU and the machine is CentOS. The information is as follows:
2011-2-15 (Tuesday) 17: 50 W
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.