A comprehensive Bash script for monitoring and analyzing server performance metrics in real-time.
This script provides system administrators and DevOps engineers with detailed insights into server performance and security metrics. It aggregates various system statistics into a single, easy-to-read output.
-
System Information
- OS Version
- System Uptime
- Load Average
- Current Date and Time
-
Resource Monitoring
- CPU Usage Statistics
- Memory Utilization
- Disk Space Analysis
- Top 5 Resource-Intensive Processes
-
Security Metrics
- Active User Sessions
- Failed Login Attempts
- Authentication Log Analysis
- Clone the repository:
git clone https://github.com/kaalpanikh/server-stats.git
- Navigate to the project directory:
cd server-stats
- Make the script executable:
chmod +x ./server-stats.sh
Run the script with:
./server-stats.sh
- Linux-based operating system
- Bash shell (version 4.0 or higher)
- Root/sudo access for certain metrics
=== Current Date ===
Saturday, February 01, 2025, 02 PM IST
=== CPU Usage ===
Total CPU Usage: 45%
=== Memory Usage ===
Total Memory: 16384MB
Used Memory: 8192MB
Memory Usage: 50%
For more information about server monitoring and best practices, visit roadmap.sh/projects/server-stats