Skip to content

ragibcs/syswatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Syswatch — CLI System Resource Monitoring Dashboard

A modular system monitor based on Bash that shows a live terminal dashboard with bars for CPU, RAM, and disk usage, the top processes, threshold alerts, logging, and reporting when the system shuts down.

Entrypoint: syswatch.sh

Table of contents

Features

  • A live, refreshing dashboard with colored progress bars that shows CPU, RAM, disk, and top processes
  • Alerts based on thresholds (CPU/RAM/disk) with the option to get desktop notifications through "notify-send"
  • Logging that lasts and cleanup of old logs
  • Graceful "Ctrl+C": makes a report before quitting
  • Modes:- --once to take just one picture
    • "report" to make a report from existing logs and leave

Requirements

  • Bash (uses source, [[ ]], and (( )))
  • Common tools: awk, df, find, hostname, nproc, ps, sleep, uptime, and date- Not required:
  • "tput" (better at finding the width of the terminal)
  • "notify-send" (alerts on the desktop)

Install

Make scripts executable:

chmod +x syswatch.sh alerts/*.sh logger/*.sh modules/*.sh reports/*.sh utils/*.sh

Usage

Run the live dashboard:

./syswatch.sh

Single snapshot (no loop):

./syswatch.sh --once

Custom refresh interval (seconds):

./syswatch.sh --interval 10

Generate a report from existing logs and exit:

./syswatch.sh --report

Help:

./syswatch.sh --help

Configuration

Edit config/thresholds.conf:

  • CPU_THRESHOLD (default 80)
  • RAM_THRESHOLD (default 75)
  • DISK_THRESHOLD (default 90)
  • MONITOR_INTERVAL (default 5)
  • LOG_RETENTION_DAYS (default 7)
  • ENABLE_NOTIFY (1 enables notify-send if available)

Logging & reports

Logs/ is where the runtime outputs are written:

  • The metrics log is in logs/syswatch.log (appended).- Reports: logs/reports/report_YYYYMMDD_HHMMSS.txt (made with --report or Ctrl+C)

Project structure

syswatch/
├── syswatch.sh
├── README.md
├── LICENSE
├── config/
│   └── thresholds.conf
├── modules/
│   ├── cpu_monitor.sh
│   ├── ram_monitor.sh
│   ├── disk_monitor.sh
│   └── process_monitor.sh
├── alerts/
│   └── alert_engine.sh
├── logger/
│   └── logger.sh
├── reports/
│   └── report_gen.sh
└── utils/
    ├── colors.sh
    └── helpers.sh

License

GNU GPLv3 — see LICENSE.

Author

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages