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
Serial Port Doesn't Work Properly After Reboot, Unless I Execute Minicom
Minicom Black Background Color Is Not Respected
Trying to Search Files from User Keyword in Bash
Bash Script; How to Use Vars and Funcs Defined After Command
Colored Shell Script Output Library
Any Way to Exit Bash Script, But Not Quitting the Terminal
Excluding Directory When Creating a .Tar.Gz File
How to Copy All PDF Files from a Directory and Its Subdirectories to One Location
Linux Sed Command - Using Variable with Backslash
Pass Command-Line Arguments to Grep as Search Patterns and Print Lines Which Match Them All
How to Gzip All Files in All Sub-Directories into One Compressed File in Bash
Highlight Text Similar to Grep, But Don't Filter Out Text
Dd: How to Calculate Optimal Blocksize
Prompting for User Input in Assembly Ci20 Seg Fault
Passing Main Script Variables into Perl Modules
Cpu Usage Percent from Linux Server