Server Fault is a question and answer site for system and network administrators. 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

Using Putty on my Vista machine, I logged into my development server (Ubuntu) and fired up the Django Test server. I left my computer for a while (physically) and returned to find the Putty connection had timed out. No biggy, I just logged back into the server.

However, when I try to run the Django test server now, it says the port is already in use. That means (I think) that the first test server instance is still running.

How do I kill this process? What does the process even look like? I did a ps aux and have a feeling that this is the offending process:

garfonzo    5719  0.3  0.0      0     0 ?        D    08:58   1:07 [python]

Since I started the server this morning at about that time and Django is python-based. However, doing a kill 5719 does nothing -- the process is not killed and I still cannot start up the test server.

Any ideas!?

EDIT -- for more details:

I also ran netstat -tulpn and the output is this:

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0*               LISTEN      -

Isn't that convenient, the one port I want to know the process ID of doesn't have a PID!

share|improve this question

First, netstat won't show process IDs unless you own them or netstat is running as root. try sudo netstat -tnpl

You can find out what command line launched your process using cat /proc/5719/cmdline. If this is indeed your django service, and it's ignoring the SIGTERM signal (the default signal sent by kill) try sending it the SIGKILL instead with kill -KILL 5719

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.