Linux / BSD command line: process monitoring and control with top, htop & Co.

Share your love

Table of Contents

Users and admins regularly need more detailed information about the processes running on a GNU / Linux or Free / Net / OpenBSD system. You have to identify which processes are particularly demanding on the CPU and locate crashed and frozen programs in order to be able to terminate them in a targeted manner.

For system monitoring and process management, there are many tools (including graphical ones) that help you sift through and clear the process list. But these are not always available on servers or appliances such as firewalls / routers or NAS. Classic tools such as ps and kill. In the area of ​​system management, more extensive command line programs such as top and its numerous further developments, however, significantly more. top and some derivatives of this we present in this article and explain the basic operation using small practical examples.

More on Linux shells and Bash:

Linux / BSD command line: process monitoring and control with top, htop & Co.

“top” is the mother of all process monitors and shows important system resources and all running processes in a list.

(Image: Screenshot / Michael Plura)

Before using top and its more comfortable descendants, it is worth taking a quick look at the Baremetal tools that every Unix or Unixoid operating system has to begin with. Above all, there is the aforementioned psshowing a snapshot of all running processes. Give depending on the information you want ps fax or ps aux this off. Typically for Unix, however, the fun only really starts when you ps combined with other small tools: Together with grep one looks for certain processes, for example. The square brackets or the grep -v grep-Hack close the grep-Process from the list:

Read Also   67 paid Android apps and games that are free on Google Play today, September 20

  • Access to all heise + content
  • exclusive tests, advice & background: independent, critically well-founded
  • Read c’t, iX, MIT Technology Review, Mac & i, Make, c’t photography directly in your browser
  • register once – read on all devices – can be canceled monthly
  • first month free, thereafter € 12.95 per month
  • Weekly newsletter with personal reading recommendations from the editor-in-chief

Start FREE month

Start your FREE month now

Already subscribed to heise +?

Sign up and read

Register now and read articles right away

More information about heise +

Share your love