#!/bin/bash
# /usr/lib/supportconfig/plugins/cat_vcslogs
# Version: 2013-05-08

PLUG="cat_vcslogs"
CONF="/etc/ClusterTools2/supportconfig_plugins"
LOGA="/var/VRTSvcs/log/engine_A.log"
LOGS="/var/VRTSvcs/log/*"
VCOR="/var/VRTSvcs/diag/"
LCOR="/var/crash/"

grep "^${PLUG}$" $CONF >/dev/null || exit 0 
echo "### $LOGA ###"
test -r $LOGA && cat $LOGA
echo "### ${LOGS} ###"
grep "ERROR.*engine" $LOGS 2>/dev/null
echo "### VRT core files ###"
find $VCOR -name "core" -exec ls -l {} \;
echo "### Linux core files ###"
find $LCOR -name "vmcore*" -exec ls -l {} \;
echo "Completed"
#
