How to Kill Tcp Port 16969 in Bash

How can I kill TCP port 16969 in Bash?

I think that:

lsof -i tcp:22 | grep LISTEN | awk '{print $2}' | xargs kill

Should do the trick.

To double check what commands it wants to run before letting it loose add an echo before the kill like this:

lsof -i tcp:22 | grep LISTEN | awk '{print $2}' | xargs echo kill

It'll then list the PIDs that it would ordinarily kill

How do i restart apache cassandra 2.0.4?

If it's only a process and not a service you could do something like

$ ps auwx | grep cassandra
$ sudo kill <pid>

where <pid> is what you get from ps auwx | grep cassandra

This will stop the process. Then you have to start it again

$ cd <install_location>
$ bin/cassandra

where <install_location> is where you have installed cassandra

if is a service: service cassandra restart

How to check who run/activate process that lock specific port before?

I find this useful application - Process Monitor

you can see processes running and executed, with process tree.
You can download it from http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx



Related Topics



Leave a reply



Submit