Top of the Tops

A roundup of my top top utilities for troubleshooting problems on servers.

htop
In terms of alternatives to the traditional top command htop is pretty good (being better than the older atop too). Maybe it is just the colours but it is also useful to get a view of the memory without the caches included.

yum install htop

htop


iftop
Use this little beauty to have a live top view of your network traffic on your machine.

yum install iftop


mytop

Monitor MySQL with mytop. For Red Hat/CentOS etc (and rpmforge repository):

yum install mytop

For Debian/Ubuntu etc:

apt-get install mytop

Then create a file in your home directory:

vi ~/.mytop

user=root
pass=mypass
host=localhost
db=
delay=5
port=3306
socket=
batchmode=0
header=1
color=1
idle=1

chmod 400 ~/.mytop

Then run:

mytop

To capture output every 5 minutes to a file try the following in cron:

*/5 * * * * /usr/bin/mytop -b | /usr/bin/head -20 >> /tmp/mytop.out


ApacheTop

This one is of fairly limited use but could come in useful at some point.

yum install apachetop
apt-get install apachetop

/usr/bin/apachetop -f /www/htdocs3/wwwlogs/access_log

My opinion is that the server-status module in Apache is most useful when you want to get a handle on the URLs currently being served up.

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>