项目作者: MattGorko

项目描述 :
Histogram-LKM
高级语言: C
项目地址: git://github.com/MattGorko/Histogram-LKM.git
创建时间: 2020-04-06T17:02:35Z
项目社区:https://github.com/MattGorko/Histogram-LKM

开源协议:GNU General Public License v2.0

下载


Histogram LKM

Histogram is a Linux Kernel Module which provides a histogram of all
words written since the loading of the module.

Histogram works by a registering a keyboard notifier to keep track of
keys pressed. Only ascii characters work during this period.

The histogram is available through a file in debugfs, it contains all
words typed since the loading of the Histogram LKM:
/sys/kernel/debugfs/histogram/histogram (Could be accessed in
privileged mode).

Usage

To load the module:

  1. $ sudo make load

To unload the module:

  1. $ sudo make unload

To install the module (run as root):

  1. # make install

If you want to sign the module: https://wiki.gentoo.org/wiki/Signed_kernel_module_support

To view the histogram:

  1. $ sudo cat /sys/kernel/debugfs/histogram/histogram
  2. not: 1
  3. to: 2
  4. or: 1
  5. be: 2

To get the module info:

  1. $ modinfo histogram
  2. filename: /lib/modules/5.6.2-arch1-2/extra/histogram.ko.xz
  3. version: 0.1
  4. description: Histogram of written words.
  5. author: Cesar Belley <cesar.belley@lse.epita.fr>
  6. license: GPL v2
  7. srcversion: 2412D2C2AA86A5ADFCCA15E
  8. depends:
  9. retpoline: Y
  10. name: histogram
  11. vermagic: 5.6.2-arch1-2 SMP preempt mod_unload

Building

Build the binary:

  1. $ make

Generate doc:

  1. $ make doc

License

This project is licensed under GPL-2.0.

Author

César MattGorko Belley cesar.belley@lse.epita.fr