-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sh
55 lines (42 loc) · 1014 Bytes
/
test.sh
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
#env=$1
env="prod"
NC='\033[0m' # No Color
GREEN='\033[0;32m'
middle="rhgemfirev"
locatorMiddle="rhlocatorv"
sshLog="-o LogLevel=Error"
if [ $env == "sbx" ]; then
env="sb"
servermax=3
locatormax=1
elif [ $env == "dev" ]; then
servermax=6
locatormax=1
elif [ $env == "sit" ]; then
servermax=12
locatormax=2
elif [ $env == "uat" ]; then
servermax=19
locatormax=2
elif [ $env == "prod" ]; then
servermax=21
locatormax=2
middle="rhgfxdv"
fi
#command="netstat -an|grep -i 'time_'|wc -l"
command="sudo service gemfire-server status"
for i in $(seq 1 $servermax)
do
hostName=$env$middle$i
echo $hostName
#count=$(ssh $sshLog $hostName $command)
ssh -t $sshLog $hostName $command
#echo $count
done
#for i in $(seq 1 $locatormax)
#do
#hostName=$env$locatorMiddle$i
#echo $hostName
#count=$(ssh $sshLog $hostName $command)
#echo $count
#done