3 # exercise new action args (no limit of 2) for pmie ... caused
4 # pmie to dump core initially
6 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 # Solaris Note (OpenIndiana specifically)
11 # Need to edit /etc/syslog.conf and add these lines
13 # daemon.info /var/log/syslog
15 # then kill -HUP <pid-for-syslogd>
19 echo "QA output created by $seq"
21 # get standard environment, filters and checks
30 ln $seq.
$PCP_PLATFORM $seq.out ||
exit 1
31 SYSLOG_OPT
='"-p daemon.info"'
34 ln $seq.linux
$seq.out ||
exit 1
38 ln $seq.linux
$seq.out ||
exit 1
39 SYSLOG_OPT
='"-p daemon.info"'
42 _notrun
"Need qualified output for $PCP_PLATFORM"
48 # other syslog timestamp variants ...
49 # 2014-09-15T10:44:40.269104+10:00
51 -e 's/[A-Z][a-z][a-z] [A-Z][a-z][a-z] *[0-9][0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9]/TIMESTAMP/' \
52 -e 's/[A-Z][a-z][a-z] *[0-9][0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9]/TIMESTAMP/' \
53 -e 's/20[0-9][0-9]-[01][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9]:[0-5][0-9]\.[0-9]*/TIMESTAMP/' \
54 -e 's/STAMP[-+][0-1][0-9]:[0-5][0-9]/STAMP/' \
55 -e "s/`hostname`/HOST/" \
56 -e "s/`hostname | sed -e 's/\..*//'`/HOST/" \
57 -e 's/[0-9][A-Z]:HOST/HOST/' \
58 -e 's/\(pmie[([]\)[0-9][0-9]*/\1PID/' \
59 -e 's/ \[ID [0-9][0-9]* daemon.info]//'
62 status
=0 # success is the default!
63 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
65 PMCD_CONNECT_TIMEOUT
=60
66 PMCD_REQUEST_TIMEOUT
=60
67 export PMCD_CONNECT_TIMEOUT PMCD_REQUEST_TIMEOUT
69 eval `./getpmcdhosts -n 2 -L | sed -e 's/ / other2=/' -e 's/^/other1=/'`
72 _notrun
"Cannot find first remote host running pmcd"
76 _notrun
"Cannot find second remote host running pmcd"
79 echo "other1=$other1" >>$here/$seq.full
80 echo "other2=$other2" >>$here/$seq.full
82 # real QA test starts here
83 $sudo rm -f core
* $seq.core
*
85 cat <<End-of-File | pmie -T 10sec >$tmp.out 2>$tmp.err
86 // use hosts not in QA circus
89 hosts = ":'$other1' :'$other2'";
93 ( 100 * filesys.used \$hosts / filesys.capacity \$hosts ) > 0 ) )
94 -> shell 15 "src/show-args -c SYSMON -t PERF_INFO_SYSTEM -m 'file system over half-full" "\n%h:[%i] %v% " "'"
95 & syslog 15 $SYSLOG_OPT "PCP QA $seq - please ignore - ..." " %h:[%i] %v% ";
99 # hostnames $other1 and $other2 may contain domain name components,
100 # but pmie may just report the hostname
102 o1
=`echo $other1 | sed -e 's/\..*//'`
103 o2
=`echo $other2 | sed -e 's/\..*//'`
104 echo "pmie output ..."
111 egrep "^($other1|$o1):" <$tmp.out
>/dev
/null
&& echo "... at least one line for other1 host"
112 egrep "^($other2|$o2)*:" <$tmp.out
>/dev
/null
&& echo "... at least one line for other2 host"
115 echo "pmie stderr ..."
118 # may be using journalctl, and so no syslog in the file system
120 if `which journalctl >/dev/null 2>&1`
122 echo "Using journalctl ..." >>$seq.full
125 have_journalctl
=false
127 for f
in /var
/adm
/SYSLOG
/var
/log
/daemon.log
/var
/log
/messages
/var
/log
/syslog
/var
/log
/system.log
137 echo "Arrgh! Cannot find your syslog file"
147 # be careful ... --boot not supported in all versions, -l not
148 # supported in all versions
149 $sudo journalctl
-b --full |
tail -100 >$tmp.syslog
151 $sudo tail -100 $SYSLOG >$tmp.syslog
154 sed <$tmp.syslog
-n '/PCP QA '"$seq"' - please ignore/s/\.\.\..*/.../p' \
161 echo "=== tail journalctl -b --full ===" >>$seq.full
163 echo "=== tail SYSLOG ($SYSLOG) ===" >>$seq.full
165 echo "`wc -l <$tmp.syslog | sed -e 's/ //g'` lines ... expect 100" >>$seq.full
166 cat $tmp.syslog
>>$seq.full