This series highlights essential system tools. These are small utilities, useful for system administrators as well as regular users of Linux based systems. The series examines both graphical and text based open source utilities. For details of all tools in this series, please check the table in the summary section.
kmon is a text-based tool to help you manage the Linux kernel modules and monitor the kernel activities. With this tool, you can load, unload, and blacklist modules, as well as show a module’s information.
kmon is written in Rust and uses the tui-rs and termion libraries for its text-based user interface.
We tested kmon on the newly released Ubuntu 22.10 distro, installing the deb package from repology.org.
Here’s an image of kmon in action. You’ll need to run the program as root (using sudo) to load/unload/blacklist modules.
At the top is a search bar. We can navigate to this box with the
/ key (or with the arrow keys / Vim keys).
The box lets us search through the list of kernel modules (all the modules loaded by our kernel). As we type characters in the box we see modules that match. On our system we have 122 loaded kernel modules. As we type “nv” the list reduces to just 6 modules.
The search functionality makes it easy to find modules that are loaded by our system which we know we aren’t using. We can then unload these modules (with the
i key lets us load a kernel module. We can reload a module with
ALT + r This kills the module and restarts it. To blacklist a module press
b. Blacklisting a module is a way to stop the kernel module from loading. This can be useful if specific hardware is not needed or for diagnostic purposes. For all of these actions, kmon shows the command that is going to be executed.
At the bottom of the interface is a box headed kernel activities. This is the kernel ring buffer which is a kernel log. kmon converts dmesg’s timestamp into a human-readable date and time format.
kmon is a big time-saver if you frequently need to load/unload/blacklist kernel modules. All of the actions it performs can, of course, be executed outside of kmon.
kmon relies on a variety of tools to display information and perform actions. For example, modprobe or insmod/rmmod is used for loading or unloading a kernel module. To print the message buffer of the kernel kmon relies on dmesg (diagnostic messages).
All the essential tools in this series:
|Essential System Tools|
|Alacritty||Innovative, hardware-accelerated terminal emulator|
|BleachBit||System cleaning software. Quick and easy way to service your computer|
|btop++||Monitor usage and stats for CPU, memory, disks, network and processes|
|catfish||Versatile file searching software|
|Clonezilla||Partition and disk cloning software|
|CPU-X||System profiler with both a GUI and text-based|
|Czkawka||Find duplicate files, big files, empty files, similar images, and much more|
|ddrescue||Data recovery tool, retrieving data from failing drives as safely as possible|
|dust||More intuitive version of du written in Rust|
|f3||Detect and fix counterfeit flash storage|
|Fail2ban||Ban hosts that cause multiple authentication errors|
|fdupes||Find or delete duplicate files|
|Firejail||Restrict the running environment of untrusted applications|
|Glances||Cross-platform system monitoring tool written in Python|
|GParted||Resize, copy, and move partitions without data|
|GreenWithEnvy||NVIDIA graphics card utility|
|gtop||System monitoring dashboard|
|gWakeOnLAN||Turn machines on through Wake On LAN|
|hyperfine||Command-line benchmarking tool|
|inxi||Command-line system information tool that's a time-saver for everyone|
|journalctl||Query and display messages from the journal|
|kmon||Manage Linux kernel modules with this text-based tool|
|Krusader||Advanced, twin-panel (commander-style) file manager|
|Neofetch||System information tool written in Bash|
|Nmap||Network security tool that builds a "map" of the network|
|nmon||Systems administrator, tuner, and benchmark tool|
|nnn||Portable terminal file manager that's amazingly frugal|
|pet||Simple command-line snippet manager|
|Pingnoo||Graphical representation for traceroute and ping output|
|ps_mem||Accurate reporting of software's memory consumption|
|Timeshift||Similar to Windows' System Restore functionality, Time Machine Tool in Mac OS|
|QDirStat||Qt-based directory statistics|
|QJournalctl||Graphical User Interface for systemd’s journalctl|
|TLP||Must-have tool for anyone running Linux on a notebook|
|Unison||Console and graphical file synchronization software|
|VeraCrypt||Strong disk encryption software|
|Ventoy||Create bootable USB drive for ISO/WIM/IMG/VHD(x)/EFI files|