eZ Server Monitor

A lightweight and simple dashboard monitor for Linux

eSM`sh - Documentation


Requirements

To use eSM`sh, you must have :

  • a Linux environment
  • CURL or WGET package installed
  • hddtemp and lm-sensors packages installed (optional)


Installation

After downloading the latest version of eSM`sh, unzip the archive :

wget --content-disposition http://www.ezservermonitor.com/esm-sh/downloads/version/2.3
unzip ezservermonitor-sh_v2.3.zip

Then add the execute permission for the user on the file :

chmod u+x eZServerMonitor.sh

To run the script :

./eZServerMonitor.sh

Options

By default, eSM`sh displays help with the list of available options:

  • -h, -u, --help or --usage : print help message
  • -v or --version : print script version number
  • -C or --clear : clear console (must be inserted before any argument)
  • -a or --all : print all datas
  • -s or --system : system information (OS and distro ; kernel ; hostname ; uptime ; users connected; last boot; datetime)
  • -e or --services : checks port number
  • -n or --network : network information (IP LAN ; IP WAN)
  • -p or --ping : pings several hosts (can be configured in the file)
  • -c or --cpu : processor information (model ; frequency ; cache ; bogomips)
  • -m or --memory : RAM information (free and total)
  • -l or --load : system load ; processus
  • -t or --temperatures : print CPU, system and HDD temperatures (optional ; can be configured in the file)
  • -d or --disk : disk space (top 5) ; sorted by alpha


For a simple usage, type this command line in your console :

./eZServerMonitor.sh -Ca

or

./eZServerMonitor.sh --clear --all

Usage

You can use eSM`sh directly. However, you can set some features.

The settings are located at the beginning of the file:

# ************************************************************ #
# *                        [ CONFIG ]                        * #
# ************************************************************ #

# Disk usage - Show or hide virtual mountpoints (tmpfs)
DISK_SHOW_TMPFS=true

# Service who returns WAN IP
GET_WAN_IP="http://www.ezservermonitor.com/myip"

# Hosts to ping
PING_HOSTS=("google.com" "facebook.com" "yahoo.com")

# Services port number to check
# syntax : 
#   SERVICES_NAME[port_number]="label"
#   SERVICES_HOST[port_number]="localhost"
SERVICES_NAME[21]="FTP Server"
SERVICES_HOST[21]="localhost"

SERVICES_NAME[22]="SSH"
SERVICES_HOST[22]="localhost"

SERVICES_NAME[80]="Web Server"
SERVICES_HOST[80]="localhost"

SERVICES_NAME[3306]="Database"
SERVICES_HOST[3306]="localhost"

# Temperatures blocks (true for enable)
TEMP_ENABLED=false

# Text color : RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE
THEME_TEXT=GREEN

# Title color : WHITE_ON_GREY, WHITE_ON_RED, WHITE_ON_GREEN, WHITE_ON_BLUE, WHITE_ON_MAGENTA, WHITE_ON_CYAN, BLACK_ON_YELLOW
THEME_TITLE=WHITE_ON_GREY

Disk usage : show or hide virtual mountpoints

You can show or hide virtual mountpoints in Disk usage section. To hide these mountpoints, just set the DISK_SHOW_TMPFS to false.

# Disk usage - Show or hide virtual mountpoints (tmpfs)
DISK_SHOW_TMPFS=true

Service to get WAN IP

To get the external IP address, the service used is specified in the variable GET_WAN_IP. The script uses the library cURL to retrieve the result of the page. In case cURL is not installed, the script uses wget.

Hosts to ping

The script allows you to ping multiple IP addresses to display the response time. Here you can set the different websites to ping:

# Hosts to ping
PING_HOSTS=("imdb.com" "google.com")

Services

Like the web version of eZ Server Monitor, you can check the status of several services. The SERVICES arrays allows you to add a service.

There are two arrays : one to specify the service name and the other to specify the host to check.

The first array is called SERVICES_NAME. The key is the port number of the service to check and the value is its informative name.
Example: SERVICES_NAME[80]="Web Server"

The second array is called SERVICES_HOST. The key is the same port number and the value is the host name to check.
Example: SERVICES_HOST[80]="localhost"

# Services port number to check
# syntax : 
#   SERVICES_NAME[port_number]="label"
#   SERVICES_HOST[port_number]="localhost"
SERVICES_NAME[21]="FTP Server"
SERVICES_HOST[21]="localhost"

SERVICES_NAME[22]="SSH"
SERVICES_HOST[22]="localhost"

SERVICES_NAME[80]="Web Server"
SERVICES_HOST[80]="localhost"

SERVICES_NAME[3306]="Database"
SERVICES_HOST[3306]="localhost"

Temperatures

The script displays the temperature of hard drives and the system (motherboard and CPU). For this, you have to install hddtemp and lm-sensors packages.
If you are running on Raspberry Pi with Raspbian distro, you don't need lm-sensors package.

To enable the display of this information, set the variable TEMP_ENABLED to true:

# Temperatures blocks (true for enable)
TEMP_ENABLED=false

Themes

Several themes are available. They allow to change the color of the titles (System, Network, Memory, ...) and the color of the elements.

Available values for elements (THEME_TEXT):

  • WHITE_ON_GREY
  • WHITE_ON_RED
  • WHITE_ON_GREEN
  • WHITE_ON_BLUE
  • WHITE_ON_MAGENTA
  • WHITE_ON_CYAN
  • BLACK_ON_YELLOW


Available values for titles (THEME_TITLE):

  • RED
  • GREEN
  • YELLOW
  • BLUE
  • MAGENTA
  • CYAN
  • WHITE


Go to top