-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·34 lines (30 loc) · 1.07 KB
/
test.sh
File metadata and controls
executable file
·34 lines (30 loc) · 1.07 KB
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
#!/bin/bash
declare -i num
#num=0
#ssh -i ssh/apim310.key ubuntu@apim1.apim.com grep \"events dropped so far\" wso2am-3.1.0/repository/logs/wso2carbon.log | while read -r line ;
#while read -r line ;
#do
# val=$(echo "$line" | sed -E 's/.*, ([0-9]+)( events dropped so far.).*/\1/')
# num=$(( $num + $val ))
#done <<<$(grep "events dropped so far" ./summary.log)
#echo $num
command_prefix="ssh -i ssh/apim310.key ubuntu@apim1.apim.com"
num=0
while read -r line ; do
val=$(echo "$line" | sed -E 's/.*, ([0-9]+)( events dropped so far.).*/\1/')
if [ "$val" > "$num" ]; then
num=$val
fi
# num=$(( $num + $val ))
done <<<$($command_prefix grep \"events dropped so far\" wso2am-3.1.0/repository/logs/wso2carbon.log)
#echo $num > ana_event_drop.txt
echo "final $num"
#192.168.114.4 db.apim.com
192.168.114.47 client.apim.com
#192.168.114.48 apim1.apim.com
#192.168.114.58 apim2.apim.com
#192.168.114.30 server1.apim.com
#192.168.114.34 server2.apim.com
#192.168.114.59 analytics1.apim.com
#192.168.114.64 analytics2.apim.com
#192.168.114.65 netty.apim.com