Htop, a Web Developer’s Best Friend

John Reeve | November 22nd, 2013 | , , ,

Htop, a Web Developer's Best Friend

Every web developer has had the unfortunate experience of their code going rogue and wreaking havoc on a server. An error in the code chewed up all the RAM. An ill-planned query maxed out the CPU and disk I/O, pushing load up too high. The server squawks and we have to do something to fix it.

To resolve these spikes in real-time, and often times in production, the web developer has to go into dev ops mode, becoming half developer, half system administrator. The Linux utility Htop makes it much easier for the web developer to put on the sysadmin hat and troubleshoot a server’s woes.

Htop provides a colorized view of CPU, RAM, swap, load, and a list of all running processes, making it very useful for troubleshooting problems like memory leaks. Htop also provides tools to search, filter, and sort processes, and kill any one of them.

Here are just a few ways in which Htop can be essential in DevOps:

  1. Sort on the MEM% column to see which processes are using up the most memory.
  2. Sort on the CPU% column to see which processes are using up the most CPU
  3. Press F9 to send a SIGTERM to the currently selected process and kill it
  4. Monitor load and CPU in real time
  5. See how long a process has been running using the TIME+ column

Htop puts all of the system resources and processes on one screen, giving a budding system administrator an easy to understand overview of the server, and the tools to troubleshoot poor performance. Htop should be in every web developer’s toolbox.

Leave a Reply

Intervals Blog

A collection of useful tips, tales and opinions based on decades of collective experience designing and developing web sites and web-based applications.

What is Intervals?

Intervals is online time, task and project management software built by and for web designers, developers and creatives.
Learn more…

John Reeve
Author Profile
John Reeve

John is a co-founder, web designer and developer at Pelago. His blog posts are inspired by everyday encounters with designers, developers, creatives and small businesses in general. John is an avid reader and road cyclist.
» More about John
» Read posts by John

Jennifer Payne
Author Profile
Jennifer Payne

Jennifer is the Director of Quality and Efficiency at Pelago. Her blog posts are based largely on her experience working with teams to improve harmony and productivity. Jennifer is a cat person.
» More about Jennifer
» Read posts by Jennifer

Michael Payne
Author Profile
Michael Payne

Michael is a co-founder and product architect at Pelago. His contributions stem from experiences managing the development process behind web sites and web-based applications such as Intervals. Michael drives a 1990 Volkswagen Carat with a rebuilt 2.4 liter engine from GoWesty.
» More about Michael
» Read posts by Michael

help.myintervals.com
Videos, tips & tricks