sum-svn-w.sh
#! /bin/sh
export LC_ALL=zh_CN.UTF-8
cd /bin2/
sh sum-svn-weekly.sh > sum-svn-weekly.sh.log 2>&1
/usr/bin/mutt -s "scm11-scm12 sum-svn-weekly" scm-svr-mtr@scm5.***.cn < sum-svn-weekly.sh.log
sum-svn-weekly.sh
#!/bin/sh
SRCHOST="scm11-scm12"
echo "***$SRCHOST 磁盘使用情况...***"
du -sh /db8/Deptsvn/
du -sh /db8/isosvn/
du -sh /db8/pd/
du -sh /db8/Projectsvn/
du -sh /db8/Projectsvn2/
du -sh /db8/svn/
du -sh /db8/svn2/
du -sh /db8/svnrepos/
echo .
echo "***各svn库 磁盘使用情况...***"
SAVEIFS=$IFS
IFS="
"
file2=`grep "SVNPath" /etc/httpd/conf.d/svnrepos.conf`
for f in $file2
do
h=`echo ${f##*SVNPath}`
i=`echo ${h##*' '}`
du -sh $i
done
file2=`grep "SVNPath" /etc/httpd/conf.d/isosvn.conf`
for f in $file2
do
h=`echo ${f##*SVNPath}`
i=`echo ${h##*' '}`
du -sh $i
done
file2=`grep "SVNPath" /etc/httpd/conf.d/Deptsvn.conf`
for f in $file2
do
h=`echo ${f##*SVNPath}`
i=`echo ${h##*' '}`
du -sh $i
done
file2=`grep "SVNPath" /etc/httpd/conf.d/pd.conf`
for f in $file2
do
h=`echo ${f##*SVNPath}`
i=`echo ${h##*' '}`
du -sh $i
done
file2=`grep "SVNPath" /etc/httpd/conf.d/svn.conf`
for f in $file2
do
h=`echo ${f##*SVNPath}`
i=`echo ${h##*' '}`
du -sh $i
done
file2=`grep "SVNPath" /etc/httpd/conf.d/svn2.conf`
for f in $file2
do
h=`echo ${f##*SVNPath}`
i=`echo ${h##*' '}`
du -sh $i
done
file2=`grep "SVNPath" /etc/httpd/conf.d/Projectsvn.conf`
for f in $file2
do
h=`echo ${f##*SVNPath}`
i=`echo ${h##*' '}`
du -sh $i
done
file2=`grep "SVNPath" /etc/httpd/conf.d/Projectsvn2.conf`
for f in $file2
do
h=`echo ${f##*SVNPath}`
i=`echo ${h##*' '}`
du -sh $i
done
IFS=$SAVEIFS