This project includes Bash scripts to monitor and archive basic system metrics such as CPU usage, memory, disk space, uptime, and load average.
- Collects system metrics:
- CPU usage
- Memory usage
- Disk usage
- System uptime
- Load average
- Saves the output to a timestamped text file in the
reports/directory: /home/ec2-user/Project1/reports/metrics_${TIMESTAMP}.txt ex: /home/ec2-user/Project1/reports/metrics_2025-10-20 16:15:01.txt
- Archives all metric report files for the current day into a compressed
.tar.gzfile in thearchive/directory: /home/ec2-user/Project1/archive/metrics_${TIMESTAMP}.tar.gz ex: /home/ec2-user/Project1/archive/metrics_2025-10-20_15-04-36.tar.gz
crontab -e */15 * * * * * bash /home/ec2-user/Project1/scripts/collect_metrics.sh
59 23 * * * bash /home/ec2-user/Project1/scripts/archive_metrics.sh