add pkgname to connect(), add cpu and mem monitor