Adding to the above...
script can be used to record both the console output, and its timing too. And
scriptreplay is used to play it back, at the same speed, or faster if you wish.
This is my typical usage of script/scriptreplay, for when I do an upgrade...
Code:
datex="$(date +'%Y-%m-%d')"
script -f -t $datex.log 2>$datex.timing
aptitude full-upgrade
exit
# scriptreplay $datex.timing $datex.log