While learning Linux system administration, I wanted a lightweight tool that mirrors what I actually check when supporting or troubleshooting a Linux system. CPU usage, memory, disk space, running processes and whether or not anything critical is showing up in the logs.
Not something complicated or over-engineered.
Just fast, short and sweet, directly in the terminal.
So I built VitaGuard, a real-time system health monitor written entirely in Bash.
What the script does
VitaGuard provides a continuously updating overview of system health:
Resource usage
- CPU usage with visual progress bars
- Memory usage (used vs total)
- Disk usage for the root filesystem
- Automatic warnings for high usage thresholds
System information
- System uptime and load average
- Active network interfaces
Processes
- Top 5 processes by CPU usage
- Clean, readable table output
Logs
Scans recent system logs for critical issues
Filters for errors such as:
- kernel issues
- failed services
- OOM events
- Reduces common log noise and limits output to the most recent entries
Services
Checks the status of common services:
- Sshd
- Docker
- Nginx
All of this runs in an auto refreshing loop, updating every 5 seconds until you exit.
Why I built it
I built VitaGuard to practice Linux administration fundamentals, not just scripting syntax.
Things I specifically wanted to work on:
- Turning raw system metrics into a readable output
- Building visual progress bars and color-based alerts
- Filtering noisy logs to surface useful signals
- Writing Bash that's structured, readable and most importantly safe
- Creating something practical that can be dropped onto a server and be used immediately
This is the kind of script I'd want to have available when I SSH into a VPS or troubleshooting a system under load.
Challenges & Fixes
- Colors weren't showing up on the progress bars at first. Fixed it by using
printf "%b"to make the escape codes work. - Syslog was dumping a ton of random noise. Added some
grep -vfilters to remove junk like "workqueue" and "drm". - The top processes table looked messy initially. Used
awkwith fixed widths to align everything nicely.
What I learned
- How to pull system info (CPU, memory, disk) from commands like
top, free, and df and cleanit up withawk. - Using color codes in the terminal to make warnings stand out (green for good, red for bad).
- Writing Bash scripts that don't break easily, adding checks, handling empty results and keeping it readable.
What's next
Planned improvements for VitaGuard:
- Configurable refresh interval
- Optional non-interactive / one-shot mode
- Improved compatibility across Linux distributions
- Optional HTML/JS dashboard for remote monitoring
Source code
The full script is available on GitHub:
N4V1CKAS
/
VitaGuard
VitaGuard is a lightweight Bash-based system health monitor that provides real-time insights into CPU, memory, disk usage, processes, logs, network interfaces and service status on Linux systems.
π‘οΈ VitaGuard
Quickly monitor your Linux server's vital signs straight from the terminal
π οΈ Technologies
- Bash scripting
- Core Linux tools:
top, free, df, ps, grep, awk, tail
π Features
- Real-time updates (refreshes every 5 seconds)
- Color-coded progress bars for CPU, memory, disk
- Uptime and load average
- Top 5 processes by CPU usage (clean table)
- Recent critical errors from syslog (filtered, max 3 lines)
- Awesome ASCII art header
π‘ Why I built it
This script was created to practice my Linux administration and Bash scripting skills:
- Creating visual progress bars and color alerts
- Filtering log noise for useful error reporting
- Making something truly practical that anyone can pick up and run with ease
π How it works
The script runs in an infinite loop that:
- Clears the terminal screen
- Collects system metrics using standard Linux utilities
- Renders color-coded progress bars and warnings
- Displays process, log and service information
- Sleeps for 5β¦

Top comments (0)