3

I have a small client-server code. In the server part, there was a command daemon(1,1) that ran it as a daemon. The executable was just a.out. How can I kill this process?

The usual ps does not show this process, but I know this is running because I cannot use the IP-port pair anymore.

1

3 Answers 3

5

I figured it out. To see the processes, I used:

ps -ef | grep a.out

This gave me the list of all processes a.out. After this I used kill -9 pid to kill those processes.

3

This can be done in many ways. You can check the process using

top

command or you can use

ps aux | grep a.out

This command will show you all the process running (even the zombie processes)

You can use kill -9 pid which will kill the process signal. But a better way is to use

kill -11 pid

The above approach will create core dump files which are helpful for troubleshooting at later stage.

2

You can use killall executable-name. It kills all instances of the given program and you don't have to check it's PID to kill it.

1
  • That was the exact solution for my case. Thanks. Apr 14, 2022 at 21:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .