summaryrefslogtreecommitdiff
path: root/qa/src/mkinterpmark
blob: fd9d034fb8a67efae85cf8784e29b2f922050f8e (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#!/bin/sh
#
# Recipe to recreate the interpmark archive
#
# Final archive is
#	section-a
#	<mark>
#	section-b
#	<mark>
#	section-c
#	<mark>
#	[nothing]
#	<mark>
#	section-d
#
# section-a contains metrics from this matrix
#	semantics { counter, discrete, instant } x
#	type { 32-bit, 64-bit } x
#	instances { singular, indom } x
#	sample intervals { 500msec, 2sec, 10sec (once or 2sec for discrete) }
# for a total time of 35 seconds
#
# metric		semantics	type	indom	sample
# disk.dev.read		counter		U64	60.1	500msec
# disk.dev.write	counter		U64	60.1	2sec
# disk.dev.total	counter		U64	60.1	10sec
# disk.all.read		counter		U64	NULL	500msec
# disk.all.write	counter		U64	NULL	2sec
# disk.all.total	counter		U64	NULL	10sec
# disk.dev.read_bytes	counter		U32	60.1	500msec
# disk.dev.write_bytes	counter		U32	60.1	2sec
# disk.dev.total_bytes	counter		U32	60.1	10sec
# disk.all.read_bytes	counter		U32	NULL	500msec
# disk.all.write_bytes	counter		U32	NULL	2sec
# disk.all.total_bytes	counter		U32	NULL	10sec
#
# filesys.used		instant		U64	60.5	500msec
# sample.longlong.bin	instant		64	29.2	2sec
# filesys.free		instant		U64	60.5	10sec
# sample.longlong.one	instant		64	NULL	500msec
# swap.length		instant		U64	NULL	2sec
# mem.util.kernelStack	instant		U64	NULL	10sec
# filesys.usedfiles	instant		U32	60.5	500msec
# swapdev.free		instant		U32	60.6	2sec
# pmcd.buf.alloc	instant		32	2.5	10sec
# sample.control	instant		32	NULL	500msec
# kernel.all.uptime	instant		U32	NULL	2sec
# network.tcpconn.close	instant		U32	NULL	10sec
# 
# filesys.capacity	discrete	U64	60.5	2sec
# tmpfs.capacity	discrete	U64	60.18	once
#
# mem.physmem		discrete	U64	NULL	2sec
#
# filesys.capacity	discrete	U32	60.5	2sec
# hinv.cpu.cache	discrete	U32	60.0	once
# filesys.maxfiles	discrete	U32	60.5	once
# hinv.physmem		discrete	U32	NULL	2sec
# hinv.pagesize		discrete	U32	NULL	once
# hinv.ncpu		discrete	U32	NULL	once
#
# section-b and section-d are the same as section-a (same pmlogger config)
#
# section-c contains only one sample for the 500msec sampling data
#

tmp=/var/tmp/$$
trap "rm -f $tmp.*; exit 0" 0 1 2 3 15

cat >$tmp.conf <<End-of-File
log mandatory on once {
    tmpfs.capacity
    hinv.cpu.cache
    filesys.maxfiles
    hinv.pagesize
    hinv.ncpu
}

log mandatory on 500msec {
    disk.dev.read
    disk.all.read
    disk.dev.read_bytes
    disk.all.read_bytes
    filesys.used
    sample.longlong.one
    filesys.usedfiles
    sample.control
}

log mandatory on 2sec {
    disk.dev.write
    disk.all.write
    disk.dev.write_bytes
    disk.all.write_bytes
    sample.longlong.bin
    swap.length
    swapdev.free
    kernel.all.uptime
    filesys.capacity
    mem.physmem
    filesys.capacity
    hinv.physmem
}

log mandatory on 10sec {
    disk.dev.total
    disk.all.total
    disk.dev.total_bytes
    disk.all.total_bytes
    filesys.free
    mem.util.kernelStack
    pmcd.buf.alloc
    network.tcpconn.close
}
End-of-File

cat >$tmp.conf.c <<End-of-File
log mandatory on once {
    disk.dev.read
    disk.all.read
    disk.dev.read_bytes
    disk.all.read_bytes
    filesys.used
    sample.longlong.one
    filesys.usedfiles
    sample.control
}
End-of-File

echo "section-a"
rm -f section-a.*
pmlogger -c $tmp.conf -l a.log -T +35sec section-a
sleep 2
echo "section-b"
rm -f section-b.*
pmlogger -c $tmp.conf -l b.log -T +35sec section-b
sleep 2
echo "section-c"
rm -f section-c.*
pmlogger -c $tmp.conf.c -l c.log -s 1 section-c
sleep 10
echo "section-d"
rm -f section-d.*
pmlogger -c $tmp.conf -l d.log -T +35sec section-d

rm interpmark.*
pmlogextract section-a section-b section-c section-d interpmark