Running ping commands from specific locations around the globe can be crucial for troubleshooting network issues or testing the performance of your globally-distributed servers.
But how can you do that?
While you may have the option to SSH into a remote server or use a VPN, these methods may not always be accessible or efficient. What if you want to ping from locations beyond your reach or run multiple pings simultaneously to save time?
That's where Globalping comes in. Globalping is an open-source network testing platform that allows you to run ping commands from (almost) anywhere in the world for free. So whether you're tech-savvy or a curious beginner, we'll show how to send ping requests from various locations using the Globalping platform in this guide.
What is Globalping?
Globalping is a community-powered network testing platform that empowers anyone to run networking commands, including ping, traceroute, dig, curl, and mtr, from anywhere across the globe.
To do that, Globalping relies on a network of hundreds (and counting) of probes hosted by individuals from our community in their homes, offices, and servers they control. Alongside the probe network, the Globalping platform provides an API that handles users' measurement requests. It runs every aspect, from taking requests and selecting appropriate probes to issuing the execution of commands and collecting the results, ensuring quick delivery to the requesting user.
How to run a ping command from anywhere using Globalping
We want Globalping to cater to users with different needs and technical expertise. That's why we're building several integrations that make using the platform a breeze:
- Globalping CLI tool: If you like working with your computer's terminal and are familiar with running network commands, the CLI tool may be a great choice. We support all major Linux distributions, macOS, and Windows – you can find an installation guide on GitHub.
- Globalping Slack app: With the Slack app, you can extend Globalping's functionality to your entire team, which can help foster collaboration during critical moments like outages.
- Online tests: If you prefer a more straightforward approach without any installation, try the web tool on our website.
Now let's see these integrations in action!
Use the web tool for quick results
The web tool is your go-to option if you prefer a user-friendly interface or want to execute a ping command swiftly from any device.
To access the web tool, visit the Globalping website, where you'll find a form accompanied by a map.
Here’s an overview of the available form fields:
- Test type: Select the network command you want to execute
- Target: Enter the hostname or IP address of the target
- Location: Specify one or more locations from where you want the API to select the probes. You can define multiple locations by separating them with a comma or combine filters with the "+" sign. The field accepts different location types such as ISP names, ASNs, US states, and regions such as Western Europe.
- Limit: Determine the number of probes to run the command from
- Settings: Customize other options depending on the selected test type. For ping commands, you can adjust the number of packets to send.
- Map: Display the measurement results on the map below.
Let's send our first ping command via this form!
Example scenario: Run the ping command to jsdelivr.com from 10 random locations in Europe.
Fill in the form like so:
- set the test type to "ping"
- enter "jsdelivr.com" in the target field
- specify "Europe" as the location
- leave the limit set to 10
- click on "Run test"
And voilá, you should see results in a few seconds.
If you've activated the Map switch, you can view the locations on the map where the API issued the ping command. These location points are color-coded based on the ping's rounded average round trip time (RTT). You can also click on the points for more details.
Below the map is a list of ping results for the ten probes. The first line displays the location, Autonomous System Number (ASN), rounded average RTT, and the packet loss percentage of the ping. The raw ping results are listed below.
Lastly, at the bottom of the list, you can find a link to share your measurement results with others.
Use the CLI tool or Slack app for more customization
The Globalping CLI tool and Slack app offer greater customization options than the web tools. Also, if you need to run network commands regularly, installing a Globalping integration on your machine can be more convenient than navigating to the web tool to run a command.
In the following examples, we'll focus on using the Globalping CLI tool for running ping commands. However, if you prefer, you can follow along using the Slack app, as sending measurement requests and reading responses are nearly identical.
Ping from anywhere using the Globalping CLI tool
Once you've successfully installed the CLI tool on your system, it's ready for use. First, you may want to familiarize yourself with the Globalping ping command by running help
:
$ globalping ping --help
This command provides a summary of the ping command, example usage, and a list of available flags that let you customize your measurement requests. If you look at the examples, you can see that a Globalping ping command follows this structure:
$ globalping [command type] [target] from [location] [flags]
Let's write a simple measurement request using this structure.
Example scenario: Run the ping command to jsdelivr.com from Vienna and Berlin.
CLI command:
$ globalping ping jsdelivr.com --from Vienna,Berlin
If not defined otherwise, Globalping sets the limit of probes to 1. So when executing this measurement request, the Globalping API randomly selects one online probe from Vienna or Berlin. If we had limited the number to 2, the API would have selected one probe in Berlin and one in Vienna. So, in our example, the API chose Vienna:
Next, let's look at a more advanced example using some of the available flags.
Example scenario: Run the ping command to jsdelivr.com from 10 random locations within AS3209 and Greece and retrieve the results in JSON format.
CLI command:
$ globalping ping jsdelivr.com --from 3209,Greece --limit 10 --json
This returns the ping measurement results for ten probes as JSON, including the raw ping results in result.rawOutput
and other valuable data. Explore our API reference if you're curious about the JSON response object and its contents.
Advanced tips
Finally, we want to provide you with some advanced tips and ideas that can help you get the most out of Globalping:
- Experiment with locations: Globalping allows you to specify various types of locations, and it will do its best to understand and select suitable probes. You can input countries (Greece), continents (Asia), cities (Warsaw), US states (Idaho), regions (South America), ASNs (3209 for Vodafone Germany), and even cloud region names (us-east-2).
- Use available flags: The CLI tool and Slack app offer flags that enable you to customize the results to suit your needs. We recommend you get to know all the options to avoid missing out on potential features that could simplify your workflow.
- Automate commands: For example, save time by running ping commands automatically with a bash script. Or, if a less tech-savvy team member wants to run a ping at a specific time, they can use the Globalping Slack app and Slack's message scheduling feature to plan to send the command.
- Build your own networking tools: Globalping is open-source and ready to incorporate into your projects. Whether you want to create custom network monitoring tools for your company or develop a helpful utility for yourself, the Globalping API provides the foundation for your creativity.
Conclusion
We hope this guide could show you how to use Globalping to easily and quickly execute ping commands from anywhere worldwide. With several integrations, including the web tool on our website, the CLI tool, and the Slack app, Globalping caters to users with different levels of technical expertise. So whether you need to troubleshoot network issues or test server performance, we aim to give you the tools and flexibility you need with the platform.
As an open-source project, Globalping thrives on community engagement and contributions. If you have feedback, encounter a bug, or wish to contribute by hosting a probe, please visit our GitHub page.
Why not give Globalping a try? Start with our web tool to get quick results at no cost.
Top comments (1)
What else can Globalping build to increase its usefulness?