{"id":27603153,"url":"https://github.com/parvvaresh/monitor-sys-usage","last_synced_at":"2025-04-22T19:12:05.651Z","repository":{"id":231274674,"uuid":"781335876","full_name":"parvvaresh/Monitor-sys-usage","owner":"parvvaresh","description":"A simple Bash script to monitor CPU, GPU, RAM, and Disk usage every 5 minutes, log the data into a CSV file, and send desktop notifications if usage exceeds 70%.","archived":false,"fork":false,"pushed_at":"2025-03-24T15:51:09.000Z","size":895,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T19:11:57.333Z","etag":null,"topics":["bash-script","cpu-monitoring","gpu-monitoring","monitoring","nvidia"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parvvaresh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-03T07:31:07.000Z","updated_at":"2025-04-04T19:35:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"695870c8-65b0-45f9-80e5-6437777d2e14","html_url":"https://github.com/parvvaresh/Monitor-sys-usage","commit_stats":null,"previous_names":["parvvaresh/download-manager","parvvaresh/monitor-gpu-usage","parvvaresh/monitor-sys-usage"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvvaresh%2FMonitor-sys-usage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvvaresh%2FMonitor-sys-usage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvvaresh%2FMonitor-sys-usage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvvaresh%2FMonitor-sys-usage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parvvaresh","download_url":"https://codeload.github.com/parvvaresh/Monitor-sys-usage/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250306640,"owners_count":21408926,"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":["bash-script","cpu-monitoring","gpu-monitoring","monitoring","nvidia"],"created_at":"2025-04-22T19:12:05.046Z","updated_at":"2025-04-22T19:12:05.646Z","avatar_url":"https://github.com/parvvaresh.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ✅ System Monitor \u0026 Alert Script  \nA simple Bash script to monitor **CPU**, **GPU**, **RAM**, and **Disk** usage every 5 minutes, log the data into a CSV file, and send desktop notifications if usage exceeds 70%.  \n\n---\n\n### 📋 Features:\n- Monitors system metrics:\n  - ✅ CPU usage\n  - ✅ GPU usage (NVIDIA)\n  - ✅ RAM usage\n  - ✅ Root Disk usage\n- Logs all data to a CSV file with timestamps  \n- Sends **local desktop notifications** (via `notify-send`) when usage exceeds 70%  \n- Can be run in a `screen` session for continuous monitoring  \n\n---\n\n### 📁 Output:\nA CSV log file named:\n```\nsystem_usage_log.csv\n```\nWith columns:\n```\nTimestamp, CPU_Usage(%), GPU_Usage(%), RAM_Usage(%), Disk_Usage(%), Alert\n```\n\n---\n\n## ⚙️ Requirements:\n- `mpstat` (part of `sysstat` package)  \n- `nvidia-smi` (for GPU monitoring; available with NVIDIA drivers)  \n- `bc` (basic calculator utility)  \n- `notify-send` (part of `libnotify-bin`)  \n\n### Install requirements:\n```bash\nsudo apt update\nsudo apt install sysstat bc libnotify-bin\n```\n\n---\n\n## 🚀 How to Use:\n1. Clone or download the script.  \n2. Make it executable:\n```bash\nchmod +x system_monitor_notify.sh\n```\n3. (Optional) Start a screen session so it runs in the background:\n```bash\nscreen -S monitor\n```\n4. Run the script:\n```bash\n./system_monitor_notify.sh\n```\n5. Detach from screen (leaves it running in background):\n```\nCtrl + A, then D\n```\n6. Reattach to screen when needed:\n```bash\nscreen -r monitor\n```\n\n---\n\n## ✅ How Notifications Work:\n- If CPU, GPU, RAM, or Disk usage goes above **70%**,  \nyou’ll get a pop-up notification on your system with the metric and current usage.\n\n---\n\n## 💾 Log Example (CSV):\n```\n2025-03-24 12:00:00,45.20,12,60.10,55,None\n2025-03-24 12:05:00,75.80,80,72.30,68,GPU usage above 70%\n```\n\n---\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparvvaresh%2Fmonitor-sys-usage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparvvaresh%2Fmonitor-sys-usage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparvvaresh%2Fmonitor-sys-usage/lists"}