June 16, 2015

A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux


The duty of System Administrator is really tough as he/she has to monitor the servers, users, logs, create backup and blah blah blah. For the most repetitive task most of the administrator write a script to automate their day-to-day repetitive task. Here we have written a shell Script that do not aims to automate the task of a typical system admin, but it may be helpful at places and specially for those newbies who can get most of the information they require about their System, Network, Users, Load, Ram, host, Internal IP, External IP, Uptime, etc.

How Do I Install and Run Script?

First, use following wget command to download the monitor script "tecmint_monitor.sh" and make it executable by setting appropriate permissions.
# wget http://tecmint.com/wp-content/scripts/tecmint_monitor.sh
# chmod 755 tecmint_monitor.sh
It is strongly advised to install the script as user and not as root. It will ask for root password and will install the necessary components at required places.
To install "tecmint_monitor.sh" script, simple use -i (install) option as shown below.
./tecmint_monitor.sh -i 
Enter root password when prompted. If everything goes well you will get a success message like shown below.
Password: 
Congratulations! Script Installed, now run monitor Command
After installation, you can run the script by calling command 'monitor' from any location or user. If you don’t like to install it, you need to include the location every-time you want to run it.
# ./Path/to/script/tecmint_monitor.sh
Now run monitor command from anywhere using any user account simply as:
$ monitor
TecMint Monitor Script in Action
As soon as you run the command you get various System related information which are:
  1. Internet Connectivity
  2. OS Type
  3. OS Name
  4. OS Version
  5. Architecture
  6. Kernel Release
  7. Hostname
  8. Internal IP
  9. External IP
  10. Name Servers
  11. Logged In users
  12. Ram Usages
  13. Swap Usages
  14. Disk Usages
  15. Load Average
  16. System Uptime
Check the installed version of script using -v (version) switch.
$ monitor -v

tecmint_monitor version 0.1
Designed by Tecmint.com
Released Under Apache 2.0 License

Related Posts:

  • Scripts for backup website ####################################################################### ## AURELIEN HUSSON ## ## Script backup website and Database ## ## Info : ## ## Exemple : website find in /home/www/website/publ… Read More
  • Script backup zimbra mail##!/bin/bash clear echo Start time of the backup = $(date +%T) before="$(date +%s)" ## Backup Format FORMAT=tgz ## Backup location ZBACKUP=/srv/backup/ ## Folder name for backup and using date DATE=`date +"%d%m%y"` ## Bac… Read More
  • Script Tự động sao lưu toàn bộ website WordPress Thông thường, khi mình muốn di chuyển hoặc sao lưu một website sử dụng WordPress thì sẽ sử dụng plugin Duplicator. Tuy nhiên, có một số trường hợp server bị lỗi, website không truy cập trực tiếp được hoặc bạn muốn sao l… Read More
  • Backup of Zimbra MailBox using zmmailbox This is a short script I use to backup the Zimbra mailbox content for my users. This has been used on a Zimbra Collaboration Server (ZCS Open Source Edition) 7.2 installation, but should work on earlier versions as well. I u… Read More
  • MYSQL BAKUP USING SHELLS SCRIPTS Kindly find the MYSQL shells scripts in given below.-------------------------------------------------------------------------------------------------------#! /bin/bash# You are free to modify and distribute this code,# so… Read More

0 comments:

Post a Comment