#!/bin/sh

#
# This script will collect logs files from todays date only. To execute the command, just type 
# /PATH/grap_vlogs or ./grab_vlogs
#
# All error messages are supressed
# The size of the archive may vary by systems

cd /tmp
LOGS=`hostname`

echo "Creating archive for DVS logs as /tmp/$LOGS.logwatched.tgz"
echo 
find /home/venice/.DVS/logwatched/ -mtime -1 | xargs tar  --exclude="*.zip" -zcf $LOGS.logwatched.tgz  2>/dev/null

echo "Creating archive for DVS logs as /tmp/$LOGS.logs.tgz"
echo 
tar -zcf $LOGS.logs.tgz /var/opt/DVS/logwatched /var/log/messages /etc/opt/DVS/Venice  2>/dev/null

echo "done ..."
ls -lash /tmp/${LOGS}*

