{"id":13815138,"url":"https://github.com/yahoo/serviceping","last_synced_at":"2025-05-06T22:08:47.826Z","repository":{"id":32118638,"uuid":"35691097","full_name":"yahoo/serviceping","owner":"yahoo","description":"A ping like utility for tcp services","archived":false,"fork":false,"pushed_at":"2024-09-04T00:09:46.000Z","size":2500,"stargazers_count":52,"open_issues_count":4,"forks_count":16,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-05-06T22:08:41.104Z","etag":null,"topics":["network-analysis","ping","python3"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yahoo.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.d/1.bugfix.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-05-15T18:53:18.000Z","updated_at":"2024-04-16T13:02:34.000Z","dependencies_parsed_at":"2024-11-13T10:40:25.387Z","dependency_job_id":null,"html_url":"https://github.com/yahoo/serviceping","commit_stats":{"total_commits":85,"total_committers":6,"mean_commits":"14.166666666666666","dds":0.6705882352941177,"last_synced_commit":"f46d994ce0f836f5d7cea057346d6091e3f8da8d"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoo%2Fserviceping","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoo%2Fserviceping/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoo%2Fserviceping/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoo%2Fserviceping/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yahoo","download_url":"https://codeload.github.com/yahoo/serviceping/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252776581,"owners_count":21802468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["network-analysis","ping","python3"],"created_at":"2024-08-04T04:03:00.658Z","updated_at":"2025-05-06T22:08:47.798Z","avatar_url":"https://github.com/yahoo.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# serviceping\n\n[![Build Status](https://cd.screwdriver.cd/pipelines/2881/badge?cache=false)](https://cd.screwdriver.cd/pipelines/2881)\n[![Coverage](https://codecov.io/gh/yahoo/serviceping/branch/master/graph/badge.svg?cache=false)](https://codecov.io/gh/yahoo/serviceping)\n[![Version](https://img.shields.io/pypi/v/serviceping.svg)](https://pypi.python.org/pypi/serviceping/)\n[![Downloads](https://pepy.tech/badge/serviceping)](https://pepy.tech/project/serviceping)\n[![Supported Python Versions](https://img.shields.io/badge/python-3.6,3.7,3.8-blue.svg)](https://pypi.python.org/pypi/serviceping/)\n[![License](https://img.shields.io/pypi/l/serviceping.svg)](https://pypi.python.org/pypi/serviceping/)\n[![Documentation](https://img.shields.io/badge/Documentation-latest-blue.svg)](https://yahoo.github.io/serviceping/)\n\nA utility with a \"ping\" like interface to ping tcp port services.\n\n## Table of Contents\n\n- [Background](#background)\n- [Install](https://yahoo.github.io/serviceping/install/)\n- [Usage](#usage)\n- [Examples](https://yahoo.github.io/serviceping/examples/)\n- [License](#license)\n\n## Background\n\nThis utility was written to simplify troubleshooting network issues related to talking to network services\n\n## Usage\n\nServiceping provides a command line interface that operates like the [ping]() command \nbut instead of using icmp packets to check for a response from a host.  It can perform a \ntcp network connection to a port on a host or a http or https get request to check a url \non a host.\n\nSince tcp and http requests require multiple operations.  Each request performs all of\nthe operations end to end for the request.  The serviceping command adds a \n`-d` flag that will show timings for the different stages the ping request.\n\n```\nusage: serviceping [-h] [-c COUNT] [-i INTERVAL] [-W TIMEOUT] [-d] destination [destination ...]\npositional arguments:\n  destination Destination host or URL\n\noptional arguments:\n  -h, --help   show this help message and exit\n  -c COUNT     Number of pings to send\n  -i INTERVAL  Ping interval\n  -d           Show timings for the entire connection\n  -W TIMEOUT   Time to wait for a response, in seconds. The option affects only timeout in absence of any responses  \n```\n\n## Examples\n\nThe serviceping tool uses a syntax that mirrors that of the ping commmand.\n\n\n### Ping port 80 (http) on www.yahoo.com\n\nBy pinging www.yahoo.com via http (port 80), we can clearly see the \nmultiple hosts responding and the latency of each request.\n\n```console\n$ serviceping www.yahoo.com\nSERVICEPING www.yahoo.com:80 (98.139.180.149:80).\nfrom www.yahoo.com:80 (98.139.183.24:80): time=2.46 ms\nfrom www.yahoo.com:80 (98.139.180.149:80): time=2.43 ms\n--- www.yahoo.com ping statistics ---\n2 packets transmitted, 2 received, 0% packet loss, time 1704.0ms\nrtt min/avg/max/dev = 2.43/2.44/2.46/4.00 ms\n$\n```\n\n### Ping port 4443 (https) on www.yahoo.com\n\nServiceping can also connect to other ports such as the ssl port (443).\n\n```console\n$ serviceping www.yahoo.com:443\nSERVICEPING www.yahoo.com:443 (98.139.183.24:443).\nfrom www.yahoo.com:443 (98.139.180.149:443): time=2.89 ms\nfrom www.yahoo.com:443 (98.139.180.149:443): time=2.81 ms\n--- www.yahoo.com ping statistics ---\n2 packets transmitted, 2 received, 0% packet loss, time 1744.0ms\nrtt min/avg/max/dev = 2.81/2.85/2.89/6.08 ms\n$\n```\n\n### Pinging a URL instead of the port\n\nThe serviceping command can also specify send ping requests to a url.  If a URL is specified, it will \nperform an http get request and show the response, which is useful \nwhen hosts are doing unexpected things in a dns\nrotation or behind a reverse proxy or vip.\n\nIn this example we specify a url of http://cnn.com/\n\n```console\n$ serviceping http://cnn.com/\nSERVICEPING cnn.com:80 (157.166.255.18:80).\n1500 bytes from cnn.com:80 (157.166.255.19:80):response=200 time=87.14 ms\n1448 bytes from cnn.com:80 (157.166.226.25:80):response=200 time=64.82 ms\n1500 bytes from cnn.com:80 (157.166.255.19:80):response=200 time=62.98 ms\n1500 bytes from cnn.com:80 (157.166.255.19:80):response=200 time=78.30 ms\n--- cnn.com ping statistics ---\n4 packets transmitted, 4 received, 0% packet loss, time 4372.0ms\nrtt min/avg/max/dev = 62.98/73.31/87.14/56.00 ms\n$\n```\n\nThe output shows that two hosts are responding to this request, and that they are returning different amounts of data in their responses.\n\n### Pinging a URL with timings\n\nThe detailed timing flag adds timings for each step of each request, \nwhich is useful for determining the causes of latency issues or errors.\n\nHere we are doing the previous example with detailed timings.\n\n```console\n$ serviceping -d http://cnn.com/\nSERVICEPING cnn.com:80 (157.166.255.19:80).\n1386 bytes from cnn.com:80 (157.166.255.19:80):response=200 dns=0.21ms connect=68.36ms request=130.02ms all=198.73ms\n1386 bytes from cnn.com:80 (157.166.226.25:80):response=200 dns=0.30ms connect=66.72ms request=101.07ms all=168.20ms\n1500 bytes from cnn.com:80 (157.166.255.18:80):response=200 dns=0.30ms connect=123.94ms request=203.08ms all=327.43ms\n1386 bytes from cnn.com:80 (157.166.226.26:80):response=200 dns=0.28ms connect=68.32ms request=87.94ms all=156.69ms\n--- cnn.com ping statistics ---\n4 packets transmitted, 4 received, 0% packet loss, time 5009.0ms\nrtt min/avg/max/dev = 156.69/212.76/327.43/138.24 ms\n$\n```\n\nClearly, the host with address 157.166.255.18 is taking significantly longer \nto establish the tcp connection and handle the http request.\n\n### Pinging a SSL URL with timings\n\nWhen pinging a ssl URL serviceping adds the ssl version information in the response.\n\n```console\n$ serviceping -d https://www.cnn.com/\nSERVICEPING www.cnn.com:443 (151.101.25.67:443).\n1371 bytes from www.cnn.com:443 (151.101.25.67:443):ssl=TLSv1.2:response=200 dns=0.58ms connect=10.22ms ssl=97.84ms request=12.07ms all=121.17ms \n1371 bytes from www.cnn.com:443 (151.101.25.67:443):ssl=TLSv1.2:response=200 dns=0.59ms connect=11.87ms ssl=95.93ms request=10.98ms all=119.76ms \n1371 bytes from www.cnn.com:443 (151.101.25.67:443):ssl=TLSv1.2:response=200 dns=0.56ms connect=11.14ms ssl=95.81ms request=12.49ms all=120.42ms \n1371 bytes from www.cnn.com:443 (151.101.25.67:443):ssl=TLSv1.2:response=200 dns=0.60ms connect=10.76ms ssl=179.81ms request=10.72ms all=202.28ms \n--- www.cnn.com ping statistics ---\n4 packets transmitted, 4 received, 0.0% packet loss, time 3910.0370000000003ms\nrtt min/avg/max/dev = 119.76/140.91/202.28/101.14 ms\n$\n```\n\n## License\n\nThis project is licensed under the terms of the [Apache 2.0](LICENSE-Apache-2.0) open source license. Please refer to [LICENSE](LICENSE) for the full terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyahoo%2Fserviceping","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyahoo%2Fserviceping","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyahoo%2Fserviceping/lists"}