Several tools for locating problems in linux when you develop and maintain a set of websites by yourself, you will always encounter various exceptions or have an urgent need for performance optimization, or some simple attacks. At this time, some good molding tools will help you quickly locate the problem. I. The tail-f usage of www.2cto.com is usually used as a log location command. When a problem occurs, you can use this method to track the logic before and after the problem occurs to facilitate logical analysis and speculation. 1. apache log: under ubuntu, usually under/var/log/apache2/, if an exception occurs such as a server connection failure, you can directly in this directory, tail-f *, request again to see if any error has occurred. 2. mysql log: under ubuntu, when the application prompts a Database Error under/var/log/mysql/, tracking the mysql errors here is the first choice. In addition, if you want to track the SQL operations caused by an operation, modify the configuration in my. cnf and enable the configuration of common logs. In this way, after a logical operation, you will see all the SQL operation tables and corresponding operations. 3. web application's own log. Generally, you can use tail to track logical problems in your application under the log directory defined by your web application. With continuous logging and variable tracking, www.2cto.com allows you to debug your web services just like debugging applications. II. Top command this command can effectively view the current resource utilization of the machine. Especially when service requests reach a certain bottleneck, you can clearly see which process is the busiest. 3. Strace www.2cto.com for some programs that throw exceptions, the tail granularity may be too extensive and many details are unknown. This tool can be used at this time. Generally, logs at the system call level can be obtained. The advantage is that the log is accurate, but the disadvantage is that it is too large. Therefore, after finding an approximate range, use strace to implement precise attacks. 4. The netstat & tcpdump commands help you locate network requests. It is also suitable for general positioning in this direction. Author ShiningStarPxx