Strace

Strace

strace is a debugging utility in Linux to monitor the system calls used by a program and all the signals it receives, similar to "truss" utility in other Unix systems. This is made possible by a Linux kernel feature known as "ptrace".

A similar utility is provided by Cygwin.

Usage

The most common usage is to start a program using strace, which prints a list of system calls made by the program. This is useful if the program continually crashes, or does not behave as expected; for example using strace may reveal that the program is attempting to access a file which does not exist or cannot be read.

An alternative application is to use the -p flag to attach to a running process. This is useful if a process has stopped responding, and might reveal, for example, that the process is blocking whilst attempting to make a network connection.

As strace only details system calls it cannot be used to detect as many problems as a code debugger such as Gdb. It is, however, easier to use than a code debugger, and is an extremely useful tool for system administrators.

Other Tools

There are other similar, and sometimes more powerful, instrumentation tools on other platforms.
* Linux distributions after 2006 have SystemTap
* Solaris has Truss and DTrace
* FreeBSD has the Truss command
* Mac OS X provides ktrace (10.4 and earlier) and DTrace (from Solaris) in 10.5 and later. [http://docs.info.apple.com/article.html?artnum=305893] .

See also

* ktrace
* ltrace
* lsof
* gdb
* List of Unix programs

External links

* [http://www.linuxmanpages.com/man1/strace.1.php Man page]
* [http://www.osreviews.net/reviews/admin/strace OS Reviews article on strace]
* [http://sourceforge.net/projects/strace/ Project page]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Strace — est un outil de déboguage sous Linux pour surveiller les appels système utilisés par un programme, et tous les signaux qu il reçoit, similaire à l outil truss sur les autres systèmes Unix. Il a été rendu possible grâce à une fonctionnalité du… …   Wikipédia en Français

  • Strace — es una utilidad de línea de comandos para comprobación de errores en el sistema operativo GNU/Linux. Permite monitorizar las llamadas al sistema usadas por un determinado programa y todas las señales que éste recibe.[1] Su funcionamiento es… …   Wikipedia Español

  • niech stracę — {{/stl 13}}{{stl 7}} zwrot wyrażający gotowość pójścia na ustępstwa, zrezygnowania z części zysków, korzyści, pójścia komuś na rękę; także: gotowość podjęcia jakiegoś ryzyka, z uwzględnieniem możliwości poniesienia strat : {{/stl 7}}{{stl… …   Langenscheidt Polski wyjaśnień

  • System call — In computing, a system call is the mechanism used by an application program to request service from the kernel. Background A system call is a request made by any arbitrary program to the kernel for performing tasks picked from a predefined set… …   Wikipedia

  • Chown — The chown command is used on Unix like systems to change the owner of a file. In most implementations, it can only be executed by the Superuser. Unprivileged (regular) users who wish to change the group of a file that they own may use… …   Wikipedia

  • Chown — UNIX‐утилита, изменяющая владельца и/или группу для указанных файлов. В качестве имени владельца/группы берётся первый аргумент, не являющийся опцией. Если задано только имя пользователя (или числовой идентификатор пользователя), то данный… …   Википедия

  • chown — For the surname, see Chown (surname). The chown command (abbreviation for change owner) is used on Unix like systems to change the owner of a file. In most implementations, it can only be executed by the superuser. Unprivileged (regular) users… …   Wikipedia

  • chown — chown (от англ. change owner) UNIX‐утилита, изменяющая владельца и/или группу для указанных файлов. В качестве имени владельца/группы берётся первый аргумент, не являющийся опцией. Если задано только имя пользователя (или числовой… …   Википедия

  • Malware — Malware, short for malicious software, consists of programming (code, scripts, active content, and other software) designed to disrupt or deny operation, gather information that leads to loss of privacy or exploitation, gain unauthorized access… …   Wikipedia

  • DNIX — Company / developer Dataindustrier AB OS family Unix like Working state Historic Source model Closed source Latest stable release 5.4 …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”