Comments on: 10 Strace Commands for Troubleshooting and Debugging Linux Processes https://www.tecmint.com/strace-commands-for-troubleshooting-and-debugging-linux/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Mon, 14 Oct 2024 06:47:29 +0000 hourly 1 By: Ravi Saive https://www.tecmint.com/strace-commands-for-troubleshooting-and-debugging-linux/comment-page-1/#comment-2227995 Mon, 14 Oct 2024 06:47:29 +0000 https://www.tecmint.com/?p=27522#comment-2227995 In reply to Trevor Chandler.

@Trevor,

Yes, there is a difference!

Using sudo strace -o df_debug.txt df -h directs strace to save all trace output (including errors) directly to df_debug.txt. In contrast, sudo strace df -h > df_debug.txt only redirects the standard output of the df command to the file, not the strace output.

For capturing detailed tracing information, the -o switch is more effective.

]]>
By: Trevor Chandler https://www.tecmint.com/strace-commands-for-troubleshooting-and-debugging-linux/comment-page-1/#comment-2227204 Fri, 11 Oct 2024 16:26:23 +0000 https://www.tecmint.com/?p=27522#comment-2227204 On your #9 command example, is there any diiference and/or benefit in using the output redirection character (>), instead of the -o switch in the stace command?

sudo strace -o df_debug.txt df -h
vs.
sudo strace df -h > df_debug.txt
]]>
By: Ano Nymos https://www.tecmint.com/strace-commands-for-troubleshooting-and-debugging-linux/comment-page-1/#comment-2116202 Sun, 17 Dec 2023 17:53:13 +0000 https://www.tecmint.com/?p=27522#comment-2116202 There are many duplicates of the output to each of your command examples.

]]>
By: Robin Smith https://www.tecmint.com/strace-commands-for-troubleshooting-and-debugging-linux/comment-page-1/#comment-1374379 Wed, 14 Oct 2020 08:58:25 +0000 https://www.tecmint.com/?p=27522#comment-1374379 Excellent hints thanks

]]>