kmon is a free, open source monitoring & observability project written in Rust and released under GPL-3.0. It has 2,946 GitHub stars, 93 forks and 23 open issues, and was last pushed 21 hours ago. On this registry it ranks #137 of 271 tracked projects in Monitoring & Observability, with 5 head-to-head comparisons available.

What is kmon?

kmon is a Linux kernel manager and activity monitor written in Rust that gives system administrators and developers a terminal user interface for inspecting kernel information and managing loadable kernel modules.

What it is

kmon is an open-source utility published under the GPL-3.0 licence and written in Rust. It belongs to the Infrastructure and Operations category, specifically Monitoring and Observability, and it presents itself as both a manager for the Linux kernel and a monitor of kernel activity. The project ships as a terminal user interface, which places it in the same operational space as other TUI tools that administrators run directly in a shell session on the machine they are inspecting.

The concrete problem it solves is fragmentation in kernel module work. On a standard Linux system, a practitioner who wants to see what is loaded reaches for lsmod, and a practitioner who wants to load or unload a module reaches for modprobe, insmod, or rmmod. Those are separate commands with separate output formats, and the underlying artifacts are files in /lib/modules carrying the .ko kernel object extension. kmon gathers that information and those operations behind one interactive interface rather than requiring the operator to remember and combine several unrelated command-line tools.

Key capabilities

  • Terminal user interface for kernel work, so inspection and management happen in an interactive session rather than through piped command output.
  • Kernel information display, surfacing details about the running kernel that would otherwise require reading several sources.
  • Kernel module management, covering the loadable kernel modules that the kernel accepts at runtime.
  • Kernel activity monitoring, giving visibility into what the kernel is doing during operation.
  • Awareness of the loadable kernel module model, where modules extend the kernel for new hardware, device drivers, or filesystems without a reboot or recompile.
  • Alignment with standard module layout, including modules stored in /lib/modules with the .ko extension.
  • A worked loadable kernel module example in the repository, comprising example/lkm_example.c and the accompanying example/Makefile, which documents the build and installation steps of a module.

Who uses it and how

  • Linux system administrators who need to inspect which modules are currently loaded and act on that list without switching between lsmod, modprobe, insmod, and rmmod.
  • Developers writing or testing loadable kernel modules, who load and unload their module at runtime and want to confirm the resulting kernel state.
  • Operators on distributions and embedded systems, including routers and Android-based systems, where the Linux kernel is the running kernel and module handling is routine.
  • Contributors during Hacktoberfest, since the project is listed under the hacktoberfest topic and maintains an open issue queue of 23 items.

Getting started

Installation and usage instructions are published on the project homepage at https://kmon.cli.rs, which is the entry point the repository points to for getting the tool onto a machine.

How it compares

The tools named in the project material are the classic command-line utilities lsmod, modprobe, insmod, and rmmod. kmon sits above them as a single interactive interface rather than replacing the underlying kernel mechanisms, so an operator who is comfortable composing those commands in scripts or configuration management retains that option.

When to use it β€” and when not to

kmon is Linux-specific, so anyone working primarily on non-Linux systems gains nothing from it, and users who prefer scripted, non-interactive command pipelines may find a TUI the wrong shape for their automation. Managing kernel modules generally requires elevated privileges to load or unload anything, so a self-hoster should expect to run it with appropriate access rather than as an unprivileged user. The most evident weakness is documentation balance: the README excerpt devotes substantial space to explaining what the kernel is and how loadable kernel modules work, which suggests the usage and installation material is thinner than the conceptual background.

project readme (upstream, from github) β€” read inline


Linux Kernel Manager and Activity Monitor πŸ§πŸ’»


The kernel is the part of the operating system that facilitates interactions between hardware and software components. On most systems, it is loaded on startup after the bootloader and handles I/O requests as well as peripherals like keyboards, monitors, network adapters, and speakers. Typically, the kernel is responsible for memory management, process management, device management, system calls, and security. Applications use the system call mechanism for requesting a service from the operating system and most of the time, this request is passed to the kernel using a library provided by the operating system to invoke the related kernel function. While the kernel performs these low-level tasks, it's resident on a separate part of memory named protected kernel space which is not accessible by applications and other parts of the system. In contrast, applications like browsers, text editors, window managers or audio/video players use a different separate area of the memory, user space. This separation prevents user data and kernel data from interfering with each other and causing instability and slowness, as well as preventing malfunctioning application programs from crashing the entire operating system.
There are different kernel designs due to the different ways of managing system calls and resources. For example, while monolithic kernels run all the operating system instructions in the same address space for speed, microkernels use different spaces for user and kernel services for modularity. Apart from those, there are hybrid kernels, nanokernels, and, exokernels. The hybrid kernel architecture is based on combining aspects of microkernel and monolithic kernels.

The Linux kernel is the open-source, monolithic and, Unix-like operating system kernel that used in the Linux distributions, various embedded systems such as routers and as well as in the all Android-based systems. Linus Torvalds conceived and created the Linux kernel in 1991 and it's still being developed by thousands of developers today. It's a prominent example of free and open source software and it's used in other free software projects, notably the GNU operating system. Although the Linux-based operating systems dominate the most of computing, it still carries some of the design flaws which were quite a bit of debate in the early days of Linux. For example, it has the largest footprint and the most complexity over the other types of kernels. But it's a design feature that monolithic kernels inherent to have. These kind of design issues led developers to add new features and mechanisms to the Linux kernel which other kernels don't have.

Unlike the standard monolithic kernels, the Linux kernel is also modular, accepting loadable kernel modules (LKM) that typically used to add support for new hardware (as device drivers) and/or filesystems, or for adding system calls. Since LKMs could be loaded and unloaded to the system at runtime, they have the advantage of extending the kernel without rebooting and re-compiling. Thus, the kernel functionalities provided by modules would not reside in memory without being used and the related module can be unloaded in order to free memory and other resources.
Loadable kernel modules are located in /lib/modules with the .ko (kernel object) extension in Linux. While the lsmod command could be used for listing the loaded kernel modules, modprobe or insmod/rmmod is used for loading or unloading a kernel module. insmod/rmmod are used for modules independent of modprobe and without requiring an installation to /lib/modules/$(uname -r).

Here's a simple example of a Linux kernel module that prints a message when it's loaded and unloaded. The build and installation steps of the module using a Makefile are shown below.

make                         # build
sudo make install            # install
sudo modprobe lkm_example    # load
sudo modprobe -r lkm_example # unload

The dmesg command is used below to retrieve the message buffer of the kernel.

[16994.295552] [+] Example kernel module loaded.
[16996.325674] [-] Example kernel module unloaded.

kmon provides a text-based user interface for managing the Linux kernel modules and monitoring the kernel activities. By managing, it means loading, unloading, blacklisting and showing the information of a module. These updates in the kernel modules, logs about the hardware and other kernel messages can be tracked with the real-time activity monitor in kmon. Since the usage of different tools like dmesg and kmod are required for these tasks in Linux, kmon aims to gather them in a single terminal window and facilitate the usage as much as possible while keeping the functionality.

kmon is written in Rust and uses Ratatui & termion libraries for its text-based user interface.

Table of Contents

readme truncated β€” read the full docs on github

Frequently asked questions

Is kmon free to use?

kmon is open source under the GPL-3.0 licence. There is no licence fee and no seat count β€” you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does kmon do?

Linux Kernel Manager and Activity Monitor πŸ§πŸ’»

What is kmon written in?

kmon is primarily written in Rust. Its source is publicly available at https://github.com/orhun/kmon, and it has 2,946 GitHub stars.