change cpu usage to loadavg
add dep and run target
support -p(port) option
refactor
improve history management
fix func names