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 &