Linux system strace operation example summary

  

Linux system, strace command can be used to track the debugger, can be used with other commands, the following small series will give you a detailed introduction to the strace command, together to understand the strace command The operation example.

Command Usage

Let's see how the strace command tracks the execution of a program.

The simplest form, strace can be followed by any command. It will list a lot of system calls. In the beginning, we can't understand all the output, but if you are looking for something special, then you should be able to find it from the output.

Let's take a look at the system call trace of the simple command ls.

raghu @ raghu-Linoxide ~ $ strace ls

This is the first few lines strace command output. The other output was truncated.

The above output section shows the write system call, which outputs a list of the current directory to standard output.

The following image shows the contents of the directory listed with the ls command (without using strace).

raghu@raghu-Linoxide~ $ ls
Previous1234Next Total 4 Pages

Copyright © Windows knowledge All Rights Reserved