1. Top
Detailed introduction to see http://blog.csdn.net/rebel_321/article/details/7369950
Focus on the points.
1) The meaning of load average is the average length of the queue
2) Swap cached means that both the memory and the swap space can be swapped out without having to write again
3) NI meaning priority negative indicates high priority this really does not know what to do and PR has what difference
4)%MEM Physical memory consumption percentage
5) VIRT Total virtual memory swap+res (total amount of program required but not necessarily all in physical memory)
6) Swap process uses the size of the virtual memory that is swapped out of the swap
7) The amount of physical memory that has not been swapped out in the RES process is generally considered to be the main memory we are looking at.
2. Strace
Strace-p PID can see all system calls of a process
Strace-c-P PID at the end of the process can be counted to do all the system calls to do the occupancy ratio
3. Show Profiles;
Mysql debugging requires setting the set profiling=1 first; and then show profiles; can only parse commands executed by the command line;
4. Show Processlist
MySQL Process link occupancy status View;
Several tools for locating server database problems