<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://leo.leung.xyz/wiki/index.php?action=history&amp;feed=atom&amp;title=Strace</id>
	<title>Strace - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://leo.leung.xyz/wiki/index.php?action=history&amp;feed=atom&amp;title=Strace"/>
	<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=Strace&amp;action=history"/>
	<updated>2026-10-11T23:42:25Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://leo.leung.xyz/wiki/index.php?title=Strace&amp;diff=4969&amp;oldid=prev</id>
		<title>Leo: Added categories</title>
		<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=Strace&amp;diff=4969&amp;oldid=prev"/>
		<updated>2020-06-14T23:40:18Z</updated>

		<summary type="html">&lt;p&gt;Added categories&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:40, 14 June 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l39&quot;&gt;Line 39:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 39:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* https://linux.die.net/man/1/strace&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* https://linux.die.net/man/1/strace&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* https://theartofmachinery.com/2019/11/14/deployment_debugging_strace.html&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* https://theartofmachinery.com/2019/11/14/deployment_debugging_strace.html&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Navbox Linux}}[[Category:Linux]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:LinuxUtilities]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-4115:rev-4969:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Leo</name></author>
	</entry>
	<entry>
		<id>https://leo.leung.xyz/wiki/index.php?title=Strace&amp;diff=4115&amp;oldid=prev</id>
		<title>Leo: Created page with &quot;{{code|strace}} is a tool for tracing system calls on Linux. Similar debugging tools are {{code|dtrace}} and {{code|ktrace}}.   == Introduction == Run any command through {{co...&quot;</title>
		<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=Strace&amp;diff=4115&amp;oldid=prev"/>
		<updated>2019-11-25T19:22:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{code|strace}} is a tool for tracing system calls on Linux. Similar debugging tools are {{code|dtrace}} and {{code|ktrace}}.   == Introduction == Run any command through {{co...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{code|strace}} is a tool for tracing system calls on Linux. Similar debugging tools are {{code|dtrace}} and {{code|ktrace}}. &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Run any command through {{code|strace}} to see all system calls that are generated by the program. Eg.&lt;br /&gt;
{{highlight|lang=terminal|code=&lt;br /&gt;
$ strace ping google.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
System calls are all APIs that are provided by the kernel that are used by the application. As such, the trace output will allow analysis of:&lt;br /&gt;
* Console IO&lt;br /&gt;
* Network IO&lt;br /&gt;
* Filesystem and file IO&lt;br /&gt;
* Process &amp;amp; Thread management&lt;br /&gt;
* Raw memory management&lt;br /&gt;
* Access to device drivers&lt;br /&gt;
&lt;br /&gt;
Typical use cases for {{code|strace}} is to determine why a program is misbehaving. It&amp;#039;s extremely helpful to see exactly where a process is trying to write to before it errors, for instance.&lt;br /&gt;
&lt;br /&gt;
Outputs will show all system calls. Use {{code|man 2}} to find the man page for a particular syscall. &lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
Basic usage is to prepend your command with {{code|strace}}.&lt;br /&gt;
{{highlight|lang=terminal|code=&lt;br /&gt;
# Trace a new process&lt;br /&gt;
$ strace ping google.com&lt;br /&gt;
&lt;br /&gt;
# Trace an existing process&lt;br /&gt;
$ strace -p 1234&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be passed:&lt;br /&gt;
* {{code|-o}} to output to a file&lt;br /&gt;
* {{code|-s N}} to specify the size of arguments, which defaults to 32&lt;br /&gt;
* {{code|-y}} to annotate every file descriptor in the output&lt;br /&gt;
* {{code|-p pid}} to attach to an already running process&lt;br /&gt;
* {{code|-f}} to follow child processes&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* https://linux.die.net/man/1/strace&lt;br /&gt;
* https://theartofmachinery.com/2019/11/14/deployment_debugging_strace.html&lt;/div&gt;</summary>
		<author><name>Leo</name></author>
	</entry>
</feed>