Skip to content

BrookMaoDev/ConcurrentSystemMonitor

Repository files navigation

Concurrent Resource Monitoring Tool

Introduction

This tool monitors CPU and memory utilization, along with hardware specifications like core count and clock speed, on a Linux system. The program uses multiple child processes—one for each type of resource—fetching data concurrently and sending it back to the parent process via pipes.

Approach

The tool tracks CPU utilization by reading the /proc/stat file, comparing data from two points in time. For memory stats, it leverages the sysinfo library, which provides total and free RAM. The data is fetched by child processes, which send it back to the parent for further handling. Below is a flowchart illustrating the interaction between modules:

Compilation

To compile the project, run:

make

Sample Usage

Note: You may need to reduce your terminal’s text size to ensure that all output fits on the screen, especially with a large number of samples.

./main

./main --memory

./main --cpu

./main --cores

./main --memory --cpu

./main 100 200000 --memory --cpu --cores

References

About

A concurrent Linux system resource monitoring tool that tracks CPU, memory, and hardware specs, developed for the "Software Tools and Systems Programming" course at the University of Toronto.

Resources

Stars

Watchers

Forks

Contributors