Using the df command, check the percentage of each filesystem used. If the percentage is above a given amount (set as a variable in the script), then email a user variable (again defined as a variable in the script). I would recommend that you set the alert percentage pretty low, like 20% or so such that you can make sure the script is working and set the email account variable to root. You also will want to create a list of filesystems in a script variable that should be excluded from examination including floppy, proc and cdrom.
How can I do this with an if and then statement?
Aucun commentaire:
Enregistrer un commentaire