Check whether the car host is smooth, pingshell

Source: Internet
Author: User
Check whether the car host is smooth, pingshell! Binbash2013-10-21ping detection network is smooth set-uset-xping_fun () {d_network = 1921681echo-n & quot; inputthenetwork (default $ d_network): & quot; read inspection car host is smooth, ping shell #! /Bin/bash #2013-10-21 # ping to check whether the network is smooth set-u # set-xping_fun () {d_network = 192.168.1echo-n "input the network (default $ d_network ): "read network :$ {network :=$ d_network} echo" network: $ network "d_hostip_beg = 1d_hostip_end = 254 echo-n" input the hostip (default $ d_hostip_beg $ d_hostip_end ): "read hostip_beg hostip_end :$ {hostip_beg :=$ d_hostip_beg }:$ {hostip_end :=$ d_hostip_end} echo" hostip_beg: $ hostip_beg "echo" ho Stip_end: $ hostip_end "count = 1up_host = 'normal IP: '; for (hostip = $ hostip_beg; hostip <= $ hostip_end; hostip ++); dohost = $ network. $ hostipecho "start ping detection $ host" ping-c $ count $ host &>/dev/nullif [$? = 0]; thenecho "IP $ host is normal" up_host = "$ up_host $ host" elseecho "IP $ host is abnormal" fidoneecho $ up_host; exit 0} echo "---- start to run the ping program ----" ping_fun

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.