Skip to content

zro404/procwatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProcWatch

ProcessWatch is a Linux kernel module that exposes process information through a /proc interface. It allows users to monitor running processes and apply filters dynamically by writing to the proc file.

The module creates:

/proc/procwatch

screenshot

Features

  • Lists active processes from kernel space
  • Supports runtime filtering via writing to /proc/procwatch

Usage

Read Operation

When you run:

cat /proc/procwatch

The module iterates over task_struct and prints the following process details:

  • PID
  • Process name
  • UID / loginuid

Write Operation (Filtering)

You can write filter criteria into the proc file:

echo "name=bash" > /proc/procwatch

or

echo "pid=6969" > /proc/procwatch

The next read will only show matching processes.

Reset filter

echo "clear" > /proc/procwatch

Supported Filters

Filter Type Example Input Description
Name name=bash Match process name
UID uid=6969 Filter by user ID
Clear clear Remove all filters

Why this exists

Mostly just to:

  • mess with /proc
  • understand how user <-> kernel interaction works
  • get comfortable poking around task_struct
  • and generally to stop treating kernel code like black magic

About

Linux kernel module that exposes process information through a /proc interface.

Topics

Resources

License

Stars

Watchers

Forks

Contributors