Linux Kernel Manager and Activity Monitor 🐧💻

Overview


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 tui-rs & termion libraries for its text-based user interface.

Table of Contents

Installation

Packaging status

Cargo

kmon can be installed from crates.io using Cargo if Rust is installed.

cargo install kmon

Use the --force option to update.

cargo install kmon --force

Arch Linux

kmon can be installed from the Arch Linux official repository.

pacman -S kmon

There are also a development package on AUR. Use your favorite AUR helper to install. For example,

yay -S kmon-git

Nixpkgs

kmon can be installed using Nix package manager from nixpkgs-unstable channel.

nix-channel --add https://nixos.org/channels/nixpkgs-unstable
nix-channel --update nixpkgs
nix-env -iA nixpkgs.kmon

On NixOS:

nix-channel --add https://nixos.org/channels/nixos-unstable
nix-channel --update nixos
nix-env -iA nixos.kmon

Docker

Docker Hub Build Status Package Registry Build Status

docker run -it --cap-add syslog orhunp/kmon:tagname

Build

docker build -t kmon .

Run

docker run -it --cap-add syslog kmon

Manual

  1. Download the latest binary from releases.
wget https://github.com/orhun/kmon/releases/download/v[VERSION]/kmon-[VERSION].tar.gz
  1. Extract the files.
tar -xvzf kmon-*.tar.gz
  1. Run the binary.
./kmon
  1. Move binary to /usr/local/bin/ for running it from the terminal using kmon command.

  2. Man page could be viewed if kmon.8 file is copied to /usr/local/man/man8/ directory.

cp kmon.8 /usr/local/man/man8/
gzip /usr/local/man/man8/kmon.8
man kmon

Note

libxcb should be installed for using the copy/paste commands of X11. *

e.g: Install libxcb1-dev package for Debian/Ubuntu* and libxcb-devel package for Fedora/openSUSE/Void Linux.

Usage

kmon [FLAGS] [OPTIONS] [SUBCOMMANDS]

Flags

-h, --help       Prints help information
-r, --reverse    Reverse the kernel module list
-u, --unicode    Show Unicode symbols for the block titles
-V, --version    Prints version information

Options

-a, --accent-color <COLOR>    Set the accent color using hex or color name [default: white]
-c, --color <COLOR>           Set the main color using hex or color name [default: darkgray]
-t, --tickrate <MS>           Set the refresh rate of the terminal [default: 250]

Subcommands

help    Prints this message or the help of the given subcommand(s)
sort    Sort kernel modules
kmon sort [FLAGS]

FLAGS:
    -n, --name         Sort modules by their names
    -s, --size         Sort modules by their sizes
    -d, --dependent    Sort modules by their dependent modules

Key Bindings

[?], F1 Help
right/left, h/l Switch between blocks
up/down, k/j, alt-k/j Scroll up/down [selected block]
pgup/pgdown Scroll up/down [kernel activities]
</> Scroll up/down [module information]
alt-h/l Scroll right/left [kernel activities]
ctrl-t/b, home/end Scroll to top/bottom [module list]
alt-e/s Expand/shrink the selected block
ctrl-x Change the block position
ctrl-l/u, alt-c Clear the kernel ring buffer
[d], alt-d Show the dependent modules
[1]..[9] Jump to the dependent module
[\], tab, backtab Show the next kernel information
[/], s, enter Search a kernel module
[+], i, insert Load a kernel module
[-], u, backspace Unload the kernel module
[x], b, delete Blacklist the kernel module
ctrl-r, alt-r Reload the kernel module
y/n Execute/cancel the command
c/v Copy/paste
r, F5 Refresh
q, ctrl-c/d, ESC Quit

Features

Help

Press '?' while running the terminal UI to see key bindings.

Help

Navigating & Scrolling

Arrow keys are used for navigating between blocks and scrolling.

Navigating & Scrolling

Scrolling Kernel Activities

Some kernel messages might be long enough for not fitting into the kernel activities block since they are not wrapped. In this situation, kernel activities can be scrolled horizontally with alt-h & alt-l keys. Vertical scrolling mechanism is the same as other blocks.

Scrolling Kernel Activities

Smooth Scrolling

alt-j & alt-k keys can be used to scroll kernel activity and module information blocks slowly.

Smooth Scrolling

Block Sizes

alt-e & alt-s keys can be used for expanding/shrinking the selected block.

Block Sizes

Block Positions

ctrl-x key can be used for changing the positions of blocks.

Block Positions

Kernel Information

Use one of the \, tab, backtab keys to switch between kernel release, version and platform informations.

Kernel Information

Module Information

The status of a kernel module is shown on selection.

Module Information

Displaying the dependent modules

Use one of the d, alt-d keys to show all the dependent modules of the selected module.

Displaying the dependent modules

Jumping to dependent modules

For jumping to a dependent kernel module from its parent module, number keys (1-9) can be used for specifying the index of the module on the Used By column.

Dependency Information

Searching a module

Switch to the search area with arrow keys or using one of the /, s, enter and provide a search query for the module name.

Searching a module

Loading a module

For adding a module to the Linux kernel, switch to load mode with one of the +, i, insert keys and provide the name of the module to load. Then confirm/cancel the execution of the load command with y/n.

Loading a module

The command that used for loading a module:

modprobe <module_name> || insmod <module_name>.ko

Unloading a module

Use one of the -, u, backspace keys to remove the selected module from the Linux kernel.

Unloading a module

The command that used for removing a module:

modprobe -r <module_name> || rmmod <module_name>

Blacklisting a module

Blacklisting is a mechanism to prevent the kernel module from loading. To blacklist the selected module, use one of the x, b, delete keys and confirm the execution.

Blacklisting a module

The command that used for blacklisting a module:

if ! grep -q <module_name> /etc/modprobe.d/blacklist.conf; then
  echo 'blacklist <module_name>' >> /etc/modprobe.d/blacklist.conf
  echo 'install <module_name> /bin/false' >> /etc/modprobe.d/blacklist.conf
fi

Reloading a module

Use ctrl-r or alt-r key for reloading the selected module.

Reloading a module

The command that used for reloading a module:

modprobe -r <module_name> || rmmod <module_name> && modprobe <module_name> || insmod <module_name>.ko

Clearing the ring buffer

The kernel ring buffer can be cleared with using one of the ctrl-l/u, alt-c keys.

Clearing the ring buffer

dmesg --clear

Copy & Paste

c/v keys are set for copy/paste operations.

Copy & Paste

Use ctrl-c/ctrl-v for copying and pasting while in input mode.

Sorting/reversing the kernel modules

sort subcommand can be used for sorting the kernel modules by their names, sizes or dependent modules.

kmon sort --name
kmon sort --size
kmon sort --dependent

Sorting the kernel modules

Also the -r, --reverse flag is used for reversing the kernel module list.

kmon --reverse

Reversing the kernel modules

Customizing the colors

kmon uses the colors of the terminal as default but the highlighting color could be specified with -c, --color option. Alternatively, default text color can be set via -a, --accent-color option.

Supported colors

Supported terminal colors are black, red, green, yellow, blue, magenta, cyan, gray, darkgray, lightred, lightgreen, lightyellow, lightblue, lightmagenta, lightcyan, white.

kmon --color red

Supported Colors

Using a custom color

Provide a hexadecimal value for the color to use.

kmon --color 19683a

Using a custom color

Changing the accent color

Default text color might cause readability issues on some themes that have transparency. -a, --accent-color option can be used similarly to the -c, --color option for overcoming this issue.

kmon --color 6f849c --accent-color e35760

Changing the accent color

Unicode symbols

Use -u, --unicode flag for showing Unicode symbols for the block titles.

kmon --unicode

Unicode symbols

Setting the terminal tick rate

-t, --tickrate option can be used for setting the refresh interval of the terminal UI in milliseconds.

Setting the terminal tick rate

Roadmap

kmon aims to be a standard tool for Linux kernel management while supporting most of the Linux distributions.

Accessibility

For achieving this goal, kmon should be accessible from different package managers such as Snap* and RPM.

Dependencies

It is required to have the essential tools like dmesg and kmod on the system for kmon to work as expected. Thus the next step would be using just the system resources for these functions.

Features

Management actions about the Linux kernel should be applicable in kmon for minimizing the dependence on to command line and other tools.

Testing

kmon should be tested and reported on different architectures for further development and support.

Resources

About the project

Articles

Gallery

Fedora 31 Debian 10 Manjaro 19
kmon on fedora kmon on debian kmon on manjaro
Ubuntu 18.04 openSUSE Void Linux
kmon on ubuntu kmon on opensuse kmon on voidlinux

Social Media

Funding

Patreon

Support the development of kmon and other projects by becoming a patron.

Patreon Button

Open Collective

Open Collective backers Open Collective sponsors

Support the open source development efforts by becoming a backer or sponsor.

Open Collective Button

License

GNU General Public License (3.0)

Copyright

Copyright © 2020-2021, Orhun Parmaksız

Comments
  • Merging feature/support-for-insmod-rmmod, resolves #15

    Merging feature/support-for-insmod-rmmod, resolves #15

    Description

    Adding support for loading and unloading modules with insmod and rmmod independent of modprobe and without dependency handling.

    Motivation and Context

    The current way to load modules from within kmon is based upon modprobe. modprobe requires modules being inside /lib/modules/$(uname -r). This requirement having to install modules into that directory and update dependency tree with depmod is sometimes cumbersome. And to install some early development stage or experimental modules into the system should not be required.

    How Has This Been Tested?

    Loading, Reloading and Unloading a module by filename and as well as by module name to be certain that present functionality is still working.

    Screenshots / Output (if appropriate):

    none

    Types of changes

    todo when discussed and finished

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [x] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] Documentation (no code change)
    • [ ] Refactor (refactoring production code)
    • [ ] Other

    Checklist:

    todo when discussed and finished

    • [x] My code follows the code style of this project.
    • [x] I have updated the documentation and changelog accordingly.
    • [x] I have added tests to cover my changes.
    • [x] All new and existing tests passed.
    • [x] Rustfmt and Rust-clippy passed.
    opened by tpiekarski 13
  • Merging feature/display-dependent-modules

    Merging feature/display-dependent-modules

    Description

    • Added two new key-bindings d and alt-d
    • Showing dependent modules within present module information widget
    • Cutting content used by column at the moment at a fixed width (see following comment)
    • Updated documentation README.md, In-app help and manual page to mention how to display dependent modules

    Motivation and Context

    Resolves issue #11, Displaying dependent modules

    How Has This Been Tested?

    • Checked with multiple selected modules by displaying dependent modules with both keybindings.

    Screenshots / Output (if appropriate):

    Screenshot from 2020-04-24 13-13-54

    Types of changes

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [x] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] Documentation (no code change)
    • [ ] Refactor (refactoring production code)
    • [ ] Other

    Checklist:

    • [x] My code follows the code style of this project.
    • [x] I have updated the documentation and changelog accordingly.
    • [ ] I have added tests to cover my changes.
    • [x] All new and existing tests passed.
    • [x] Rustfmt and Rust-clippy passed.
    opened by tpiekarski 9
  • Display dependent modules

    Display dependent modules

    Is your feature request related to a problem? Please describe. At the moment not all dependent modules are displayed.

    Describe the solution you'd like When selecting a module in the kernel modules table all dependent modules could be displayed in module information widget in a list, sorted by name. The current display of dependent modules in the kernel modules table could be suffixed with ....

    Describe alternatives you've considered None, but open for alternatives :smile:

    Additional context None

    I'd like to provide a PR.

    enhancement 
    opened by tpiekarski 8
  • Fix in Readme file Manual steps to download Kmon

    Fix in Readme file Manual steps to download Kmon

    fix README file to download the package in manual section In REAMDE file in Manual you can read:

    1.- Download the latest binary from releases. wget https://github.com/orhun/kmon/releases/download/v[VERSION]/kmon-[VERSION].tar.gz

    for my openSUSE Tumbleweed system I had to download the file placed in: wget https://github.com/orhun/kmon/releases/download/v[VERSION]/kmon-[VERSION]-x86_64-unknown-linux-gnu.tar.gz

    Don't know if something has changed in GitHub file structure since the README file was written...

    To Reproduce Steps to reproduce the behavior:

    1. For v1.6.2 follow the README and run wget https://github.com/orhun/kmon/releases/download/v1.6.2/kmon-1.6.2.tar.gz
    2. ERROR 404: Not Found.

    Expected behavior update the path to download file

    System (please complete the following information):

    • openSUSE Tumbleweed x86_64
    bug 
    opened by victorhck 5
  • "error: could not compile `syn`." on ARM64 Ubuntu

    Describe the bug

    On an ARM64 system (with 512MB RAM) running Ubuntu 18.04.4 LTS the cargo install kmon results in an error

       Compiling termion v1.5.5
       Compiling xcb v0.8.2
       Compiling clap v2.33.0
       Compiling tui v0.8.0
    error: could not compile `syn`.
    
    Caused by:
      process didn't exit successfully: `rustc --edition=2018 --crate-name syn /home/sander/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.17/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="extra-traits"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="quote"' --cfg 'feature="visit"' -C metadata=e2b1f5fd1c5e3388 -C extra-filename=-e2b1f5fd1c5e3388 --out-dir /tmp/cargo-installjPvAn0/release/deps -L dependency=/tmp/cargo-installjPvAn0/release/deps --extern proc_macro2=/tmp/cargo-installjPvAn0/release/deps/libproc_macro2-941181b9f57e249a.rmeta --extern quote=/tmp/cargo-installjPvAn0/release/deps/libquote-e10e308aa35807a2.rmeta --extern unicode_xid=/tmp/cargo-installjPvAn0/release/deps/libunicode_xid-20d847053c8b7f62.rmeta --cap-lints allow --cfg syn_disable_nightly_tests` (signal: 9, SIGKILL: kill)
    warning: build failed, waiting for other jobs to finish...
    error: failed to compile `kmon v1.0.0`, intermediate artifacts can be found at `/tmp/cargo-installjPvAn0`
    
    Caused by:
      build failed
    sander@nanopineo2:~/git/kmon$ 
    

    Might be related to / same as https://github.com/rust-lang/rust/issues/56501

    To Reproduce Steps to reproduce the behavior: cargo install kmon

    Expected behavior A clean compile

    Screenshots/Logs image

    System (please complete the following information):

    • OS Information: Ubuntu 18.04.4 LTS
    • Rust Version: rustc 1.39.0
    • Project Version: kmon 1.0.0

    Additional context Might be caused by low RAM, or https://github.com/rust-lang/rust/issues/56501 ?

    bug 
    opened by sanderjo 5
  • Avoid actually parsing cli during tests

    Avoid actually parsing cli during tests

    Description

    Replaced use of clap::App and actual cli parsing of std::env::args() during tests with a stub (an empty arg matches ArgMatches::default()). For more details I found this explanation quite usefull https://github.com/clap-rs/clap/issues/1696#issuecomment-587064562.

    I have some doubts about a few tests:

    • style::tests::test_style I'm not sure what these first few lines were doing but the test passed without them so I guess they didn't impact the test?
    • tests::test_tui removed call to main()?, same thing, test passed without so it didn't impact the test?
    • util::tests::test_parse_args was removed, I don't think a can make it pass without actually parsing the cli.

    Are these changes ok with you or do you want me to rework them in some way?

    Motivation and Context

    This fixes test failure when arguments are given to the test binary generated by cargo test. For instance cargo test -- --test-threads 8. This is required by nixos where support for running the tests in parallel for rust packages was recently introduced. That's why kmon on the current stable release of nixos (20.03) is unaffected but breaks on the upcoming release (20.09).

    How Has This Been Tested?

    I ran cargo test -- --test-threads 8 and the tests passed.

    Screenshots / Output (if appropriate):

    Types of changes

    • [x] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] Documentation (no code change)
    • [ ] Refactor (refactoring production code)
    • [ ] Other

    Checklist:

    • [x] My code follows the code style of this project.
    • [x] I have updated the documentation and changelog accordingly.
    • [ ] I have added tests to cover my changes.
    • [x] All new and existing tests passed.
    • [x] Rustfmt and Rust-clippy passed.
    opened by mdevlamynck 3
  • Merging feature/reload-module-function, resolves #10

    Merging feature/reload-module-function, resolves #10

    Description

    • Moved keybinding for refresh from 'r' to 'ctrl-r' and updated docs accordingly

    • Implemented new Command for reloading, using present command Unload/Load

    • Added a new keybinding 'r' for reload command and updated docs accordingly

    • GIF haven't been updated, only a placeholder have been put into README.md.

    Motivation and Context

    Resolves issue #10

    How Has This Been Tested?

    • Checked moved keybinding for refresh
    • Checked reloading lkm_example module with the timestamping from the Kernel Ring Buffer for the message printed with printk in init and exit functions
    • Rechecking load and unload commands + refresh triggered by send_key() as well

    Screenshots / Output (if appropriate):

    Triggering Reload

    Triggering Reload

    Reload executed

    Reload executed

    Types of changes

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [x] New feature (non-breaking change which adds functionality)
    • [x] Breaking change (fix or feature that would cause existing functionality to change) (Changes present keybinding of refresh)
    • [ ] Documentation (no code change)
    • [ ] Refactor (refactoring production code)
    • [ ] Other

    Checklist:

    • [x] My code follows the code style of this project.
    • [x] I have updated the documentation and changelog accordingly. (Like discussed earlier in #7 @orhun will update changelog and increase final version in Cargo.toml after merge)
    • [x] I have added tests to cover my changes. Is this one test in cmd.rs checking if the command is build enough?
    • [x] All new and existing tests passed.
    • [x] Rustfmt and Rust-clippy passed.
    opened by tpiekarski 3
  • Introduce new sorting argument for most-used module

    Introduce new sorting argument for most-used module

    Is your feature request related to a problem? Please describe. Not a problem, but rather an idea. Its about to quickly identify within kmon the most dependent modules which uses most other modules.

    Describe the solution you'd like Passing a new command line argument for sorting. Something like: kmon sort -d | --dependents or kmon sort -u | --used This argument would sort by the column used by at /proc/modules (3rd column) and could also be reversed with -r.

    What do you think? I'd like to provide a PR as well.

    Describe alternatives you've considered None. Such sorting is already present for module name and size.

    Additional context None.

    enhancement 
    opened by tpiekarski 3
  • dmesg not showing output in the desgnated pane

    dmesg not showing output in the desgnated pane

    Describe the bug When invoked as normal user dmesg not showing the output in the designated pane.

    To Reproduce Steps to reproduce the behavior: Run as a normal user.

    Expected behavior dmesg should show the output in the designated pane.

    Screenshots/Logs Attached a screenshot for your perusal. 2020-04-06-105832_2390x768_scrot

    System (please complete the following information):

    • OS Information: Gentoo, Slackware-current
    • Rust Version: [e.g. 1.40.0]
    • Project Version: kmon-1.0.0 Additional context Please note, only in Arch, it is showing properly. Now, I have cross check the binaries, used by this program ,i.e dmesg , kmod permissions and locations ... look sane to me...still..
    bug 
    opened by unixbhaskar 3
  • Can't upgrade to 1.4.0

    Can't upgrade to 1.4.0

    Describe the bug I'm trying to compile 1.4.0 version with cargo but it finished with error.

      = note: /usr/bin/ld: cannot find -lxcb-shape
              /usr/bin/ld: cannot find -lxcb-xfixes
              collect2: error: ld returned 1 exit status
    

    To Reproduce Steps to reproduce the behavior:

    1. Compile with sudo cargo install kmon --force command.

    Expected behavior Compile and install new 1.4.0 version

    Screenshots/Logs Logs from the compile process.

        Updating crates.io index
      Downloaded kmon v1.4.0
      Downloaded 1 crate (50.7 KB) in 6.47s
      Installing kmon v1.4.0
      Downloaded bytesize v1.0.1
      Downloaded unicode-width v0.1.8
      Downloaded enum-iterator v0.6.0
      Downloaded clap v2.33.2
      Downloaded clipboard v0.5.0
      Downloaded colorsys v0.5.4
      Downloaded termion v1.5.5
      Downloaded tui v0.8.0
      Downloaded enum-unitary v0.4.2
      Downloaded ansi_term v0.11.0
      Downloaded vec_map v0.8.2
      Downloaded textwrap v0.11.0
      Downloaded enum-iterator-derive v0.6.0
      Downloaded bitflags v1.2.1
      Downloaded atty v0.2.14
      Downloaded x11-clipboard v0.3.3
      Downloaded strsim v0.8.0
      Downloaded either v1.5.3
      Downloaded log v0.4.11
      Downloaded num-traits v0.2.12
      Downloaded quote v1.0.7
      Downloaded proc-macro2 v1.0.19
      Downloaded numtoa v0.1.0
      Downloaded cassowary v0.3.0
      Downloaded unicode-segmentation v1.6.0
      Downloaded libc v0.2.74
      Downloaded itertools v0.8.2
      Downloaded syn v1.0.38
      Downloaded cfg-if v0.1.10
      Downloaded xcb v0.8.2
      Downloaded autocfg v1.0.0
      Downloaded unicode-xid v0.2.1
       Compiling libc v0.2.74
       Compiling proc-macro2 v1.0.19
       Compiling log v0.4.11
       Compiling unicode-xid v0.2.1
       Compiling syn v1.0.38
       Compiling cfg-if v0.1.10
       Compiling bitflags v1.2.1
       Compiling autocfg v1.0.0
       Compiling unicode-width v0.1.8
       Compiling either v1.5.3
       Compiling numtoa v0.1.0
       Compiling strsim v0.8.0
       Compiling vec_map v0.8.2
       Compiling unicode-segmentation v1.6.0
       Compiling cassowary v0.3.0
       Compiling ansi_term v0.11.0
       Compiling bytesize v1.0.1
       Compiling colorsys v0.5.4
       Compiling textwrap v0.11.0
       Compiling itertools v0.8.2
       Compiling num-traits v0.2.12
       Compiling quote v1.0.7
       Compiling atty v0.2.14
       Compiling termion v1.5.5
       Compiling xcb v0.8.2
       Compiling clap v2.33.2
       Compiling tui v0.8.0
       Compiling x11-clipboard v0.3.3
       Compiling clipboard v0.5.0
       Compiling enum-iterator-derive v0.6.0
       Compiling enum-iterator v0.6.0
       Compiling enum-unitary v0.4.2
       Compiling kmon v1.4.0
    error: linking with `cc` failed: exit code: 1
      |
      = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/cargo-installBuooAj/release/deps/kmon-c05e4a56f26dab14.kmon.acj66v5t-cgu.0.rcgu.o" "/tmp/cargo-installBuooAj/release/deps/kmon-c05e4a56f26dab14.kmon.acj66v5t-cgu.1.rcgu.o" "/tmp/cargo-installBuooAj/release/deps/kmon-c05e4a56f26dab14.kmon.acj66v5t-cgu.10.rcgu.o" "/tmp/cargo-installBuooAj/release/deps/kmon-c05e4a56f26dab14.kmon.acj66v5t-cgu.11.rcgu.o" "/tmp/cargo-installBuooAj/release/deps/kmon-c05e4a56f26dab14.kmon.acj66v5t-cgu.12.rcgu.o" "/tmp/cargo-installBuooAj/release/deps/kmon-c05e4a56f26dab14.kmon.acj66v5t-cgu.13.rcgu.o" "/tmp/cargo-installBuooAj/release/deps/kmon-c05e4a56f26dab14.kmon.acj66v5t-cgu.14.rcgu.o" "/tmp/cargo-installBuooAj/release/deps/kmon-c05e4a56f26dab14.kmon.acj66v5t-cgu.15.rcgu.o" "/tmp/cargo-installBuooAj/release/deps/kmon-c05e4a56f26dab14.kmon.acj66v5t-cgu.2.rcgu.o" "/tmp/cargo-installBuooAj/release/deps/kmon-c05e4a56f26dab14.kmon.acj66v5t-cgu.3.rcgu.o" "/tmp/cargo-installBuooAj/release/deps/kmon-c05e4a56f26dab14.kmon.acj66v5t-cgu.4.rcgu.o" "/tmp/cargo-installBuooAj/release/deps/kmon-c05e4a56f26dab14.kmon.acj66v5t-cgu.5.rcgu.o" "/tmp/cargo-installBuooAj/release/deps/kmon-c05e4a56f26dab14.kmon.acj66v5t-cgu.6.rcgu.o" "/tmp/cargo-installBuooAj/release/deps/kmon-c05e4a56f26dab14.kmon.acj66v5t-cgu.7.rcgu.o" "/tmp/cargo-installBuooAj/release/deps/kmon-c05e4a56f26dab14.kmon.acj66v5t-cgu.8.rcgu.o" "/tmp/cargo-installBuooAj/release/deps/kmon-c05e4a56f26dab14.kmon.acj66v5t-cgu.9.rcgu.o" "-o" "/tmp/cargo-installBuooAj/release/deps/kmon-c05e4a56f26dab14" "/tmp/cargo-installBuooAj/release/deps/kmon-c05e4a56f26dab14.4ppiwg2svz00f8hk.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/tmp/cargo-installBuooAj/release/deps" "-L" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/cargo-installBuooAj/release/deps/libcolorsys-3e518bb0ad5a69ad.rlib" "/tmp/cargo-installBuooAj/release/deps/libclap-07f08cc6fcdf185e.rlib" "/tmp/cargo-installBuooAj/release/deps/libvec_map-1a06bcb0f716d2c9.rlib" "/tmp/cargo-installBuooAj/release/deps/libtextwrap-e4de17c323fc34f8.rlib" "/tmp/cargo-installBuooAj/release/deps/libstrsim-62fcbb9566b11f33.rlib" "/tmp/cargo-installBuooAj/release/deps/libatty-2d812482c98a8b03.rlib" "/tmp/cargo-installBuooAj/release/deps/libansi_term-399d9c79af21b78c.rlib" "/tmp/cargo-installBuooAj/release/deps/libbytesize-420957e69843d471.rlib" "/tmp/cargo-installBuooAj/release/deps/libtui-b097d0d9160a42e1.rlib" "/tmp/cargo-installBuooAj/release/deps/libitertools-23a5754383cae4e6.rlib" "/tmp/cargo-installBuooAj/release/deps/libeither-8f5a6e5c8171d45e.rlib" "/tmp/cargo-installBuooAj/release/deps/libbitflags-04d4a626dc324750.rlib" "/tmp/cargo-installBuooAj/release/deps/libcassowary-f0b9578c878bca06.rlib" "/tmp/cargo-installBuooAj/release/deps/libunicode_width-e9f7e28636b31438.rlib" "/tmp/cargo-installBuooAj/release/deps/libunicode_segmentation-0fb757b03cec94d6.rlib" "/tmp/cargo-installBuooAj/release/deps/libtermion-6c40df01fde41458.rlib" "/tmp/cargo-installBuooAj/release/deps/libnumtoa-bf45b4eb54bf35bb.rlib" "/tmp/cargo-installBuooAj/release/deps/libenum_unitary-b2e390d4839eff0a.rlib" "/tmp/cargo-installBuooAj/release/deps/libnum_traits-ad895ed98309e3d7.rlib" "/tmp/cargo-installBuooAj/release/deps/libenum_iterator-74eeca65958d47a7.rlib" "/tmp/cargo-installBuooAj/release/deps/libclipboard-08b3e32b0c1b6e7d.rlib" "/tmp/cargo-installBuooAj/release/deps/libx11_clipboard-b205c83a6d605d8e.rlib" "/tmp/cargo-installBuooAj/release/deps/libxcb-80c689becef29706.rlib" "/tmp/cargo-installBuooAj/release/deps/liblog-a6ff18f6efc50c20.rlib" "/tmp/cargo-installBuooAj/release/deps/libcfg_if-4538d89b6d34b017.rlib" "/tmp/cargo-installBuooAj/release/deps/liblibc-35db208ec6c99d77.rlib" "-Wl,--start-group" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-b1b61f01951b016b.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-1a219005f9510085.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-de703a5f53bf135e.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-f8b5f83d4ba2b90f.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace-c6dc8f69734bcae2.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace_sys-4546f4207f7495c9.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-2ac782148854dc56.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-cf897c39850c16b7.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-9d727da20068fc09.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-bd6ee87558a376f2.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-182e50caadead100.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-88083985464b6af5.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-83ed8731003cd087.rlib" "-Wl,--end-group" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-d61dbae1fa88f6f5.rlib" "-Wl,-Bdynamic" "-lxcb" "-lxcb" "-lxcb" "-lxcb" "-lxcb-render" "-lxcb-shape" "-lxcb-xfixes" "-lutil" "-ldl" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
      = note: /usr/bin/ld: cannot find -lxcb-shape
              /usr/bin/ld: cannot find -lxcb-xfixes
              collect2: error: ld returned 1 exit status
              
    
    error: aborting due to previous error
    
    error: failed to compile `kmon v1.4.0`, intermediate artifacts can be found at `/tmp/cargo-installBuooAj`
    
    Caused by:
      could not compile `kmon`.
    
    To learn more, run the command again with --verbose.
    

    System (please complete the following information):

    • OS Information: Ubuntu 20.04, kernel 5.4.0-42-lowlatency
    • Rust Version: 1.43
    • Project Version: 1.4.0

    Additional context There's no any other context

    bug 
    opened by QkiZMR 2
  • Support for low-level module handling with insmod/rmmod

    Support for low-level module handling with insmod/rmmod

    Is your feature request related to a problem? Please describe. The current way to load modules from within kmon is based upon modprobe. modprobe requires modules being inside /lib/modules/$(uname -r). This requirement having to install modules into that directory and update dependency tree with depmod is sometimes cumbersome. And to install some early development stage or experimental modules into the system should not be required.

    Describe the solution you'd like Offer a way to use insmod and rmmod for loading/unloading module independent of modprobe and without automatic dependent module handling. A possible implementation could be to try loading/unloading module with insmod/rmmod after modprobe failed.

    On second thought kmon could determine what to use if there is a filename with a .ko suffix provided. insmod require the full filename and modprobe only loads a module by its module name and defined aliases.

    Describe alternatives you've considered None, because loading a module with a path and a filename is not possible with modprobe.

    Additional context None

    When we come to terms if and how this feature could be implemented, I would like to provide a PR.

    enhancement 
    opened by tpiekarski 2
  • RUSTSEC-2022-0048: xml-rs is Unmaintained

    RUSTSEC-2022-0048: xml-rs is Unmaintained

    xml-rs is Unmaintained

    | Details | | | ------------------- | ---------------------------------------------- | | Status | unmaintained | | Package | xml-rs | | Version | 0.8.4 | | URL | https://github.com/netvl/xml-rs/issues | | Date | 2022-01-26 |

    xml-rs is a XML parser has open issues around parsing including integer overflows / panics that may or may not be an issue with untrusted data.

    Together with these open issues with Unmaintained status xml-rs may or may not be suited to parse untrusted data.

    Alternatives

    See advisory page for additional details.

    opened by github-actions[bot] 0
  • Remote monitoring support over SSH

    Remote monitoring support over SSH

    Is your feature request related to a problem? Please describe.

    As someone who want to monitor remote hosts on my non-unix host, I'd like to see an SSH feature to allow remote monitoring on kmon. Since I don't know much about the internals of kmon whether is tightly coupled or not with the kernel itself in current code base, I'd like to ask reasonable and whether it makes sense.

    Describe the solution you'd like

    Introduce a new remote sub command with optional -i identity_file.

    $ kmon remote [user@]host:[port] [-i identity_file]
    

    Describe alternatives you've considered -

    Additional context -

    enhancement 
    opened by Dentrax 0
  • RUSTSEC-2021-0019: Multiple soundness issues

    RUSTSEC-2021-0019: Multiple soundness issues

    Multiple soundness issues

    | Details | | | ------------------- | ---------------------------------------------- | | Package | xcb | | Version | 0.8.2 | | URL | https://github.com/RustSec/advisory-db/issues/653 | | Date | 2021-02-04 |

    Calls std::str::from_utf8_unchecked() without any checks

    The function xcb::xproto::GetAtomNameReply::name() calls std::str::from_utf8_unchecked() on the raw bytes that were received from the X11 server without any validity checks. The X11 server only prevents interior null bytes, but otherwise allows any X11 client to create an atom for arbitrary bytes.

    This issue is tracked here: https://github.com/rtbo/rust-xcb/issues/96

    xcb::xproto::GetPropertyReply::value() allows arbitrary return types

    The function xcb::xproto::GetPropertyReply::value() returns a slice of type T where T is an unconstrained type parameter. The raw bytes received from the X11 server are interpreted as the requested type.

    The users of the xcb crate are advised to only call this function with the intended types. These are u8, u16, and u32.

    This issue is tracked here: https://github.com/rtbo/rust-xcb/issues/95

    Out of bounds read in xcb::xproto::change_property()

    xcb::xproto::change_property has (among others) the arguments format: u8 and data: &amp;[T]. The intended use is one of the following cases:

    • format = 8 and T = u8
    • format = 16 and T = u16
    • format = 32 and T = u32 However, this constraint is not enforced. For example, it is possible to call the function with format = 32 and T = u8. In this case, a read beyond the end of the data slice is performed and the bytes are sent to the X11 server.

    The users of the xcb crate are advised to only call this function with one of the intended argument combinations.

    This issue is tracked here: https://github.com/rtbo/rust-xcb/issues/94

    'Safe' wrapper around std::mem::transmute()

    The function xcb::base::cast_event() takes a reference to a xcb::base::GenericEvent and returns a reference to an arbitrary type, as requested by the caller (or found via type interference). The function is implemented as a direct call to std::mem::transmute(). Since the return type is not constrained, this allows transmution to an incorrect type or a type that is larger than the X11 event that was passed in.

    X11 events are mostly always 32 bytes large and this function works as intended.

    Users are advised to only cast to the event structs provided by the xcb crate (and hope for the best).

    This issue is tracked here: https://github.com/rtbo/rust-xcb/issues/78

    See advisory page for additional details.

    opened by github-actions[bot] 0
  • Add new menu layouts

    Add new menu layouts

    Is your feature request related to a problem? Please describe. It would be nice to have different menu layouts instead of having only one which is fixed. We already have the functionality for changing the block sizes and moving them around. This new menu(s) could be possibly change the overall layout for different use cases such as:

    • Kernel monitoring (dmesg) mode where the "Kernel Activities" block is maximized.
    • Inspection mode where only the module info is shown.

    And a couple of other scenarios...

    Describe the solution you'd like Define a list of menu layouts and add a key binding for changing the current layout.

    Describe alternatives you've considered There could be a command-line argument for launching kmon with the given menu type. e.g. kmon --menu activities

    Additional context bpytop has something similar where you press m and the layout changes.

    enhancement 
    opened by orhun 0
  • some Ideas

    some Ideas

    Your program is very interresting.

    1. You also could enable/disable IPv6 feature.
    2. On each module you have options. The idea is to be able to set all drivers options
    modinfo <modules>
    options <modules> options1=X options2=Y ...
    
    

    If it s possibe, to have the default value, and the best value

    1. to unload drivers over the grub kernel ex: ipv6.disable=1 you could use this command : grubby --remove-args="argX argY" --args="argA argB" --update-kernel

    2. or to propose to add some options to the grub if you have a specific hardware.ex: gpu nvidia, cpu intel,wifi broadcom,...

    3. Backup/restore configuration by command line.

    regards,

    enhancement 
    opened by cedricam 0
Releases(v1.6.2)
Owner
Orhun Parmaksız
FOSS Developer, Arch Linux Trusted User
Orhun Parmaksız
📊 Fetch & monitor your server's resource usage through Lua

?? gmsv_serverstat Simple serverside binary module which can expose information about system resource usage to Lua. Installation Download the relevant

William 21 Jul 30, 2022
A lib crate for gathering system info such as cpu, distro, environment, kernel, etc in Rust.

nixinfo A lib crate for gathering system info such as cpu, distro, environment, kernel, etc in Rust. To use: nixinfo = "0.2.8" in your Cargo.toml. Cur

ValleyKnight 37 Nov 26, 2022
Untrusted IPC with maximum performance and minimum latency. On Rust, on Linux.

Untrusted IPC with maximum performance and minimum latency. On Rust, on Linux. When is this Rust crate useful? Performance or latency is crucial, and

null 72 Jan 3, 2023
The R Installation Manager

The R Installation Manager Install, remove, configure R versions. ?? Features Works on macOS, Windows version is coming soon! Install multiple R vresi

Gábor Csárdi 339 Jan 5, 2023
Everyday-use client-side map-aware Arch Linux mirror ranking tool

Rate Arch Mirrors This is a tool, which fetches mirrors, skips outdated/syncing Arch Linux mirrors, then uses info about submarine cables and internet

Nikita Almakov 196 Jan 2, 2023
Transform Linux Audit logs for SIEM usage

Linux Audit – Usable, Robust, Easy Logging TLDR: Instead of audit events that look like this… type=EXECVE msg=audit(1626611363.720:348501): argc=3 a0=

null 465 Jan 1, 2023
MILD - Minimal Install Linux Desktop

MILD - Minimal Install Linux Desktop MILD is a simple and straightforward text-mode installer that aims to install a "D.E."(Desktop Environment) with

Pedro Rosendo 3 Jul 23, 2022
A simple and fast download accelerator, written in Rust

zou A simple and fast download accelerator, written in Rust Zou is a Snatch fork by @k0pernicus. Snatch is a fast and interruptable download accelerat

Antonin Carette 173 Dec 4, 2022
GTK application for browsing and installing fonts from Google's font archive

Font Finder This project is a from-scratch implementation of TypeCatcher in Rust. It is a GTK3 application for browsing through and installing fonts f

Michael Murphy 252 Dec 26, 2022
A project for automatically generating and maintaining Debian repositories from a TOML spec.

Debian Repository Builder A simple utility for constructing and maintaining Debian repositories. Configuration of a repo is based on the directory hie

Pop!_OS 52 Feb 7, 2022
Utility that takes logs from anywhere and sends them to Telegram.

logram Utility that takes logs from anywhere and sends them to Telegram. Supports log collection from files, journald and docker containers. More abou

Max Eliseev 85 Dec 22, 2022
A safe and ergonomic alternative to rm

rip (Rm ImProved) rip is a command-line deletion tool focused on safety, ergonomics, and performance. It favors a simple interface, and does not imple

Kevin Liu 781 Jan 7, 2023
A simple, fast and user-friendly alternative to 'find'

fd [中文] [한국어] fd is a program to find entries in your filesytem. It is a simple, fast and user-friendly alternative to find. While it does not aim to

David Peter 25.8k Dec 30, 2022
CLI utility to move (or rename) your files to a new location and redirect all of its symbolic links, to the new path

Move Links CLI utility to move (or rename) your files to a new location and redirect all of its symbolic links, to the new path (or name). Usage execu

Ben Mefteh 18 May 22, 2022
A tool to simplify reprovisioning a fresh OS. Installs packages and manages dotfiles.

[[TOC]] Comtrya This is better, yes? Warning This tool is ridiculously early in its development. I'm building out features as I migrate my dotfiles ov

David McKay 2 Dec 29, 2022
A tool to simplify reprovisioning a fresh OS. Installs packages and manages dotfiles.

Comtrya This is better, yes? Warning This tool is ridiculously early in its development. I'm building out features as I migrate my dotfiles over. Thos

Comtrya 272 Jan 7, 2023
Parallel finance a decentralized lending protocol built on top of the Polkadot ecosystem. Our unique approach will allow users to earn "double interests" from staking and lending their tokens simultaneously.

Parallel Finance A new Cumulus-based Substrate node, ready for hacking ?? Getting Started Follow these steps to get started with the Cumulus Template

parallel-finance 100 Dec 17, 2022
idf-env tool helps set up and manage ESP-IDF installations

idf-env Tool for maintaining ESP-IDF environment. Quick start Install serial drivers for ESP boards on Windows. Execute following command in PowerShel

Espressif Systems 19 Dec 4, 2022
A system handler to get information and interact with processes written in Rust

A system handler to get information and interact with processes written in Rust

Guillaume Gomez 1.1k Jan 3, 2023