blob: fa0e1b89d161a8008c2aa6a7e00179cae4364161 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
#! /bin/sh
# PCP QA Test No. 000
# check how many processes we have running and their arguments
#
# Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
#
seq=`basename $0`
echo "QA output created by $seq"
# get standard filters
. ./common.product
. ./common.filter
trap "rm -f $tmp.*; exit" 0 1 2 3 15
# check PMCS processes
rm -f $tmp.err
# pmdaoracle is optional, so skip it and other optional ones
ps $PCP_PS_ALL_FLAGS \
| _filter_optional_pmdas \
| sed \
-e '/dbpmda/d' \
-e '/<defunct>/d' \
| $PCP_AWK_PROG '
$7 == "TIME" || $10 == "TIME" { next }
{ want = 0
psargs = 0
for (i = 12; i >= 7; i--) {
# most ps variants have TIME as N:NN
if ($i ~ /[0-9]:[0-9][0-9]$/) {
psargs=i+1
break
}
# darwin ps has TIME as N:NN.NN
if ($i ~ /[0-9]:[0-9][0-9]\.[0-9][0-9]$/) {
psargs=i+1
break
}
}
if (psargs == 0) {
print "Error: cannot find psargs in this ps line" >"'$tmp.err'"
print $0 >"'$tmp.err'"
next
}
}
$psargs ~ /pmcd/ { want = 1 }
$psargs ~ /pmda/ { want = 1 }
want == 1 { print $psargs }' \
| sed \
-e 's;.*/\([^/]*\);\1;' \
| LC_COLLATE=POSIX sort
if [ -s $tmp.err ]
then
echo
echo "Warnings ..."
cat $tmp.err
fi
|