A linux Hardware Monitoring script-general Linux technology-Linux technology and application information. For more information, see the following. [Root @ mp3server ~] # Cat simple_disk_check.sh
######################################## ####################################
# Function: Check the disk usage just for a simple disk format server
# Name: simple_disk_check.sh
# Usage: $ simple_disk_check.sh
######################################## ####################################
#! /Bin/bash
For I in 'df-k | awk' {print $5} '| grep ^ [0-9] | awk-F "%"' {print $1 }''
Do
If [$ I-ge 85]
Then
Iconv-f UTF-8-t GB2312/home/dustin/disk_usage>/home/dustin/disk_temp
/Bin/mail-s "Server 201: Disk Usage Attention" mobile phone number @ 139.com, wangzhen@ku888.com Sendmail-q;
Break;
Fi
Done
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.