Collectl is a console tool for monitoring system performance and recording results.
Installing in Ubuntu or Debian:
sudo apt-get install collectl
Documentation display command:
man collectl
Startup example:
collectl
collectl -top
collectl -scmd
CPU monitoring example:
collectl -sc
collectl -sС
An example of memory monitoring:
collectl -sm
collectl -sM
An example of disk monitoring:
collectl -sd
collectl -sD
You can also view statistics in the form of graphs through the browser if you install colplot (collectl-utils.sourceforge.net).