The title pretty much sums it up. I have a zotonic site running with -heart, it uses lots of cpu time and I can't get an erlang shell. So, is there a way to kill the vm?
killall heart y
killall beam.smp no están funcionando.
Encontré esta pregunta: Detener Erlang Daemon , but it does not really answer my question.
preguntado el 27 de agosto de 11 a las 22:08
It will kill the heart process and all applications.
I had this same issue.... And it was really hard to kill it. I tried the normal paths and couldn't do it. So I did this hack:
First let's get the PID
sudo netstat -tulpn |grep 8080 tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 931/beam.smp
So the PID is 931.
Next which program created that process?
lsof -p 931 | grep txt lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/agarcia/.gvfs Output information may be incomplete. beam.smp 931 yaws txt REG 8,1 2053256 22793377 /usr/lib/erlang/erts-5.8.5/bin/beam.smp
So the program is .../bin/beam.smp so just move it
mv beam.smp old_beam.smp
And now you kill it
kill -9 931
And I finally was able to kill it :-)
It's a testament to erlangs reliability that one actually needs to hack-it in order to be able to take down the service.
ps: I originally tried yaws -I [pid] --stop but it didn't work either.
If you don't mind killing every VM on your machine:
ps aux | grep -e heart -e epmd | grep -v grep | tr -s ' ' | cut -d ' ' -f 2 | xargs kill -9
The VM and
heart seem to monitor each other mutually. In case the VM is in a crash/revive loop, you may need to run this command several times quickly to kill everything dead.