FOSSPicks
ProcMon
If you've ever had the pleasure of using Microsoft Windows, you might have run a Microsoft tool called Process Manager (ProcMon) to find out why your system is running slowly. Unlike other monitoring tools that might show you which processes were consuming the most resources, ProcMon focuses on which system calls (syscalls) a process is currently working on, enabling you to perform some analysis on what is going on behind a simple process name. Syscalls represent the functions that an application or process has requested to be run by the operating system or kernel, such as reading or writing data, allocating memory, waiting (polling) for an interrupt or a message, or opening a device. Monitoring which syscalls a process is running is a great way to troubleshoot your own projects or to determine whether a random process might be failing, stalling, or performing badly. It's more granular than the process-wide analysis offered by tools like top
or a desktop system monitor.
Microsoft has ported its famous ProcMon to Linux and placed the source code on GitHub from where it can be easily built and executed. There's even a command-line option to build a deb package. ProcMon Linux runs within a terminal using curses and presents much of the same information as its desktop Windows counterpart. Most importantly, this means showing the resource-hungry syscalls, the process IDs they're sharing, the operations they're performing, and how much of your system time they're consuming. It's a fascinating insight into what various applications might be doing, such as Chrome, X11, or your Windows compositor, and it shows a different side to resource usage than the normal top
kind of view. With specific command-line arguments, you can choose specific process IDs to trace, track only specific syscalls, and output a log of traces to an external file, which can be later reread and run through for analysis. ProcMon is definitely a refreshing change from normal Linux resource monitors and a useful addition to your $PATH
.
Project Website
https://github.com/Sysinternals/ProcMon-for-Linux
Storage monitor
diskgraph
These days, there are too few purely C-coded utilities that are useful, modern, self-contained, compiled in seconds, and relatively easy to understand. However, diskgraph is an instantly compiled command-line tool that draws a chart in your terminal showing storage throughput for both input and output operations. Each measurement is represented by a character-sized square that represents a 500ms interval, with the y-axis showing an automatically scaled bandwidth (amount transferred over time) and the x-axis showing the time frame. The blocks will scroll from the right to the left as time progresses so you can more easily see fluctuating load conditions as you read and write files, allowing you to easily see periods of peak and low transfer and how your hardware is performing. It's very simple, but it presents information that isn't easily visualized any other way.
The executable takes only a single argument, the storage device, with no further options to configure how the utility looks or behaves. But this is an ideal opportunity rather than a limitation, because the entire project's code is contained within a single .c
file of just less than 500 lines of code. This makes it ideal for study and also for user-developed modification such as extra arguments. It would be trivial to change the character I/O blocks into bars, for instance, or to add some other visualization method or to change the way the bandwidth is calculated. It's exactly the kind of project to start with if you want to investigate more serious system-level Linux programming, maybe ultimately leading even to kernel development. The code is relatively easy to understand, operates at a low level, and should be safe to modify – diskgraph only reads from devices rather than writing to them without requiring special privileges.
Project Website
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.