blob: 3c35fafcce77b4cae2dd8caaf93d829d7900372d (
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
#!/bin/sh
#
# remake the big1 archive.
# Needs a lot of disk space, so is guarded by df check ... output
# archive is used by multiple tests. If return code is non-zero,
# then output is suitable for a notrun message.
#
# Copyright (c) 2012 Red Hat.
# Copyright (c) 2011 Ken McDonell. All Rights Reserved.
#
[ -f ../common.rc ] && cd .. # from src directory
. ./common.rc # for $sudo, $tmp, $here and pcp.env
. ./common.check
# cleanup any archives in the old location (not src)
$sudo rm -f big1.*
# don't recreate the archive unless we really have to
[ -s src/big1.0 -a -s src/big1.1 -a -s src/big1.index -a -s src/big1.meta ] && exit 0
# 10GB should keep us out of trouble
free=`_check_freespace 10240`
if [ -n "$free" ]
then
echo $free
exit 1
fi
status=1
iam=mkbig1
$sudo rm -rf $tmp.*
trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
_cleanup()
{
if [ ! -f $tmp.done ]
then
cd $here/pmdas/bigun
$sudo ./Remove >>$here/src/$iam.log
cd $here
touch $tmp.done
fi
}
cd $here/pmdas/bigun
make >$here/src/$iam.log 2>&1
$sudo ./Install </dev/null >>$here/src/$iam.log
if [ $? != 0 ]
then
echo "bigun pmda Install failed ... see $here/src/$iam.log"
exit
fi
if pmprobe bigun 2>&1 | tee -a $here/src/$iam.log | grep ' [0-9]$'
then
:
else
echo "bigun pmda Install failed ... see $here/src/$iam.log"
exit
fi
cd $here
cat <<End-of-File >$tmp.config
log mandatory on default {
bigun
sample.hordes
}
End-of-File
$sudo rm -f big1.*
pmlogger -r -c $tmp.config -l $tmp.out -t 10msec -s 2049 src/big1
echo >>$here/src/$iam.log
cat $tmp.out >>$here/src/$iam.log
echo >>$here/src/$iam.log
ls -l src/big1.* >>$here/src/$iam.log
status=0
exit
|