record cmd history and sysinfo