The Hardware Monitoring script on the server-Linux Enterprise Application-Linux server application information. The following is a detailed description. [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 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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service