sar is a tool to collect, report and store system activity information, a very useful tool to debug server performance related problems.
To install sar on CentOS/RHEL, run
yum install sysstat
To view memory stats, run
To view IO stats (disk usage), run
For CPU stats, run
sar -P ALL