sum-svn-w.sh
1#! /bin/sh 2export LC_ALL=zh_CN.UTF-8 3cd /bin2/ 4sh sum-svn-weekly.sh > sum-svn-weekly.sh.log 2>&1 5 6/usr/bin/mutt -s "scm11-scm12 sum-svn-weekly" scm-svr-mtr@scm5.***.cn < sum-svn-weekly.sh.log
sum-svn-weekly.sh
1#!/bin/sh 2SRCHOST="scm11-scm12" 3echo "***$SRCHOST 磁盘使用情况...***" 4du -sh /db8/Deptsvn/ 5du -sh /db8/isosvn/ 6du -sh /db8/pd/ 7du -sh /db8/Projectsvn/ 8du -sh /db8/Projectsvn2/ 9du -sh /db8/svn/ 10du -sh /db8/svn2/ 11du -sh /db8/svnrepos/ 12echo . 13echo "***各svn库 磁盘使用情况...***" 14 15SAVEIFS=$IFS 16IFS=" 17" 18 19file2=`grep "SVNPath" /etc/httpd/conf.d/svnrepos.conf` 20for f in $file2 21do 22h=`echo ${f##*SVNPath}` 23i=`echo ${h##*' '}` 24du -sh $i 25done 26 27file2=`grep "SVNPath" /etc/httpd/conf.d/isosvn.conf` 28for f in $file2 29do 30h=`echo ${f##*SVNPath}` 31i=`echo ${h##*' '}` 32du -sh $i 33done 34 35file2=`grep "SVNPath" /etc/httpd/conf.d/Deptsvn.conf` 36for f in $file2 37do 38h=`echo ${f##*SVNPath}` 39i=`echo ${h##*' '}` 40du -sh $i 41done 42 43file2=`grep "SVNPath" /etc/httpd/conf.d/pd.conf` 44for f in $file2 45do 46h=`echo ${f##*SVNPath}` 47i=`echo ${h##*' '}` 48du -sh $i 49done 50 51file2=`grep "SVNPath" /etc/httpd/conf.d/svn.conf` 52for f in $file2 53do 54h=`echo ${f##*SVNPath}` 55i=`echo ${h##*' '}` 56du -sh $i 57done 58 59file2=`grep "SVNPath" /etc/httpd/conf.d/svn2.conf` 60for f in $file2 61do 62h=`echo ${f##*SVNPath}` 63i=`echo ${h##*' '}` 64du -sh $i 65done 66 67file2=`grep "SVNPath" /etc/httpd/conf.d/Projectsvn.conf` 68for f in $file2 69do 70h=`echo ${f##*SVNPath}` 71i=`echo ${h##*' '}` 72du -sh $i 73done 74 75file2=`grep "SVNPath" /etc/httpd/conf.d/Projectsvn2.conf` 76for f in $file2 77do 78h=`echo ${f##*SVNPath}` 79i=`echo ${h##*' '}` 80du -sh $i 81done 82 83IFS=$SAVEIFS