I'm currently hosting a dedicated server that is running Ubuntu 14.04.3 LTS 64bit, recently ive been getting weird rare crashes/timeouts on my gameservers where players simply lag and then disconnect. At first i thought it was the control panel but after contacting them they told me that this was most likely because of a hang caused by high cpu or memory usage. To troubleshoot this I've been trying to find a tool that monitors cpu usage (memory isnt a problem) that logs all of it. Would appreciate any help!
i like munin if it comes to monitoring in linux environments.
Quoting the project page
Munin the monitoring tool surveys all your computers and remembers what it saw. It presents all the information in graphs through a web interface. Its emphasis is on plug and play capabilities. After completing a installation a high number of monitoring plugins will be playing with no more effort.
Munin comes with a good set of core plugins, which you can use to monitor values on your computers.
For example cpu usage, or memory usage, or disk usage etc... If you need something special you could write yourself additional plugins.
Usually you set up 1 munin-server which is hosting the webinterface and an unlimited amount of munin-nodes.
The notes collect data and report it to the server instance which shows the graphs.
Server and node can be on the same machine, so you can run both on the related server if needed - or you could move the server instance to some other machine and just install munin-node on the affected machine.
The CPU usage graph is categorized under system.
Just to name some of the other big software names in the monitoring area
Both tend to be often used if you plan to monitor bigger environments - i.e. networks in companies or similar.
The munin project page itself lists alternatives as well.