Using the Strace Debugging tool

Source: Internet
Author: User

Strace is a software debugging tool in a Linux environment that monitors the system calls used by an application and the system information it receives.

Strace is a useful gadget that allows you to know what a program does in the background by tracking the system. Strace is a basic debugging tool that is installed by default on most Linux systems, but even if you're not tracking a problem, it's an excellent software. It tells you a lot of information about how a Linux program works.

Let's start with a simple UNIX command pwd, and then delve deeper into what the command does in the process of accomplishing its tasks. Start Xterm to create a controlled environment for experimentation, and then enter the following command:

$ pwd

This PWD command displays the current working directory. On my computer, the output at that time was:

/home/bill/

Such a simple function hides the complexity of the underlying command (all computer programs are, by the way). To really understand its complexity, run the PWD command again using the Strace tool:

$ strace pwd

With this command, you can see that UNIX computers perform quite a lot of operations while displaying and enumerating the current working directory.

Original: http://www.oschina.net/question/12_7536

Reference to this article: http://blog.s135.com/file_get_contents/2/1/

PHP-CGI Process CPU 100% and the relationship between the file_get_contents function needs to find one of the CPU 100% of the php-cgi process PID, with the command to track, then you can determine is file_get_contents () caused of the problem.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.