During a troubleshooting operation in the SMP environment, you need to check whether the system is already working in the SMP environment and check the load of each cpu. The following describes the methods. Www.2cto.com
First, confirm that the redhat 5.8 is enabled for the SMP (Symmetric Multi-Processing structure) service. [Root @ cepsvr1 ~] # Uname-a Linux cepsvr1 2.6.18-308. el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 "SMP" in the GNU/Linux kernel flag, which indicates support for SMP 2: Check whether the irqbalance service is enabled: this service distributes hardware interruptions evenly among multiple CPUs, helping the SMP system balance the CPU load.
[Root @ cepsvr1 ~] # Service irqbalance status irqbalance (pid 30948) is running... through cat/proc/interrupts, you can see the distribution of hardware interruption information on each cpu. Third, you can view the cpu where the java Process (pid = 4539) runs: [root @ cepsvr1 ~] # Taskset-p 4539 pid 4539's current affinity mask: f [root @ cepsvr1 ~] #
Note: The Cpu ID number, corresponding to the hexadecimal number: Zero-based cpu id: 7 6 5 4 3 2 1 0 Decimal Value: 128 64 32 16 8 4 2 1 the cpu ID in our system is (4539,), pid's current affinity mask: the sum (1 + 2 + 4 + 8 = f) of The hexadecimal value of the cpu ID (pid = 4539) the java Process works on four CPUs, namely, 0, 1, 2, and 3, respectively. 4. Run the top command to view the usage of each cpu: 1. top-d 1 2.1 shows the usage of each CPU. 3. Type an I in upper case. The Irix mode of top is disabled because it works in Solaris mode. In The Real SMP environment, the cpu usage in this mode is divided by the number of CPUs. Source http://yangyoupeng-cn-fujitsu-com.iteye.com/blog/1722514