mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00

This is so that people working from the current stable version can still start using git.
60 lines
848 B
Bash
Executable file
60 lines
848 B
Bash
Executable file
#! /usr/bin/env bash
|
|
#
|
|
# $Id: crash-diag.in 6811 2009-07-06 20:41:10Z robin $
|
|
#
|
|
# crash-diag <cwd>
|
|
|
|
(
|
|
|
|
cd $1
|
|
|
|
if [ -e stderr.log ]; then
|
|
echo ==== stderr.log
|
|
tail -30 stderr.log
|
|
else
|
|
echo ==== No stderr.log.
|
|
fi
|
|
|
|
if [ -e stdout.log ]; then
|
|
echo ==== stdout.log
|
|
tail -30 stdout.log
|
|
else
|
|
echo ==== No stdout.log.
|
|
fi
|
|
|
|
echo
|
|
|
|
if [ -e .status ]; then
|
|
echo ==== .status
|
|
tail -30 .status
|
|
else
|
|
echo ==== No .status.
|
|
fi
|
|
|
|
echo
|
|
|
|
if [ -e prof.log ]; then
|
|
echo ==== prof.log
|
|
tail -30 prof.log
|
|
else
|
|
echo ==== No prof.log.
|
|
fi
|
|
|
|
echo
|
|
|
|
core=`ls -t *core* 2>&1`
|
|
|
|
if which gdb >/dev/null 2>&1; then
|
|
for c in $core; do
|
|
if [ -e $c ]; then
|
|
echo $c
|
|
echo "bt" | gdb --batch -x /dev/stdin ${bro} $c
|
|
fi
|
|
done
|
|
else
|
|
echo "No gdb installed."
|
|
fi
|
|
|
|
) >.crash-diag.log
|
|
|
|
cat .crash-diag.log
|