A memory monitoring and analysis dashboard built with Next.js and C, providing real-time insights into system and process memory usage.
-
Real-time Memory Monitoring
- System-wide memory statistics
- Process-specific memory analysis
- Virtual memory mapping visualization
- Memory leak detection
-
Advanced Analytics
- Memory fragmentation analysis
- Page fault tracking
- Memory pressure monitoring
- Swap usage statistics
- Interactive timeline visualization
- Memory health indicators
-
Frontend
- Next.js 14
- TypeScript
- Tailwind CSS
-
Backend
- C-based memory analysis program
- JSON output format
NOTE: This project is designed to be run on a Linux machine. Please ensure you have a Linux machine with the necessary dependencies installed. Tested on Ubuntu 22.04.
Before building the project, ensure you have the following dependencies installed:
- Node.js and npm
- GCC compiler
- pthread library
- json-c library
On Ubuntu/Debian, you can install the C dependencies with:
sudo apt-get install build-essential libjson-c-dev- Clone the repository:
git clone https://github.com/CubeStar1/memory-flow.git- First, compile the memory analysis backend:
cd os-gui/bin
makeThis will create the vmd (Virtual Memory Dashboard) executable.
- Install the frontend dependencies:
cd os-gui
npm install- Run the development server:
npm run dev- Open http://localhost:3000 with your browser to access the dashboard.
- System Memory Overview
- Process Memory Analysis
- Memory Mapping Visualization
- Memory Health Indicators
- Usage Timeline
- Memory Distribution Charts
- Optimization Recommendations
-
The dashboard makes API calls to the nextjs server running on the same machine, which periodically (every 5 seconds) runs the
vmdexecutable and returns the results in JSON format. -
The JSON data is then processed by the dashboard to display the memory usage and analysis.
-
/api/memory- Basic memory statistics -
/api/analytics- Advanced memory analytics
To clean the build:
cd os-gui/bin
make cleanTo rebuild the backend:
cd os-gui/bin
makeThe dashboard can be configured through environment variables:
NEXT_PUBLIC_UPDATE_INTERVAL=5000 # Data refresh interval in milliseconds
NEXT_PUBLIC_MAX_HISTORY=30 # Maximum data points in timeline




