Advertisement

I ran a rather decent monitoring system for my servers at home based on prometheus. My monitoring service sends an alert, if some file systems start filling up. Unfortunately, in most cases, I don’t know, what file(s) cause this mess. I use ncdu to find the largest files in the alerted filesystem. This short article shows how to install and use this small helper.

Requisites for readers

This article is written for people with a basic understanding in “Linux” operating system. To make this article easier to read, I do not prefix commands run as root with sudo. Instead, I use the following syntax for the commands in this article. But for your daily business, I definitively recommend using the sudo-command.

  • $ command : Running the command as a normal or admin user
  • # command : Running the command as root

Setup and use the “ncdu”-command

  • Computer Install package

    First, install ncdu.

    # pacman -S ncdu
    
  • Computer Run ncdu

    Running ncdu requires the privilege to read for all files in the given directory.

    $ ncdu
    
    ncdu 1.16 ~ Use the arrow keys to navigate, press ? for help
    --- /tmp -------------------------------------------------
        6.3 GiB [###########################] /rclmpdffzdt9bta
    

Discussion

If you found a mistake in this article or would like to contribute some content to it, please file an issue in this Git Repository

Disclaimer

The contents of this article are put together to the best of the authors' knowledge, but it cannot be guaranteed that it's always accurate in any environment. It is up to the reader to make sure that all information found in this article, does not do any damage to the reader's working environment or wherever this information is applied to. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, arising from, out of or in connection with this article. Please also note the information given on the Imprint' page.