You can run the plain "top" command but that will only give you a limited number of options to look at to diagnose problems.
Where the real meat is, is looking at different pages in top
To accomplish this you just need to learn some common shortcuts to work your way around top, most of these parameters work between the different distributions of Linux and unix but some may not. Some top screens like esxtop in VMware have very different parameters.
Finding Heavy Disk IO Processes in top
- Type 'top'
- Press 'i' to remove inactive processes
- Press 'm' to show processes issuing IO
- Press '?' to figure out the column names to sort
- Press 'o' and type 'total' to sort by total disk IO issued
Using the above instructions you can easily determine which processes are heavily using IO and track down what the cause of your IO bottleneck is.
Here's an example of the help (?) screen in top of all the parameters you can use in FreeBSD to track down issues. You can get to this menu by either typing 'h' or '?'
Top version 3.5beta12, Copyright (c) 1984 through 1996, William LeFebvre A top users display for Unix These single-character commands are available: ^L - redraw screen q - quit h or ? - help; show this text C - toggle the displaying of weighted CPU percentage d - change number of displays to show e - list errors generated by last "kill" or "renice" command H - toggle the displaying of threads i or I - toggle the displaying of idle processes j - toggle the displaying of jail ID k - kill processes; send a signal to a list of processes m - toggle the display between 'cpu' and 'io' modes n or # - change number of processes to display o - specify sort order (vcsw, ivcsw, read, write, fault, total) r - renice a process s - change number of seconds to delay between updates S - toggle the displaying of system processes t - toggle the display of this process u - display processes for only one user (+ selects all users)