Skip to content

ilhandemirel/Linux-System-Health-Monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Simple Linux System Health Monitor Script

This project is a lightweight Bash script designed to provide a quick "health check" of a Linux server. It was created to practice essential Linux administration skills, such as reading system metrics and automating monitoring tasks, which are fundamental for any Cloud/DevOps role.

Description & Purpose

The script provides a high-level report on three critical areas of the server:

  1. Disk Usage: Checks the usage percentage of the root (/) filesystem.
  2. RAM Usage: Checks the amount of free (available) memory in Megabytes.
  3. Service Status: Checks if a specific, user-defined service (e.g., nginx) is actively running.

It compares these metrics against predefined thresholds and reports an [OK], [UYARI!] (Warning), or [KRİTİK!] (Critical) status for each.

How to Use

  1. (Optional) Open the health_check.sh script and change the variables in the --- Configuration --- section (like DISK_THRESHOLD, RAM_THRESHOLD, SERVICE_NAME) to match your needs.
  2. Make the script executable:
    chmod +x health_check.sh
  3. Run the script:
    ./health_check.sh

Technologies & Commands Used

  • Bash Scripting (Variables, if/else logic)
  • Linux Core Utilities: date, echo
  • System Monitoring Commands:
    • df (to check disk usage)
    • free (to check RAM usage)
    • systemctl (to check service status)
  • Text Processing: awk, sed (to parse command outputs and extract specific values)

About

A simple Bash script to monitor Linux system health (Disk Usage, RAM Usage, and Service Status).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages