Linux Today: Linux News On Internet Time.

Linuxphile: Shell Script to Monitor Disk Usage

Apr 27, 2006, 08:30 (1 Talkback[s])
(Other stories by Daniel McCarthy)

[ Thanks to Daniel McCarthy for this link. ]

"Working as the TechGuy administrator I needed to create a shell script that would monitor disk usage. Doing this required several tweaks and learning the nuances of several shell commands. Below is the end result of this work. The script uses a combination of awk, egrep, cat, cut and mail commands.

"The script is written to use a temporary file, temp.txt to store the messages when disk usage is above the limit I have set to monitor with the variable $error..."

Complete Story

Related Stories: