This question already has an answer here:
I run my python scripts and Scrapy framework for web scraping project on my Ubuntu 12.04 precise server. These scripts run whole day.
This project is under developing/testing stage. So i dont know what will be the system requirement of this project.
I started it with 512MB RAM and 30GB Hard Disk. The system crashed because of less hard disk space. so once again i have to setup the server and restarted my project with 512MB RAM and 100GB Hard Disk.
Again the system crashed because of less RAM/SWAP size.
Is there a way to apply checks on RAM, Hard Disk ?
So that before
server crash it will kill all the programs and send me mail that all programs are killed because of less space increase your RAM/HARD DISK size.
I am looking for a shell script which is handled by cronjob running in every minute to check whether disk is full.