I am trying to start elasticsearch as a process and stop it without closing the command prompt. For creating a new process, I am using:
C:\Users\User1\Desktop\Work\ElasticSearch\elasticsearch-1.3.1\bin>start /B elasticsearch
C:\Users\User1\Desktop\Work\ElasticSearch\elasticsearch-1.3.1\bin>start /B elasticsearch
C:\Users\User1\Desktop\Work\ElasticSearch\elasticsearch-1.3.1\bin>[2014-08-19 15:23:26,351][WARN ][bootstrap ] jvm uses the c
lient vm, make sure to run `java` with the server vm for best performance by adding `-server` to the command line
[2014-08-19 15:23:26,433][INFO ][node ] [Batroc the Leaper] version[1.3.1], pid[5800], build[2de6dc5/2014-07-28T14:45:15
Z]
The process runs on port 9200.
How can I get the process PID or name to use taskkill to kill this process using this command or something similar from either the already open command prompt or the existing command prompt in which the elasticsearch node process is running:
taskkill /PID <pid>
Pid of 5800(shown in process log in console above) did not work. Windows task manager did not have a process by the name elasticsearch. It only has a cmd process for the command prompt in which the elasticsearch is running and when I kill that process, the elasticsearch also gets killed.