Re: How to stop squirrelmail temporarily



On Wed, 2008-12-24 at 19:20 +0800, Stephen Liu wrote:
--- Yuriy Kuznetsov <yuriy.kuznetsov@xxxxxxxxx> wrote:

Try to run the following on on your box and see what processes are
listen to
those ports:

# netstat -lnp

Normally these ports are used by imapd - normal and secure
connections.

...

# netstat -lnp | grep 993
tcp6 0 0 :::993 :::*
LISTEN 2846/couriertcpd

# netstat -lnp | grep 143
tcp6 0 0 :::143 :::*
LISTEN 2834/couriertcpd


Perdition also needs port 993 and 143. They are taken by courier.

...

# /etc/init.d/courier-imap stop
Stopping Courier IMAP server: imapd.

...

# netstat -lnp | grep 993
tcp6 0 0 :::993 :::*
LISTEN 2846/couriertcpd


Why port 993 is still taken by courier? The latter is NOT running.

The SSL one is. Try:

# /etc/init.d/courier-imapd-ssl stop

Now, on a slightly different topic:

# ps aux | grep perdition
root 3114 0.0 2.0 2864 692 pts/2 S+ 11:02 0:00 grep
perdition


# kill -9 692
-bash: kill: (692) - No such process


# kill -9 2864
-bash: kill: (2864) - No such process


# kill -9 3114
-bash: kill: (3114) - No such process

It's a good idea to have a think, and know what you're looking at before
firing off "kill -9" at random numbers.

If you can't remember what column is which (I can't), try something like
this:

$ ps aux|head -n1
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND

Your first attempt is at the RSS - Not a pid. There may have been a
process with that pid, but you killed it, giving it no chance to clean
up after itself.

Your second attempt is at the VSZ - again, not a pid. Again, any process
that may have had that pid is now gone.

Your third attempt is indeed the pid - of the grep command you were
using to find it. It's gone already by the time you tried to kill it.

Also, please don't cc me on list mail.

Richard



--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: Periodic Fedora 9 system hangs with jumpy mouse
    ... kill -TERM pid ... to do with graphics card and driver. ...
    (Fedora)
  • Re: how can I make sure only one instance of gkrellm runs
    ... It is the standard way of probing for a process given a pid. ... "man 3p kill" says: ... since the script is executing the command ... But for a single person running a single GUI ...
    (Fedora)
  • RE: threads in perl
    ... Instead of xterm I tried to invoke some other script: ... How can I kill exec after it was started in different thread? ... But threads all share the same pid, ... When life conspires against you, and no longer floats your boat, Don't waste your time with crying, just get on your back and float. ...
    (perl.beginners)
  • Re: Killing a process tree? - 1 attachment
    ... Well, you could use ps to get process and parent process pid, ... match subprocess to parent process, and kill in reverse order. ...
    (alt.os.linux)
  • trap not work in program with a subshell environment
    ... print "killed $PID." ... trap handle_signal INT TERM ... And here is the process tree. ... If I kill the second "1.ksh", ...
    (comp.unix.shell)