{"id":22913744,"url":"https://github.com/ujjwalkran/cpumonitoringtool","last_synced_at":"2025-04-01T11:48:41.928Z","repository":{"id":266546388,"uuid":"898649582","full_name":"ujjwalkran/CPUMonitoringTool","owner":"ujjwalkran","description":"CPUMonitoringTool is a real-time resource monitoring tool that tracks CPU and memory usage using C++ and logs the data. It offers both a command-line and a web interface for displaying the usage statistics, with real-time updates and interactive charts.","archived":false,"fork":false,"pushed_at":"2024-12-05T04:50:05.000Z","size":1610,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T06:43:13.349Z","etag":null,"topics":["cpu-monitoring","linux","memory-monitoring","projects-in-cpp","real-time-logging","resource-monitoring","rest-api"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ujjwalkran.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-04T19:19:28.000Z","updated_at":"2024-12-04T20:19:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"dd20655b-c58d-441f-8197-1b1f26963f84","html_url":"https://github.com/ujjwalkran/CPUMonitoringTool","commit_stats":null,"previous_names":["ujjwalkran/cpumonitoringtool"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ujjwalkran%2FCPUMonitoringTool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ujjwalkran%2FCPUMonitoringTool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ujjwalkran%2FCPUMonitoringTool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ujjwalkran%2FCPUMonitoringTool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ujjwalkran","download_url":"https://codeload.github.com/ujjwalkran/CPUMonitoringTool/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246635956,"owners_count":20809330,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpu-monitoring","linux","memory-monitoring","projects-in-cpp","real-time-logging","resource-monitoring","rest-api"],"created_at":"2024-12-14T05:11:25.700Z","updated_at":"2025-04-01T11:48:41.883Z","avatar_url":"https://github.com/ujjwalkran.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Real-Time Resource Monitoring Tool 🚀\n\nA Linux-based real-time resource monitoring tool developed using C++ and Node.js. This project monitors CPU and memory usage, logs the data, and provides a web interface to visualize and track resource usage over time.\n\n## Features 🌟\n\n- **Real-Time CPU and Memory Usage Monitoring**: Continuously tracks system resources.\n- **Logging**: Logs CPU and memory statistics into a file for historical analysis.\n- **Web Interface**: Displays logs in real-time with a graphical representation of CPU and memory usage.\n- **Chart Visualization**: Visualizes CPU and memory usage with charts using [Chart.js](https://www.chartjs.org/).\n- **Cross-Platform**: Can be run on Linux systems and accessed through a web interface.\n\n## Prerequisites ⚙️\n\nBefore you begin, make sure you have the following installed on your machine:\n\n- **Linux System** (Ubuntu or similar distribution)\n- **C++ Compiler**: For compiling the monitoring application.\n- **Node.js**: For the backend server that serves the logs and the web interface.\n- **Git**: For version control.\n\n## Installation 🛠️\n\n### 1. Clone the repository:\n\n```bash\ngit clone https://github.com/ujjwalkran/CPUMonitoringTool.git\ncd CPUMonitoringTool\n```\n### 2. Build the C++ Monitoring Application\n\nNavigate to the `src` directory and compile the C++ files:\n\n```bash\ncd src\nmake\n```\n### 3. Run the Resource Monitoring Tool\nStart the monitoring tool:\n\n```bash\n../build/resource_monitor\n```\nThis will begin logging CPU and memory usage to `backend/logs/resource_log.txt.`\n\n### 4. Set up the Web Interface\nNavigate to the frontend directory and install required dependencies:\n\n```bash\ncd frontend\nnpm install\n```\n\n### 5. Run the Node.js Backend\nNavigate to the root directory and start the Node.js server:\n\n```bash\ncd ..\nnpm start\n```\nThis will start a web server at `http://localhost:3000`.\n***\n\n## Usage 🖥️\n\n- The backend (Node.js) will provide the resource logs through an API at `http://localhost:3000/api/logs`.\n- The frontend will fetch the logs every 2 seconds and display them on the webpage.\n- The logs include CPU and memory usage percentages, which are logged every second.\n\n## Technologies Used ⚡\n\n- **C++**: For CPU and memory monitoring logic.\n- **Node.js**: For backend server to serve the logs.\n- **Chart.js**: For visualizing CPU and memory usage as charts.\n- **HTML/CSS**: For the web interface.\n- **JavaScript**: For frontend functionality.\n\n\n## File Structure 🗂️\n\n```plaintext\nCPUMonitoringTool/\n├── backend\n│   ├── logs\n│   ├── node_modules\n│   ├── package-lock.json\n│   ├── package.json\n│   └── server.js\n├── build\n├── data\n│   └── usage_data.txt\n├── frontend\n│   ├── index.html\n│   ├── script.js\n│   └── style.css\n├── logs\n│   └── resource_log.txt\n├── scripts\n│   ├── logs\n│   ├── start.sh\n│   └── stop.sh\n├── src\n│   ├── C++\n│   │   ├── cpu_monitor.cpp\n│   │   ├── cpu_monitor.h\n│   │   ├── logger.cpp\n│   │   ├── logger.h\n│   │   ├── main.cpp\n│   │   ├── memory_monitor.cpp\n│   │   └── memory_monitor.h\n├── LICENSE\n└── README.md\n```\n`This will format your file structure properly in Markdown.`\n\n## Contributing 🤝\n\nWe welcome contributions to improve the project! To contribute:\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature-branch`).\n3. Make your changes and commit (`git commit -am 'Add feature'`).\n4. Push to the branch (`git push origin feature-branch`).\n5. Open a pull request to merge your changes.\n\n## License 📝\n\nThis project is licensed under the `MIT License` - see the LICENSE file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fujjwalkran%2Fcpumonitoringtool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fujjwalkran%2Fcpumonitoringtool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fujjwalkran%2Fcpumonitoringtool/lists"}