simple way to record process stats in portable manner