1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-27 07:42:04 +03:00
Files
samba-mirror/examples/scripts/debugging/solaris/solaris-oops.sh
Andreas Schneider 3990c33efe examples: Reformat shell scripts
shfmt -f examples/ | xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Feb 22 16:20:58 UTC 2022 on sn-devel-184
2022-02-22 16:20:58 +00:00

58 lines
925 B
Bash

#!/bin/sh
#
# solaris_panic_action -- capture supporting information after a failure
#
ProgName=$(basename $0)
LOGDIR=/usr/local/samba/var
main()
{
pid=$1
if [ $# -lt 1 ]; then
say "$ProgName error: you must supply a pid"
say "Usage: $0 pid"
exit 1
fi
cat >>$LOGDIR/log.solaris_panic_action <<!
$(date)
State information and vountary core dump for process $pid
Related processes were:
$(/usr/bin/ptree $pid)
Stack(s) were:
$(/usr/bin/pstack $pid)
Flags were:
$(/usr/bin/pflags $pid)
Credentials were:
$(/usr/bin/pcred $pid)
Libraries used were:
$(/usr/bin/pldd $pid)
Signal-handler settings were:
$(/usr/bin/psig $pid)
Files and devices in use were:
$(/usr/bin/pfiles $pid)
Directory in use was:
$(/usr/bin/pwdx $pid)
A voluntary core dump was placed in /var/tmp/samba_solaris_panic_action_gcore.$pid
$(gcore -o /var/tmp/samba_solaris_panic_action_gcore $pid)
!
}
say()
{
echo "$@" 1>&2
}
main "$@"