Skip to content

Instantly share code, notes, and snippets.

@hoangdh
Last active December 3, 2021 08:52
Show Gist options
  • Save hoangdh/7c2265bbe75f9fe22e90e8060343e1d6 to your computer and use it in GitHub Desktop.
Save hoangdh/7c2265bbe75f9fe22e90e8060343e1d6 to your computer and use it in GitHub Desktop.
How to compile atop from source code on Ubuntu

How to compile atop from source code on Ubuntu

1. Download atop source code from homepage

https://www.atoptool.nl/downloadatop.php

OR using wget command

cd /tmp/
wget https://www.atoptool.nl/download/atop-2.5.0.tar.gz

2. Install dependencies packages and compile atop

apt install build-essential libncurses5-dev zlib1g-dev

Extract and compile atop

cd /tmp/
tar -xzf atop-2.5.0.tar.gz
cd atop-2.5.0
make
make systemdinstall

OPTIONAL: Change log interval to 10s and log generations to 3 days

sed -i 's/LOGINTERVAL=600/LOGINTERVAL=10/g;s/LOGGENERATIONS=28/LOGGENERATIONS=3/g' /lib/systemd/system/atop.service

3. Start and enable atop

systemctl daemon-reload
systemctl start atop
systemctl enable atop

OPTIONAL: Configuration logrotate for atop

https://github.com/hoangdh/ghichep-LOG/blob/master/logrotate.d/atop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment