Better Monitoring Tools For Ubuntu And CentOS

Introduction

Linux systems ship with monitoring tools by default, like topdf, and du that help monitor processes and disk space. Often, though, they are not very user/visually friendly. We’ll be setting up three friendlier versions of the previously mentioned tools (htopncdupydf) to help better monitor our VM instances.

Installation

On Debian/Ubuntu systems, use:

sudo apt-get -y install htop ncdu pydf

On Redhat/CentOS systems use:

sudo yum -y install htop ncdu pydf

Note that the ‘-y’ flag in both cases auto answers “yes” during installs.

Usage

htop (interactive process viewer)

On your terminal, type in htop and press ENTER. You will see a colorful display listing all running processes as well as the percentage of CPUMemory, and swap that your system is using. Press Q to exit. Compare this to running just the top command.

ncdu (disk usage analyzer)

On your terminal, type in ncdu and press ENTER. You will see a list of all files and folders in the current directory you are in, with a visual bar showing the relative amount of space they are using. Press Q to exit. Compare this to running the standard du command.

You can also type in ncdu [directory-path] to see disk usage stats for any directory. One fantastic feature ncdu has is the ability to navigate directory structures. This allows it to drill down and get even more disk usage stats for sub-directories.

pydf (disk usage checker)

On your terminal, type in pydf and press ENTER. You will see a colorful summary of the disk usage on your system. Contrast this to running the standard df command.

Conclusion

These new tools provide a more user-friendly way to analyze running processes and disk usage on a server. Each of these tools should be in the toolkit of anyone (Admins, DevOps, etc.) who manages linux servers.

We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies

More