Difference between revisions of "MLM logcheck script"
From cpwiki.net

(Created page with "This is a simple logcheck script to identify logs older that 20 days. The output can be piped to a script for compression. #!/bin/sh # source $CPDIR/tmp/.CPprofile.sh RE...") |
Latest revision as of 22:13, 27 March 2013
This is a simple logcheck script to identify logs older that 20 days. The output can be piped to a script for compression.
#!/bin/sh
#
source $CPDIR/tmp/.CPprofile.sh
RETENTION=20
CPSUITE_DIR=`echo $MDS_TEMPLATE | awk -F "/" '{print $3}'`
#
mdsenv
mcd customers
for CLM in *
do
find $CLM/$CPSUITE_DIR/fw1/log/*.log -mtime +$RETENTION | grep -v fwui.log
done