#!/bin/ash
#
# This script prints system log  for engineering to debug a problem.

. /usr/local/bin/sig_catcher

tail -n 36 /tmp/splog_collect_timestamp

cmd="cat /var/log/messages.1 /var/log/messages 2>/dev/null | tail -c 65536 "
echo $cmd 
echo ========================================================
eval $cmd

cmd="cat /var/log/debug.1 /var/log/debug | tail -c 65536 "
echo $cmd 
echo ========================================================
eval $cmd

cmd="cat /var/log/authlog.1 /var/log/authlog | tail -c 20480 "
echo $cmd 
echo ========================================================
eval $cmd

cmd="cat /var/log/environ.1 /var/log/environ | tail -c 32768 "
echo $cmd
echo ========================================================
eval $cmd

exit 0
