Make unix process monitor callable

The main is now in the run_monitor() function. So that the monitor
may used as a module in another script.