More Terminal Tools

Wed, 06/06/2012 - 11:29 -- aczietlow
Terminal

Our company builds websites on UNIX based machines for many reasons. One of which is the terminal. Drush allows a user to preform many tasks on a Drupal website from the terminal , which can be a huge time savor. Here are some other terminal based tools that we have found interesting over time.

If you're on a Debian based Linux distro such as Ubuntu, you can install any of the following packages with the following command in the terminal
sudo apt-get install package-name
For installation help with Macs remember Google is your best friend.

dstat
A tool for using generating system statistics. Dstat allows you to view all of your system resources instantly, you can eg. compare disk usage in combination with interrupts from your IDE controller, or compare the network bandwidth numbers directly with the disk throughput (in the same interval). If you wanted monitor CPU statistics you could use the following command (once the package was installed of course.)
dstat -c

iftop
iftop listens to network traffic and displays a table of current bandwidth usage by pairs of hosts. To use on the first network interface it can find on your computer try
sudo iftop

siege
Seige is a multi-thread http load testing tool. It was designed by web devs to test the performance of their code under duress. You can try this on any domain. Ideally you would be looking at a domain that contains a website you are managing. This has come in handy in getting our server response times down for some of the Drupal websites we've built. The following will open 10 concurrent connections and hit google 10 times each.
siege -c 10 -r 10 -b http://google.com

cowsay
This is without a doubt the most useful tool. Install it and try it now.
cowsay “awesomeness”
For you advanced cowsayers try the following:
cowthink “even more awesomeness”
And to any programmer out there, no you can not invoke cowsay recursively... easily