Show CPU statistics at a 2 second interval for 10 times

pidstat

pidstat {{2}} {{10}}

click the source code to copy install pidstat on any operating system with command-not-found.com