Difference between revisions of "Troubleshooting (Ubuntu)"

Jump to navigation Jump to search
→‎High System Load: Added other tools
(→‎High System Load: Added other tools)
Line 11: Line 11:
So in the above, as of 14:28:49 hrs the server has been up for 9 days 22 hours odd, has 1 user logged in, and the system load averages for the past 1, 5, and 15 minutes are shown.
So in the above, as of 14:28:49 hrs the server has been up for 9 days 22 hours odd, has 1 user logged in, and the system load averages for the past 1, 5, and 15 minutes are shown.


The load average for a given period indicates how many processes were running or in a uninterruptable (waiting for IO) state.  What's bad depends on your system, for a single CPU system a load average greater than 1 could be considered bad as there are more processes running than CPU's to service them.
The load average for a given period indicates how many processes were running or in a uninterruptable (waiting for IO) state.  What's bad depends on your system, for a single CPU system a load average greater than 1 could be considered bad as there are more processes running than CPU's to service them.  Though if you expect peaks in load, then a high load over the last minute might not concern, whereas over 15mins it would.


=== <code>top</code> ===
=== <code>top</code> ===
The <code>top</code> command allows some basic insight into the system's performance, and is akin to the Task Manager in Windows.
The <code>top</code> command allows some basic insight into the system's performance, and is akin to the Task Manager in Windows.  It probably won't provide the answer as to what the problem is, but it will probably allow you to focus in on the process(es) that are causing grief.


<pre>
<pre>
Line 120: Line 120:




=== Identify Process Causing High System Load ===
==== Identify Process Causing Occassional High System Load ====
If the high load is constant, just fire up <code>top</code> and see if there is a specific process to blame, or if your stuck waiting for disk or network IO.
If the high load is constant, just fire up <code>top</code> and see if there is a specific process to blame, or if your stuck waiting for disk or network IO.


Line 145: Line 145:
<pre>crontab -e
<pre>crontab -e
1 * * * * /bin/bash  /home/user/load_log</pre>
1 * * * * /bin/bash  /home/user/load_log</pre>
=== Other Tools ===
* <code> vmstat </code>
** http://www.linuxcommand.org/man_pages/vmstat8.html
** Principally used for reporting on virtual memory statistics
* <code> mpstat </code>
** http://www.linuxcommand.org/man_pages/mpstat1.html
** Reports basic processor stats
* <code> iostat </code>
** http://sebastien.godard.pagesperso-orange.fr/man_iostat.html
** Provides disk IO statistics - part of <code>sysstat</code> package
If when using the above tools you're presented with disk/devices names of <code>dm-0</code>, <code>dm-1</code>, etc., which won't mean much.  These are LVM logical devices, to understand what they map to use
<pre>lvdisplay|awk  '/LV Name/{n=$3} /Block device/{d=$3; sub(".*:","dm-",d); print d,n;}'</pre>


== Network ==
== Network ==

Navigation menu