Command line tools for system and process management
The command line is an invaluable tool for system monitoring. In this section, we'll go over a few basic GNU/Linux command line utilities for system and process management. Knowing these tools is essential for anyone managing an Elasticsearch cluster on GNU/Linux.
top
The top
command lists processes with the highest CPU and memory. This tool is useful to determine whether a process other than Elasticsearch is hogging resources, or to check whether Elasticsearch is using an abnormal amount of CPU or memory.
The top
command refreshes automatically, so you only have to run it once and watch.
When running the command, you should see the following result:

The top command
Tip
Press Shift+M while top
is running to sort processes by those using the most memory instead of CPU.
tail
The tail -f
command is useful for viewing log files in real time. Use it to view Elasticsearch log files as follows:
tail -f /var/log/elasticsearch/*

"tailing" Elasticsearch log...