This is a simple Linux kernel module written in C programming language that lists all the currently running processes in the system and their corresponding states.
- Execute the 'make' command to create the .ko file:
make
- Insert module into the kernel using insmod:
sudo insmod processmod.ko
- To check if the kernel module is inserted into the kernel at runtime execute the lsmod command:
lsmod
- The module prints its output to the kernel log. You can view this using the dmesg command:
sudo dmesg