This is based on the Google's official tool gcping.
Usage:
gcloud_ping.py [-h] [--csv] [-c PING_COUNT] [-i PING_INTERVAL] [--sort] [--list] [regions ...]Positional arguments:
regionsRegions to ping / list (if omitted, defaults to all regions).
Options:
-h--helpShow the help message and exit.--csvOutput in CSV format.-c--ping-count PING_COUNTNumber of ping cycles. Default is64.-i--ping-interval PING_INTERVALInterval (in seconds) between ping cycles. Default is1.-s--sortSort regions by average RTT (ascending) when printing the results.-l--listList regions without pinging.
A ping cycle is the pinging of all regions specified.
The average is calculated using a Winsorized Mean, which is basically a Trimmed Mean but clamps outliers instead of discarding them. The lower and upper limits were chosen carefully arbitrarily.
- For clients of Google Cloud Platform, see Google Cloud Platform IP ranges per region.
- For other Google services, see Google user IP ranges.