Login

Statistici

Membri: 150
Stiri: 729
Linkuri: 20
Vizitatori: 1265388

We support LinTube

Arata-ti suportul

Citesti stirile pe MYLRo.org? Ai un site? Pune un link catre noi.

 
Anunta-ma daca spatiul pe disk este plin E-mail
  • Currently 3.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Rating: 3.0/5 (2 votes cast)

Scris de Cypress   
Saturday, 15 December 2007
#!/bin/sh
# Shell script to monitor or watch the disk space
# It will send an email to $ADMIN, if the (free avilable) percentage 
# of space is >= 90% 
ADMIN="
 Aceasta adresa e-mail este protejata impotriva spamului, JavaScript trebuie activat pentru a putea vizualiza pagina.
 "
# set alert level 90% is default
ALERT=90
df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output;
do
#echo $output
usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1  )
partition=$(echo $output | awk '{ print $2 }' )
if [ $usep -ge $ALERT ]; then
echo "Running out of space \"$partition ($usep%)\" on $(hostname) as on $(date)" | 
mail -s "Alert: Almost out of disk space $usep" $ADMIN
fi
done
Comments
Add NewSearchRSS
Only registered users can write comments!

Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved.


 

Ultimele comentarii

Softul saptamanii

WINE 1.0 RC1

Tips & Tricks

Verifica nivelul de fragmentare al fisierelor pe sisteme EXT3
Pe parcursul timpului, si sistemele Linux sufera de fragmentarea fisierelor. Pentru a verifica nivelul in care este fragmentat un anume fisier, foloseste

filefrag -v nume_fisier
 

Vizitatori Online

Avem 1 vizitator online