好用的linux系统管理脚本

来源:互联网 发布:db2数据库 编辑:程序博客网 时间:2024/05/17 08:43

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 -vtecmint_monitor version 0.1Designed by Tecmint.comReleased Under Apache 2.0 License

Conclusion

This script is working out of the box on a few machines I have checked. It should work the same for you as well. If you find any bug let us know in the comments. This is not the end. This is the beginning. You can take it to any level from here. If you feel like editing the script and carry it further you are free to do so giving us proper credit and also share the updated script with us so that we can update this article by giving you proper credit.

Don’t forget to share your thoughts or your script with us. We will be here to help you. Thank you for all the love you have given us. Keep Connected! Stay tuned.

0 0
原创粉丝点击