Samba 3: added Samba 3.0.24 sources
[tomato.git] / release / src / router / samba3 / examples / scripts / debugging / solaris / solaris-oops.sh
blob82c49efdf62b4c7008b7cc9d96b0a8f5977c9612
1 #!/bin/sh
3 # solaris_panic_action -- capture supporting information after a failure
5 ProgName=`basename $0`
6 LOGDIR=/usr/local/samba/var
8 main() {
9 pid=$1
11 if [ $# -lt 1 ]; then
12 say "$ProgName error: you must supply a pid"
13 say "Usage: $0 pid"
14 exit 1
16 cat >>$LOGDIR/log.solaris_panic_action <<!
18 `date`
19 State information and vountary core dump for process $pid
21 Related processes were:
22 `/usr/bin/ptree $pid`
24 Stack(s) were:
25 `/usr/bin/pstack $pid`
27 Flags were:
28 `/usr/bin/pflags $pid`
30 Credentials were:
31 `/usr/bin/pcred $pid`
33 Libraries used were:
34 `/usr/bin/pldd $pid`
36 Signal-handler settings were:
37 `/usr/bin/psig $pid`
39 Files and devices in use were:
40 `/usr/bin/pfiles $pid`
42 Directory in use was:
43 `/usr/bin/pwdx $pid`
46 A voluntary core dump was placed in /var/tmp/samba_solaris_panic_action_gcore.$pid
47 `gcore -o /var/tmp/samba_solaris_panic_action_gcore $pid`
51 say() {
52 echo "$@" 1>&2
55 main "$@"