Batch Ping test script

Source: Internet
Author: User

Ping test script

#! /Bin/bashlistpoliciplist.txt log = Ping. logecho-n ""> $ log # clear historical log grep-V "#" $ list | grep-V "^ $">. list # Read the IP address list from the $ list file, remove the rows and empty rows that contain #, and write the results. listwhile read ipdo echo "$ ip' Ping-S 1000-F-C 100 $ IP | grep transmitted | awk '{print $6}'' ">>$ logdone <. list # From. list reads IP addresses and performs Ping detection grep-V "0%" $ logrm. list

The Ping parameter-s specifies the ICMP packet size,-C specifies the number of Ping packets, and-F specifies the non-segmentation flag in the packets.

Man Ping describes the-F parameter as follows:

-F: flood Ping. for every echo_request sent a period ''. ''is printed, while for ever echo_reply encrypted ed a backspace is printed. this provides a rapid display of how many packets are being dropped. if interval is not given, it sets interval to zero and outputs packets as fast as they come back or one hundred times per second, whichever is more. only the super-user may use this option with zero interval.


This article is from the foolishfish blog, please be sure to keep this source http://foolishfish.blog.51cto.com/3822001/1566845

Batch Ping test script

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.