3 # validate ipc.shm metric values
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard filters
18 echo "Missing some ipc/shm/sem metrics on PCP_PLATFORM $PCP_PLATFORM" >$seq.notrun
19 echo "$seq: [not run] `cat $seq.notrun`"
24 trap "rm -f $tmp.*; exit 0" 0 1 2 3 15
26 # blow away any residual junk
30 # real QA test starts here
32 # assumed output format from ipcs -am
33 #IPC status from /dev/kmem as of Wed Mar 26 12:23:47 1997
34 #T ID KEY MODE OWNER GROUP CREATOR CGROUP NATTCH SEGSZ CPID LPID ATIME DTIME CTIME
36 #m 9 0x09e4218f --rw-r----- oracle dba oracle dba 2351167232 6159 15032 12:03:49 12:06:18 15:47:42
38 # build the sed filter from the heading line of the output
40 $sudo ipcs
-am >$tmp.out
41 sed -n <$tmp.out
>$tmp.
sed -e '/NATTCH/{
46 s/\(SEGSZ\).*/\1\\).*/
53 echo 's/ */ /g' >>$tmp.
sed
54 echo 's/^ //' >>$tmp.
sed
55 echo 's/ $//' >>$tmp.
sed
59 | LC_COLLATE
=POSIX
sort >$tmp.ipc
61 pminfo
-F ipc.shm.nattch \
67 | LC_COLLATE
=POSIX
sort >$tmp.1
69 pminfo
-F ipc.shm.segsz \
75 | LC_COLLATE
=POSIX
sort >$tmp.2
77 LC_COLLATE
=POSIX
join $tmp.1 $tmp.2 >$tmp.pcp
79 if diff $tmp.pcp
$tmp.ipc
81 echo "ipc.shm and ipcs agree"
83 echo "=== ipcs -am ==="
85 echo "=== summary ==="
87 echo "=== pminfo -F ==="
88 pminfo
-F ipc.shm.nattch ipc.shm.segsz
89 echo "=== summary ==="
91 echo "Mismatch error: summaries should be identical"