Linux network status check script

Source: Internet
Author: User

Linux network status check Script 1: Checks network connectivity through regular sending and receiving email www.2cto.com #/bin/bash echo "Daily test mail" & gt; state.txt mail-s Server_State abc@md1.21.co.jp <state.txt rm-df. /state.txt ~ Crontab-e adds the following task 10 07 ***/root/checkNKmail & time-sharing day/month week www.2cto.com 2. regularly checks the network status and sends the checkserverstat script content by email: #/bin/bash echo "HZtelecomDNS"> state.txt ping-c 5 202.101.172.35> state.txt echo "bJU" & gt; state.txt ping-c 5 10. x. x. x> state.txt echo "ADSL Gateway"> state.txt ping-c 5 X. x. x. x> state.txt echo "Server_Outside VPN"> state.txt ping-c 5 192.168.2.100> state.txt echo "Server_O Utside WAN "> state.txt ping-c 5 X. x. x. x> state.txt echo "VPN in company"> state.txt ping-c 5 192.168.1.4> state.txt echo "L2tp at aaa Libweb"> state.txt ping-c 5 X. x. x. X &> state.txt mail-s Server_State admin@abc.com <state.txt rm-df. /state.txt ~ Add the task corntab-e10 16 ***/root/CheckWeatherState & 10 09 ***/root/checkserverstate & 10 13 ***/root/checkserverstate & 10 17 *** to crontab ** */root/checkserverstate &

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.