惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 司徒正美
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
大猫的无限游戏
大猫的无限游戏
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
爱范儿
爱范儿
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
博客园_首页
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
V
V2EX
V
Visual Studio Blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
量子位
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Apple Machine Learning Research
Apple Machine Learning Research
美团技术团队

Hackaday

Bavarian Court Tells Gemini It Can’t Be A Real Boy Until It Tells The Truth Why Not Yserver? It’s Xserver, But Rust-y. OpenCAL: Computed Axial Lithographic 3D Printing For Everyone Is A CS Degree DOA Thanks To LLMs? IEEE Says TBD. Double The VRAM Of An RTX 3070 The Pacemaker Patch Robot Chess But Each Piece Is A Small Robot Bambuddy Says Bye To Bambu Lab Cloud Services Converting A Scanning Electron Microscope Into A TEM Is Surprisingly Easy Custom Watch Is On The Case Patterns Everywhere Behold A 60 Hz Refresh Rate E-ink Monitor GentleOS, A Simple OS For Your Old PC Deeply Optimized MSX Emulation On ESP32-S3 With VGA Output Homebrew Macropad Looks Good The Air Position Indicator For The B-29 Building A 1:150 Scale Toyota ProBox Micro Remote Control Car Adding Weight To A 3D Print With Plaster Of Paris, Cleanly Hackaday Podcast Ep 373: GPS, Danger In Space, And Robby The Robot A Peek Inside The Secret Lagercrantz Suitcase Radio This Week In Security: Microsoft On Microsoft, Register Your Domains, Linux On ARM, And FreeBSD Joins The File Cache Club Glue-in Hinge Design Tries Something Different The Hackaday Communicator Badge, Re-Imagined With New Firmware Amiga 1232 Storm CD Packs Every Upgrade Into One Wedge So Many Analog To Digital Converters Repairing A Pair Of Voodoo 2 GPUs For Some SLI Action AI The Truly Environmentally Friendly Way Evidence For Water Vapor Plumes On Europa Vanishes In Re-Analysis Mechanical Stability For Your Coils 3D Printed Hose Sprayer Sets Phasers To Suds
Linux Fu: Taming Strace
Al Williams · 2026-06-03 · via Hackaday

While many operating systems seem to try to prevent you from peeking under the hood, Unix and Linux positively encourage it. One great tool that we’ve looked at before is strace. Using this tool, you can see details about every system call a program makes. As you might imagine, for any significant program, the output from strace can be huge.

While I’m not always a fan of GUIs, this is one of those cases where making the data easier to browse is a great idea. Enter strace-tui, a text-based GUI for strace from [Rodrigodd]. The program can parse output from strace or manage the strace execution itself, and either way, display the data in a useful way.

I started out looking at [janestreet’s] strace_ui, but the OCaml setup was throwing errors for me, so I just gave up. The strace-tui installs like many Rust programs, using cargo, and it went smoothly.

An Example

The strace-tui interface.

The only issue I had running the tool was that I don’t normally keep ~/.cargo/bin on my path. You can add it to your path, link the executable into your path, or solve that in any number of other ways.

As an example, I traced a symbolic link command (ln -sf nature.txt test.link). It is easy to pick out some essential information on the top line. The command took 112 system calls, 14 of them failed (which isn’t unexpected), there were no unfinished calls, no signals, and only a single PID.

The bottom shows things you can do. Arrows or j and k, along with the usual cursor control keys like Home and Page Down scroll through the list. The right and left arrows will expand or collapse items. That will show details about the call in question, including the arguments and return values. You can consult the help for all the details.

Useful Tools

The real power, though, lies in filtering out the noise and searching for specific things. If you are looking at something you don’t want to see, you can press a lowercase h to hide it, but note that it hides everything similar, not just an individual line. An uppercase H will bring up a filter dialog where you can include or exclude groups of data.

Searching is also a great way to find what you want. A slash key starts a search. The N key navigates with a lowercase entry moving forward and an uppercase one moving backward.

For example, if I only wanted to look at openat commands, I could open the dialog. Not only does it show filters, but it also shows how many things match (there are 30 instances of openat). Pressing a will toggle all entries off and then selecting openat greatly reduces the amount of output. I also selected symlinkatread, and fstat so I would only look at the file-related items.

Peeking at the system call that does the actual linking.

Many of the file operations are related to loading shared libraries and locales. To find the actual line that makes the link, it was easy to press the slash key and some text from the file like test.link.

That will highlight the symlinkat line, which is no surprise, but this is a simple example. If you press Enter or the right arrow, you can see more detail, including arguments, the return value, the amount of time executing, and a backtrace that shows how your program made it to the call.

This is a simple example, but the program can also visualize multi-threaded or multi-process traces using graphs. That can be helpful for analyzing real programs.

Even this simple program has a lot of output. Sure, if you are trying to debug a locale-related problem, all of the lines about loading locale files that don’t exist might be gold. But most of the time, you don’t really care about all the standard loading scaffolding and a tool like this can help cut through the chatter.

Missing Links

According to the project page, there are some missing features, and we presume this is a roadmap for future development.

In particular, the program can’t filter traces for specific processes or threads. There’s also no way to copy details to the clipboard or export filtered traces out to a file. Of course, it is open source, so you can always volunteer to add some of this or your favorite feature.

If you give strace-tui a shot, or have other strace tips and tricks you’d like to share, let us know in the comments.