From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 From: "Konstantin S. Uvarin" To: ALT Linux Community general discussions Date: Thu, 20 Mar 2008 17:31:52 +0300 User-Agent: KMail/1.9.7 References: <200803200753.16330.anatoly.akatyev@master-system.ru> <200803201419.03750.khedin@mail.ru> In-Reply-To: <200803201419.03750.khedin@mail.ru> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_YVn4Hgo96GG1npj" Message-Id: <200803201731.52498.khedin@mail.ru> Subject: Re: [Comm] =?koi8-r?b?S21haWwuIPPF0tjF2s7B0SDCwcfBLiBzaW0=?= X-BeenThere: community@lists.altlinux.org X-Mailman-Version: 2.1.10b3 Precedence: list Reply-To: ALT Linux Community general discussions List-Id: ALT Linux Community general discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Mar 2008 14:27:10 -0000 Archived-At: List-Archive: List-Post: --Boundary-00=_YVn4Hgo96GG1npj Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: base64 Content-Disposition: inline Cj4g7sUg1MHLwdEg1dYg0MzPyMHRIM3Z08zYLCDawdDJyM7V1Ngg08vSydDUINcgY3Jvbi5kYWls eSwgy8/Uz9LZyiDC1cTF1Ao+INPNz9TSxdTYIGRmIMkg0M8g0sXa1czY1MHUwc0g0MnTwdTYINDP zNjaz9fB1MXM0c0g08yj2s7ZxSDQydPYzcEuIAoK98/ULCDOwcvB1MHMINDSz9PUxc7Yy8nKINPL 0snQ1C4g6M/U0Swg0M8tzc/FzdUsIMnIINTBy8nIINDSyc3F0s7PINPUz8zYy88g1sUsIArTy8/M 2MvPIMkgwcTNyc7P1y4gCgruycvBy8nIINfIz8TO2cgg0MHSwc3F1NLP1yDOxSDazsHF1Cwg0NLP 09TPINTV0M8g083P1NLJ1CDX08XIINDPzNjaz9fB1MXMxcog0yAKaWQ+PSRIVU1BTiDJINvMxdQg yc0g0MnT2M3PLCDF08zJINcgycggJEhPTUUgzcXO2NvFICRUSFJFU0gg09fPws/Ezs/HzyDNxdPU wS4gCgotLSAKS29uc3RhbnRpbiBTLiBVdmFyaW4KIkJpcnRoZGF5cyBhcmUgZ29vZCBmb3IgeW91 OiB0aGUgbW9yZSB5b3UgaGF2ZSwgdGhlIGxvbmdlciB5b3UgbGl2ZSAiCg== --Boundary-00=_YVn4Hgo96GG1npj Content-Type: application/x-shellscript; name="fsmon.sh" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fsmon.sh" #!/bin/sh # user id's of real, not system, users HUMAN=500 # threshold THRESH=300000 # user:*:id:*:*:homedir:... # 1 3 6 cat /etc/passwd |\ while read i; do id=`echo $i | cut -d: -f3` # skip system users [ "$id" -lt "$HUMAN" ] && continue; home=`echo $i | cut -d: -f6` free=`/bin/df $home | awk '{ print $4 }' | egrep -o '[0-9]+'` [ "$free" -lt "$THRESH" ] || continue; echo "Please check you files" |\ mail -s "[Warning] Alailable disk space below $THRESH" `echo $i | cut -d: -f1` done --Boundary-00=_YVn4Hgo96GG1npj--