EDIT I had to go to the console and reboot, as it was unresponsive to any command.

I am trying to ssh to an Ubuntu 18.04 server, and it is unresponsive. But it responds to ping.

I suspect it has a running process (actually two instances of mpirun -8 myprog, so ps -ef | grep myprog would give 10 results), which are trying to write to disk, and disk is full. I have my home dir in the same partition as / (bad!!).

I tried

ssh myserver 'ps -ef | grep myprog'

with the expectation of then killing those processes. But this command is not responding either.

Is there any way to try this? Or anything else?

I mean not to have to physically go to the console (which is in a remote location).


You can send kill command directly like this

ssh myserver 'kill -9 `pidof myprog`'

you also should be aware if you allow root login via ssh, so in that case you specify host like root@myserver

  • Will this work if there are two instances, each of mpirun -8 ...? See updated OP. Feb 4 at 9:41
  • yes it will, otherwise you can use killall procName
    – DenisZ
    Feb 4 at 17:59
  • pkill will signal all matching processes.. (man 1 pkill details the patterns that can be matched) Feb 11 at 16:25
  • Thanks @SimonBanks I wasn't aware of pkill... I see it's very efficient
    – DenisZ
    Feb 12 at 7:40

Why not call the pkill command?

ssh myserver pkill myprog
  • 2
    If OP don't get a responce from ssh myserver 'ps -ef | grep myprog', will your's ssh myserver pkill myprog` do its work ?
    – Soren A
    Feb 11 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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