Distributed Process & Resource Monitor
Distroc is a simple master-agent process monitor. The master accepts authenticated agents, collects process snapshots, and shows the combined process list.
- macOS or Linux
gccmake- A terminal for the master and another (one/many) terminal for the agent (these terminals may be on different devices)
Distroc/ # Project root
├── Makefile # Build commands for master and agent
├── README.md # Project documentation and run guide
├── data/
│ └── users.csv # Username/password credentials
├── include/
│ ├── auth.h # Authentication-related declarations
│ ├── common.h # Shared constants/config (e.g., SERVER_IP)
│ ├── ipc_utils.h # Socket/IP communication helpers
│ ├── master.h # Master-node function declarations
│ └── protocol.h # Message protocol/packet definitions
└── src/
├── agent/
│ ├── collector.c # Process collection logic on agent
│ └── main.c # Agent entry point and menu flow
└── master/
├── auth_logic.c # Master-side credential validation
├── handlers.c # Master request/response handlers
└── main.c # Master entry point and server loop
The agent connects to the IP stored in include/common.h.
To find your machine's LAN IP on the en0 interface, run:
ifconfig en0Look for the inet address in the output, then replace SERVER_IP in include/common.h with that address. This IP address must be extracted from the device where the master node is being run. Agent nodes will use this IP to connect to the master node.
- Update
SERVER_IPin include/common.h if you are not using127.0.0.1. - Build the project with
make. - Start the master in one terminal:
./master_node- Start the agent in another terminal with a valid username and password from data/users.csv:
./agent_node user user123- Use the agent menu to view processes.
The login data is stored in data/users.csv.
Current format:
username,password
Example:
user,user123
- Guest users can view processes but are not tracked.
- Logged-in users are tracked by the master and can also view processes.