LogTop is a Python package, it can be installed on Cloud Servers and display real-time count of strings received in standard input on CLI. LogTop is also available as standard package for Debian and Ubuntu. One can compile from the source code or can directly use command to fetch from Apt, the Debian package manager. Developer of this package is Julien Palard.
Get Real Time Statistics on SSH with LogTop
LogTop is quite powerful tool. One can see the source code on GitHub :
1 | https://github.com/JulienPalard/logtop |
Corresponding official documentation are available on Debian and Ubuntu’s official websites :
---
1 2 | https://packages.debian.org/unstable/main/logtop https://launchpad.net/ubuntu/+source/logtop |
So, actually it is possible to install logtop
directly :
1 2 3 4 5 6 7 8 | apt-get install logtop # output # universe repository must be enabled from sources.list Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: logtop |
Building from source code can be also done :
1 2 3 4 5 6 7 8 9 10 11 | wget https://github.com/JulienPalard/logtop/archive/logtop-0.6.tar.gz # output tar -xzvf logtop-0.6.tar.gz # check the name by doing ls cd logtop-0.6 # install dependencies aptitude install python-dev swig aptitude install libncurses5-dev uthash-dev && make python-module python setup.py install # run ./logtop |
LogTop displays real-time count of strings received in standard input, like in situation we described in the guide to Fix Failing Server on WordPress Post Publish.
How To Get Real Time Statistics on SSH with LogTop
Typical usage pattern is :
1 | tail -f FILE | logtop |
Like compatible example with our previous article linked above :
1 | tail -f /var/log/apache2/access.log | cut -d' ' -f1 | logtop |
LogTop has API support and can be combined with other software quite easily, API part is described in official GitHub repository.