3 # for bug #327288 - $PCP_RC_DIR/pcp blows away $PCP_TMP_DIR/pmlogger entries
5 # Note ... this will be a "sometimes" failure ... requires special
6 # combinations of pids such that sort != sort -n and comm gets confused
9 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
13 echo "QA output created by $seq"
15 # get standard filters
21 trap "$sudo rm -f $tmp.*; exit \$sts" 0 1 2 3 15
22 signal
=$PCP_BINADM_DIR/pmsignal
30 for i
in 1 2 3 4 5 6 7 8
32 for j
in 1 2 3 4 5 6 7 8
34 for k
in 1 2 3 4 5 6 7 8
47 ( echo "this" $this_pid;
48 echo "other" $other_pid;
49 echo "other-fqdn" $otherfqdn_pid; ) \
52 $PCP_ECHO_PROG $PCP_ECHO_N "map file for $tag host""$PCP_ECHO_C"
53 if [ -f $PCP_TMP_DIR/pmlogger
/$pid ]
55 $PCP_ECHO_PROG " present"
57 $PCP_ECHO_PROG $PCP_ECHO_N " missing ... ""$PCP_ECHO_C"
61 $PCP_ECHO_PROG "expected for this host when PMCD killed"
63 $PCP_ECHO_PROG "NOT EXPECTED"
64 echo "pid=$pid, $PCP_TMP_DIR/pmlogger contains"
65 ls -l $PCP_TMP_DIR/pmlogger
66 echo "pmlogger processes ..."
67 ps
$PCP_PS_ALL_FLAGS |
grep pmlogger
68 echo "pmlogger log file for missing one ..."
75 otherhost
=`./getpmcdhosts -L -n 1`
76 [ -z "$otherhost" ] && _notrun
"Cannot find a remote host running pmcd"
77 echo "otherhost=$otherhost" >>$seq.full
78 otherip
=`_host_to_ipaddr $otherhost`
81 echo "Arrgh ... cannot get IP addr for otherhost=$otherhost"
85 echo "otherip=$otherip" >>$seq.full
87 # real QA test starts here
88 _start_up_pmlogger
-L -c /dev
/null
-l $tmp.log1
-s1 $tmp.this
>/dev
/null
2>&1
90 echo "this logger pid=$this_pid" >>$seq.full
91 _wait_for_pmlogger
$this_pid $tmp.log1
92 $sudo mv $tmp.log1
$tmp.
$this_pid
94 trap "$sudo $signal $this_pid $other_pid $otherfqdn_pid >/dev/null 2>&1; wait; $sudo rm -fr $tmp.*; exit \$sts" 0 1 2 3 15
98 _start_up_pmlogger
-h $otherhost -L -c /dev
/null
-l $tmp.log2
-s1 $tmp.other
>/dev
/null
2>&1
100 echo "other host=$otherhost logger pid=$other_pid" >>$seq.full
101 _wait_for_pmlogger
$other_pid $tmp.log2
102 $sudo mv $tmp.log2
$tmp.
$other_pid
106 _start_up_pmlogger
-h $otherip -L -c /dev
/null
-l $tmp.log3
-s1 $tmp.other.fqdn
>/dev
/null
2>&1
108 echo "other fqdnhost=$otherip logger pid=$otherfqdn_pid" >>$seq.full
109 _wait_for_pmlogger
$otherfqdn_pid $tmp.log3
110 $sudo mv $tmp.log3
$tmp.
$otherfqdn_pid
115 $sudo $PCP_RC_DIR/pcp restart | _filter_pcp_start
123 echo "=== this log ===" >>$seq.full
124 cat $tmp.
$this_pid >>$seq.full
128 echo "=== other log ===" >>$seq.full
129 cat $tmp.
$other_pid >>$seq.full
133 echo "=== otherfqdn log ===" >>$seq.full
134 cat $tmp.
$otherfqdn_pid >>$seq.full