refactor mon_dump
chatsvr can work now.