Back in September 2014 I wrote an article about Linux utilities and Terminals I always use to increase my productivity. This time I would like to share with you some terminal apps I’ve been testing that happened to be of big help with my daily tasks.
First, I would like to introduce you to Htop, an advanced interactive and real time Linux process monitoring tool. It’s similar to Linux top command but it has improved features like a user friendly interface to manage process, shortcut keys, vertical and horizontal view of the processes, among other features.
sudo apt-get install htop
Glances is a cross-platform command-line curses-based system monitoring tool written in Python that uses the psutil library to grab information from the system. With Glances, you’ll be able to monitor CPU (user related applications, system core programs and idle programs), Load Average, Memory, Network Interfaces, Disk I/O, Processes and File System space utilization.
1 2 3
sudo apt-add-repository ppa:arnaud-hartmann/glances-stable sudo apt-get update sudo apt-get install glances
How often do you read more than one log file with tail command in multiple windows console ? Well, keep calm and try MultiTail, it’ll be the key to your happiness.
MultiTail is an open source utility that can be used to display multiple logfiles to standard output in a single window or a single shell. It shows the last few lines of logfiles in a real-time like tail command which split the console into more subwindows. It also supports color highlighting, filtering, adding and deleting windows and even more.
To install MultiTail, use:
sudo apt-get install multitail
To display two files in one column, use:
multitail /var/log/apt/history.log /var/log/syslog
To display 3 files in 3 columns, use:
multitail -s 3 /var/log/dpkg.log /var/log/Xorg.0.log /var/log/kern.log
To display 5 logfiles while merging 2 files in one column and keep 2 files in two columns with only one in the left column, use:
multitail -s 2 -sn 1,3 /var/log/auth.log -I /var/log/dpkg.log /var/log/syslog /var/log/bootstrap.log /var/log/kern.log
Dstat gives you detailed information in columns and clearly indicates in what magnitude and unit the output is displayed. Less confusion, less mistakes. And, most important of all, it makes it very easy to write plugins to collect your own counters and extend in ways you never expected.
Dstat’s output by default is designed for being interpreted by humans in real-time, however you can export details to CSV output to a file to be imported later into Gnumeric or Excel to generate graphs.
It combines vmstat, iostat, ifstat and netstat to get excellent and improved results.
It also shows statistics in exactly the same timeframe and, as a plus, includes many external plugins.
sudo apt-get install dstat
Cheat is an interactive cheat-sheet application released under GNU General Public License. Its main feature is to help you understand a command through examples for Linux Command line.
sudo apt-get install python-pip
NOTE: pip is an easy install replacement and is intended to be an improved Python package installer.
Download and Install Cheat
First step, download ‘cheat’ from Git.
sudo apt-get install git
Next, install the required python dependencies by running the following command.
sudo pip install docopt pygments
Now, clone the Git repository of cheat.
git clone https://github.com/chrisallenlane/cheat.git
Move to the cheat directory and run ‘setup.py‘ (a python script).
cd cheat python setup.py install
In my previous post about Terminals, I explained ways to combine all of this knowledge. For instance, you can use it with terminator.
As a BONUS, I’d like to share some tricks I’ve learned:
Do you want to know if the package is available in repositories?
aptitude search packagename
apt-cache search packagename
To display package information, try
apt-cache show packagename
If you’d like to find package dependencies, use
apt-cache showpkg packagename
To delete all .deb files from /var/cache/apt/archives to free-up disk space, you can use
Well, those were my tricks to make easier my daily routine. What are yours?