Reputation: 5871
I have started a rails server puma by using the following command.
nohup rails server &
its output was [2] 22481 along with the following:
nohup: ignoring input and appending output to 'nohup.out'
But now I have forget the returned process id, so how can I detect the process id so as to delete the process on aws.
Upvotes: 1
Views: 1196
Reputation: 8551
ps aux|grep 3000
This will give you rails server id running on port 3000
Upvotes: 0
Reputation: 5871
command
ps -ef
return the full output list of processes in which one of the list item is as:
ec2-user 12992 1 0 Dec20 ? 00:00:57 puma 3.12.0 (tcp://0.0.0.0:3000) [tukatech_garmentstore_live]
so force killed the process by.
kill -9 12992
did the job
Upvotes: 1
Reputation: 286
To kill whatever is on port 3000 (webrick server default port), type this below command to get process id for 3000 port:
$ lsof -wni tcp:3000
Then, use process id (PID) to kill the process:
$ kill -9 PID
Upvotes: 2
Reputation: 126
Rails server process pid can be found in this directory: -> tmp/pids/server.pid
then,
Kill -9 pid
Upvotes: 1