Naive implementation using erlang:system_monitor/2.