Move process monitoring to monitor.go.