Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A client program connects to my server program written in JAVA via TCP connection (ServerSocket). I want to close the TCP connection between these two programs with a Solaris command or tool for debugging purposes, Something like Essensial NetTools in windows which can close a TCP connection. What should I do?

The ProcessID ($PID) of server application can be found with following command:

jps -ml 

$PID server.jar

The TCP connection can be seen by following command:

pfiles $PID

  33: S_IFSOCK mode:0666 dev:309,0 ino:22564 uid:0 gid:0 size:0
        sockname: AF_INET  port: 3066 <--server
        peername: AF_INET  port: 38532 <--client

Now, How to close this connection?

Can send SIGKILL to the Socket connection? if so, How?

share|improve this question
now that I think about it, I don't know if you can kill a connection discretely on any platform I've worked with. you can kill the process, or interrupt the connection itself with the firewall, but the process controls the ports and connections using a sockets API usually, and as such there is no middleman who would be in a position to disconnect a given conversation. – Frank Thomas Jan 14 '14 at 17:08
@FrankThomas Essensial NetTools in windows can do this job – Alireza Jan 14 '14 at 17:10

You must log in to answer this question.

Browse other questions tagged .