Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

can use FQDN (-name instead of -sname) with -F flag

SVN Revision: 862
  • Loading branch information...
commit d38c657e3b076fbd845a042086f39d2e0401d3ff 1 parent b94ebe8
Nicolas Niclausse authored July 15, 2008

Showing 1 changed file with 11 additions and 9 deletions. Show diff stats Hide diff stats

  1. 20  tsung.sh.in
20  tsung.sh.in
@@ -13,6 +13,7 @@ MAIN_DIR=$HOME/.tsung
13 13
 LOG_DIR=$MAIN_DIR/log
14 14
 LOG_OPT="log_file \"$LOG_DIR/tsung.log\""
15 15
 VERSION=@PACKAGE_VERSION@
  16
+NAMETYPE="-sname"
16 17
 
17 18
 LISTEN_PORT=8090
18 19
 USE_PARENT_PROXY=false
@@ -32,17 +33,17 @@ REC_BOOT_OPT="-boot $INSTALL_DIR/lib/tsung_recorder-$VERSION/priv/tsung_recorder
32 33
 DEBUG_LEVEL=5
33 34
 RECORDER_PLUGIN="http"
34 35
 ERL_RSH=" -rsh ssh "
35  
-ERL_OPTS=" -smp auto +A 2 +K true @ERL_OPTS@ "
  36
+ERL_OPTS=" -smp auto +P 250000 +A 16 +K true @ERL_OPTS@ "
36 37
 COOKIE='tsung'
37 38
 ERTS_RUN=`$ERL -version 2>&1 | tr -cd 0123456789.`
38 39
 ERTS_BOOT=`grep erts $TSUNGPATH/../priv/tsung.rel | tr -cd 0123456789.`
39 40
 
40 41
 stop() {
41  
-    $ERL $ERL_OPTS $ERL_RSH -noshell  -sname killer -setcookie $COOKIE -pa $TSUNGPATH -pa $CONTROLLERPATH -s tsung_controller stop_all $HOST -s init stop
  42
+    $ERL $ERL_OPTS $ERL_RSH -noshell  $NAMETYPE killer -setcookie $COOKIE -pa $TSUNGPATH -pa $CONTROLLERPATH -s tsung_controller stop_all $HOST -s init stop
42 43
 }
43 44
 
44 45
 stop_recorder() {
45  
-    $ERL $ERL_OPTS $ERL_RSH -noshell  -sname killer -setcookie $COOKIE -pa $TSUNGPATH -pa $RECORDERPATH -s tsung_recorder stop_all $HOST -s init stop
  46
+    $ERL $ERL_OPTS $ERL_RSH -noshell  $NAMETYPE killer -setcookie $COOKIE -pa $TSUNGPATH -pa $RECORDERPATH -s tsung_recorder stop_all $HOST -s init stop
46 47
     RET=$?
47 48
     if [ $RET == 1 ]; then
48 49
         echo "FAILED"
@@ -84,7 +85,7 @@ makebootfiles() {
84 85
 
85 86
 start() {
86 87
     echo "Starting Tsung"
87  
-    $ERL $ERL_OPTS $ERL_RSH -noshell -sname $CONTROLLER -setcookie $COOKIE  $BOOT_OPT \
  88
+    $ERL $ERL_OPTS $ERL_RSH -noshell $NAMETYPE $CONTROLLER -setcookie $COOKIE  $BOOT_OPT \
88 89
     -pa $TSUNGPATH -pa $CONTROLLERPATH \
89 90
     -tsung_controller debug_level $DEBUG_LEVEL \
90 91
     -tsung_controller config_file \"$CONF_OPT_FILE\" -tsung_controller $LOG_OPT
@@ -92,7 +93,7 @@ start() {
92 93
 
93 94
 recorder() {
94 95
     echo "Starting Tsung recorder on port $LISTEN_PORT"
95  
-    $ERL $ERL_OPTS $ERL_RSH -noshell -sname $RECORDER -setcookie $COOKIE  $REC_BOOT_OPT \
  96
+    $ERL $ERL_OPTS $ERL_RSH -noshell $NAMETYPE $RECORDER -setcookie $COOKIE  $REC_BOOT_OPT \
96 97
     -pa $TSUNGPATH -pa $RECORDERPATH -pa $CONTROLLERPATH \
97 98
     -tsung_recorder debug_level $DEBUG_LEVEL \
98 99
     -tsung_recorder $LOG_OPT \
@@ -106,7 +107,7 @@ recorder() {
106 107
 }
107 108
 
108 109
 debug() {
109  
-    $ERL $ERL_OPTS $ERL_RSH -sname $CONTROLLER -setcookie $COOKIE  $BOOT_OPT \
  110
+    $ERL $ERL_OPTS $ERL_RSH $NAMETYPE $CONTROLLER -setcookie $COOKIE  $BOOT_OPT \
110 111
      -pa $TSUNGPATH -pa $CONTROLLERPATH \
111 112
      -tsung_controller config_file \"$CONF_OPT_FILE\" \
112 113
      -tsung_controller $LOG_OPT
@@ -142,13 +143,13 @@ logdir() {
142 143
 
143 144
 status() {
144 145
     SNAME=tsung_status_$RANDOM
145  
-    $ERL -noshell -sname $SNAME -setcookie $COOKIE -pa $TSUNGPATH -pa $CONTROLLERPATH -s tsung_controller status $HOST -s init stop
  146
+    $ERL -noshell $NAMETYPE $SNAME -setcookie $COOKIE -pa $TSUNGPATH -pa $CONTROLLERPATH -s tsung_controller status $HOST -s init stop
146 147
 }
147 148
 
148 149
 record_tag() {
149 150
     shift
150 151
     SNAME=tsung_recordtag
151  
-    $ERL -noshell -sname $SNAME -setcookie $COOKIE -pa $TSUNGPATH -pa $RECORDERPATH -run ts_proxy_recorder recordtag $HOST "$*" -s init stop
  152
+    $ERL -noshell $NAMETYPE $SNAME -setcookie $COOKIE -pa $TSUNGPATH -pa $RECORDERPATH -run ts_proxy_recorder recordtag $HOST "$*" -s init stop
152 153
 }
153 154
 
154 155
 checkrunning_controller() {
@@ -175,7 +176,7 @@ usage() {
175 176
     exit
176 177
 }
177 178
 
178  
-while getopts ":f:p:l:d:r:i:P:L:I:u" Option
  179
+while getopts ":f:p:l:d:r:i:P:L:I:u:F" Option
179 180
 do
180 181
     case $Option in
181 182
         f) CONF_OPT_FILE=$OPTARG;;
@@ -193,6 +194,7 @@ do
193 194
         p) RECORDER_PLUGIN=$OPTARG;;
194 195
         I) PGSQL_SERVER_IP=$OPTARG;;
195 196
         u) USE_PARENT_PROXY=true;;
  197
+        F) NAMETYPE="-name";;
196 198
         P) PGSQL_SERVER_PORT=$OPTARG;;
197 199
         L) LISTEN_PORT=$OPTARG;;
198 200
         *) usage ;;

0 notes on commit d38c657

Please sign in to comment.
Something went wrong with that request. Please try again.