Skip to content
Akshay-K-MPublic

About

Distributed Process & Resource Monitor

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distroc

Distributed Process & Resource Monitor

What It Does

Distroc is a simple master-agent process monitor. The master accepts authenticated agents, collects process snapshots, and shows the combined process list.

Prerequisites

  • macOS or Linux
  • gcc
  • make
  • A terminal for the master and another (one/many) terminal for the agent (these terminals may be on different devices)

Directory Structure

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

Configure The Master IP

The agent connects to the IP stored in include/common.h.

To find your machine's LAN IP on the en0 interface, run:

ifconfig en0

Look 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.

How To Run

  1. Update SERVER_IP in include/common.h if you are not using 127.0.0.1.
  2. Build the project with make.
  3. Start the master in one terminal:
./master_node
  1. Start the agent in another terminal with a valid username and password from data/users.csv:
./agent_node user user123
  1. Use the agent menu to view processes.

Credentials

The login data is stored in data/users.csv.

Current format:

username,password

Example:

user,user123

Notes

  • Guest users can view processes but are not tracked.
  • Logged-in users are tracked by the master and can also view processes.

About

Distributed Process & Resource Monitor

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages