Newer
Older
if [ -e @SIMPATH@/bin/fairmq-shmmonitor ]; then
@SIMPATH@/bin/fairmq-shmmonitor --cleanup
fi
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
if [ $# -ge 1 ]; then
_nbmoni=$1
((_pubfreqts = $_nbmoni*100 ))
_pubminsec=1.0
_pubmaxsec=10.0
if [ $# -ge 4 ]; then
_filename=""
_dirname=""
_hostname=$4
if [ $# -ge 5 ]; then
_pubfreqts=$5
if [ $# -ge 6 ]; then
_pubminsec=$6
if [ $# -ge 7 ]; then
_pubmaxsec=$7
fi
fi
fi
elif [ $# -ge 2 ]; then
_filename=$2
_hostname=""
if [ $# -eq 3 ]; then
_dirname=$3
else
_dirname=""
fi
else
echo 'Starting connection to local stream'
echo ' for other usages, please supply at least a filename.'
echo 'Possible usages are:'
echo 'startMQSamplerT0Monitor2020.sh'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> <full filename pattern list>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> <filename pattern> <folder_path>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list> <Hist publish freq. in TS>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list> <Hist publish freq. in TS> <Min Hist pub. in s>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list> <Hist publish freq. in TS> <Min Hist pub. in s> <Max Hist pub. in s>'
_filename=""
_dirname=""
_hostname="localhost"
fi
else
echo 'Starting connection to local stream with 1 monitor process'
echo ' for other usages, please supply at least a filename.'
echo 'Possible usages are:'
echo 'startMQSamplerT0Monitor2020.sh'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> <full filename pattern list>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> <filename pattern> <folder_path>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list> <Hist publish freq. in TS>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list> <Hist publish freq. in TS> <Min Hist pub. in s>'
echo 'startMQSamplerT0Monitor2020.sh <Nb Monitor processes> "" "" <hostname(s) list> <Hist publish freq. in TS> <Min Hist pub. in s> <Max Hist pub. in s>'
_filename=""
_dirname=""
_hostname="localhost"
_nbmoni=1
_pubfreqts=100
_pubminsec=1.0
_pubmaxsec=10.0
fi
_paramfile=@VMCWORKDIR@/macro/beamtime/mcbm2020/mT0Par.par
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
SAMPLER="MultiTsaSampler"
SAMPLER+=" --id sampler1"
SAMPLER+=" --max-timeslices 0"
SAMPLER+=" --severity info"
#SAMPLER+=" --flib-port 10"
if [ "$_hostname" != "" ]; then
SAMPLER+=" --flib-host $_hostname"
elif [ "$_filename" != "" ]; then
SAMPLER+=" --filename $_filename"
if [ "$_dirname" != "" ]; then
SAMPLER+=" --dirname $_dirname"
fi
fi
SAMPLER+=" --high-water-mark 1000"
SAMPLER+=" --send-ts-per-sysid 1"
SAMPLER+=" --channel-config name=t0component,type=push,method=bind,address=tcp://127.0.0.1:11555"
#SAMPLER+=" --transport shmem"
SAMPLER+=" --transport zeromq"
#SAMPLER+=" --transport nanomsg"
xterm -l -geometry 80x23+0+0 -hold -e @CMAKE_BINARY_DIR@/bin/MQ/source/$SAMPLER &
_iMoni=0
while (( _iMoni < _nbmoni )); do
(( _yOffset=100*_iMoni ))
(( _iMoni += 1 ))
MONITOR="T0MonitorMcbm2018"
MONITOR+=" --id mon$_iMoni"
MONITOR+=" --severity info"
MONITOR+=" --PubFreqTs $_pubfreqts"
MONITOR+=" --PubTimeMin $_pubminsec"
MONITOR+=" --PubTimeMax $_pubmaxsec"
MONITOR+=" --channel-config name=t0component,type=pull,method=connect,address=tcp://127.0.0.1:11555"
#MONITOR+=" --transport shmem"
MONITOR+=" --transport zeromq"
#MONITOR+=" --transport nanomsg"
MONITOR+=" --channel-config name=parameters,type=req,method=connect,transport=zeromq,address=tcp://127.0.0.1:11005,rateLogging=0"
MONITOR+=" --channel-config name=histogram-in,type=pub,method=connect,transport=zeromq,address=tcp://127.0.0.1:11666"
MONITOR+=" --channel-config name=histo-conf,type=pub,method=connect,transport=zeromq,address=tcp://127.0.0.1:11667"
MONITOR+=" --channel-config name=canvas-conf,type=pub,method=connect,transport=zeromq,address=tcp://127.0.0.1:11668"
xterm -l -geometry 80x23+500+$_yOffset -hold -e @CMAKE_BINARY_DIR@/bin/MQ/monitor/$MONITOR &
done
PARAMETERSERVER="parmq-server"
PARAMETERSERVER+=" --id parmq-server"
PARAMETERSERVER+=" --severity info"
PARAMETERSERVER+=" --channel-name parameters"
PARAMETERSERVER+=" --channel-config name=parameters,type=rep,method=bind,transport=zeromq,address=tcp://127.0.0.1:11005,rateLogging=0"
PARAMETERSERVER+=" --first-input-name $_paramfile"
PARAMETERSERVER+=" --first-input-type ASCII"
PARAMETERSERVER+=" --libs-to-load=libCbmFlibMcbm2018" # doesn't work due to runtime problem
xterm -geometry 80x23+1000+0 -hold -e @CMAKE_BINARY_DIR@/bin/MQ/parmq/$PARAMETERSERVER &
HISTSERVER="MqHistoServer"
HISTSERVER+=" --id server1"
HISTSERVER+=" --channel-config name=histogram-in,type=sub,method=bind,transport=zeromq,address=tcp://127.0.0.1:11666"
HISTSERVER+=" --channel-config name=histo-conf,type=sub,method=bind,transport=zeromq,address=tcp://127.0.0.1:11667"
HISTSERVER+=" --channel-config name=canvas-conf,type=sub,method=bind,transport=zeromq,address=tcp://127.0.0.1:11668"
xterm -geometry 80x23+1500+0 -hold -e @CMAKE_BINARY_DIR@/bin/MQ/histogramServer/$HISTSERVER &