Today in Edworking News, we want to talk about 0x.tools X-Ray vision for Linux systems.
By Tanel Poder, 0x.tools
0x.tools (GitHub) is a set of open-source utilities for analyzing application performance on Linux. It aims for deployment simplicity and minimal dependencies to reduce friction in systematic troubleshooting. There's no need to upgrade the OS, install kernel modules, heavy monitoring frameworks, Java agents, or databases. 0x.tools allow you to measure individual thread-level activity, like thread-executed code, sleep states, system calls, and kernel wait locations by tracking (not tracing) and then sampling the right events at the right time.
xcapture-bpf & xtop 2.0.2 beta
TL;DR
The latest eBPF update brings exciting new features. This includes xcapture-bpf (and xtop), tools similar to the Linux top tool but extended with x-ray vision. They allow you to view performance data from any angle that eBPF allows instrumenting. You can get a system-level overview and then drill down into individual threads' activity and even specific kernel events like lock waits or memory stalls. The customization and programmability of eBPF are fully utilized, though currently only 5% of its capabilities have been implemented, with more to come.
Image:

_Description: The terminal text search/highlighting and stacktiles formatting method work seamlessly together, allowing you to fit more relevant information on the screen._
xcapture-bpf Installation
xcapture-bpf is still in beta and should not be used on busy production systems yet. As it uses eBPF (and currently BCC with python3 as a reporting frontend), it's best tested on RHEL 8.1 (or a clone) or Ubuntu 24.04. Compatibility issues exist with Ubuntu 22.04 and 20.04's BCC and kernels. For installation, if you try out other distros/platforms, feedback on the results is encouraged.
For RHEL8, prerequisites can be installed using:
```bash
sudo yum install bcc-tools python3
git clone https://github.com/tanelpoder/0x.tools.git
cd 0x.tools/xcapture-bpf
Included Tools
0x.tools come with two classes of utilities:
xcapture: Written in C for efficiency purposes and includes a single C source file and a single header file for system call name translation.
All other tools are Python or shell scripts.
Usage & Example Output
Sample Linux thread activity and display fixed-width output on the screen.
Sample threads in all states (including Sleeping) and write output into hourly CSV files.
Query the thread activity history for performance analysis directly from your command line or by loading the CSV into any database.
Example:
```sh
cat 2020-10-??.0[89].csv | grep -i "error" | sort -u
Installation & Usage
xcapture, schedlat, and psn sample the /proc filesystem just like standard tools such as ps, top, and lsof. Since the /proc filesystem is a Linux kernel presenting useful metrics to userspace as user-readable files, no additional configuration or fancy installations are required.
FAQs
How is 0x.tools licensed?
0x.tools is an open-source, GPL v3-licensed product.
Measurement overhead?
Minimal, well under 1% of your server's CPU capacity.
Is it safe for production?
Yes, 0x.tools are designed to be safely used in production environments.
---
Remember these 3 key ideas for your startup:
Simplified Deployment:
0x.tools require no OS upgrades or heavy monitoring frameworks, making it convenient to implement without upsetting your existing infrastructure. This reduces friction considerably, especially vital for startups that cannot afford lengthy downtimes or complex installations.Versatile Performance Monitoring:
The tools offer extensive features like tracking individual thread activities and kernel events without substantial deployment difficulties. This diagnostic flexibility allows SMEs to identify performance bottlenecks easily and ensure smooth operations.Low Overhead and Minimal Resources:
The tools are designed to run with very low overhead, allowing even small companies to leverage advanced performance analysis without hampering their resources. This is especially crucial when the budget is tight and efficiency is critical.
Edworking is the best and smartest decision for SMEs and startups to be more productive. Edworking is a FREE superapp of productivity that includes all you need for work powered by AI in the same superapp, connecting Task Management, Docs, Chat, Videocall, and File Management. Save money today by not paying for Slack, Trello, Dropbox, Zoom, and Notion.
For more details, see the original source.