common function to monitor different stuff inside unix host