Process Watch is a lightweight Bash utility that checks whether a specified process is currently running on a Linux system.
Developed as a practical Linux administration project, it demonstrates process inspection, exit status handling, and Bash scripting techniques commonly used in system monitoring and automation.
- 🔍 Check if a process is running
- ⚡ Fast and lightweight
- 🐧 Compatible with most Linux distributions
- 📜 Returns standard Linux exit codes
- 🔧 Easily integrated into larger monitoring scripts
- ⏰ Suitable for scheduled execution using cron
process_watch/
├── process_watch.sh
└── README.md
Clone the repository:
git clone https://github.com/Kachinonye/process_watch.gitMove into the project directory:
cd process_watchMake the script executable:
chmod +x process_watch.shCheck whether a process is running:
./process_watch.sh sshdExample output:
✔ Process "sshd" is running.
or
✖ Process "apache2" is not running.
The script follows standard Linux conventions:
| Exit Code | Meaning |
|---|---|
| 0 | Process is running |
| 1 | Process is not running |
This makes it easy to integrate into monitoring systems and automation workflows.
- Linux System Administration
- Bash Shell Scripting
- Process Management
- Exit Status Handling
- Automation
- Linux Monitoring
- Technical Documentation
Useful for:
- Linux System Administrators
- DevOps Engineers
- Monitoring Scripts
- Cron Jobs
- Service Health Checks
- Learning Bash Scripting
Planned improvements include:
- Monitor multiple processes
- Automatic logging
- Email notifications
- Auto-restart integration
- Service status reporting
- Colored terminal output
Kachinonye Nmezi
Junior Linux Administrator | Bash Scripting & Automation Specialist
GitHub: https://github.com/Kachinonye
Licensed under the MIT License.