File tree 2 files changed +13
-2
lines changed
modules/elasticsearch/src/main/java/org/elasticsearch
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -126,11 +126,16 @@ launch_service()
126
126
}
127
127
128
128
# Parse any command line options.
129
- args=` getopt fhp:bD :X: " $@ " `
129
+ args=` getopt vfhp:D :X: " $@ " `
130
130
eval set -- " $args "
131
131
132
132
while true ; do
133
133
case " $1 " in
134
+ -v)
135
+ $JAVA $JAVA_OPTS $ES_JAVA_OPTS $es_parms -cp $CLASSPATH $props \
136
+ org.elasticsearch.Version
137
+ exit 0
138
+ ;;
134
139
-p)
135
140
pidfile=" $2 "
136
141
shift 2
@@ -140,7 +145,7 @@ while true; do
140
145
shift
141
146
;;
142
147
-h)
143
- echo " Usage: $0 [-d ] [-h] [-p pidfile]"
148
+ echo " Usage: $0 [-f ] [-h] [-p pidfile]"
144
149
exit 0
145
150
;;
146
151
-D)
Original file line number Diff line number Diff line change 19
19
20
20
package org .elasticsearch ;
21
21
22
+ import org .elasticsearch .monitor .jvm .JvmConfig ;
23
+
22
24
import java .io .InputStream ;
23
25
import java .text .SimpleDateFormat ;
24
26
import java .util .Date ;
@@ -72,4 +74,8 @@ public static String full() {
72
74
}
73
75
return sb .toString ();
74
76
}
77
+
78
+ public static void main (String [] args ) {
79
+ System .out .println ("ElasticSearch Version: " + number + " (" + date () + "), JVM: " + JvmConfig .jvmConfig ().vmVersion ());
80
+ }
75
81
}
You can’t perform that action at this time.
0 commit comments