Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1980480
  • 博文数量: 148
  • 博客积分: 7697
  • 博客等级: 少将
  • 技术积分: 3071
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-10 23:04
个人简介

MiBDP,数据开发、项目团队、数据应用和产品在路上,金融保险、互联网网游、电商、新零售行业、大数据和AI在路上。对数仓、模型、ETL、数据产品应用了解。DTCC 2013演讲嘉宾,曾做过两款大获好评的数据产品平台。知识星球ID:35863277

文章分类
文章存档

2020年(1)

2019年(2)

2017年(2)

2016年(5)

2015年(1)

2014年(1)

2013年(6)

2012年(5)

2011年(24)

2010年(28)

2009年(1)

2008年(6)

2007年(30)

2006年(36)

分类:

2010-09-26 18:07:06



#/bin/sh

#this shell script is used to check the disk's use

#author colin

#file check_df.sh

#date 2010-09-06

home_base=/home/oracle/shell
check_dir=${home_base}/check
check_file=${check_dir}/check_file.txt
check_point=93
cd ${home_base}
if [ ! -d ${check_dir} ]
then
    mkdir -p ${check_dir}
fi

df_use=`df -lh|grep opt|awk '{print substr($5,1,2)}'`

while [ ${df_use} -lt ${check_point} ]
do
echo "the disk is free at" >${check_file}
date +"%Y-%m-%d %H:%M:%S" >>${check_file}
sleep 60m
df_use=`df -lh|grep opt|awk '{print substr($5,1,2)}'`
done
  df -lh|grep opt>${check_file}
  mail -s "disk alert" songyunkui@kingsoft.com <${check_file}


阅读(3603) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-09-29 20:03:14

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com