If it has the value 0 then it was successful, anything else and a problem occurred.
You can gate how long ping will attempt to ping another server through the use of the count switch -c. This will check to see if any of the servers you're attempting to connect through, but won't be able to see if middle-server-1 can reach server-b, for example. The main idea is to check the shortest way between server-a and server-b using a list of middle servers for example if I'm on dev server and I want to connect to prod server - usually a direct ssh will fail. By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service.