In the world of development and system monitoring, having efficient tools to diagnose connectivity issues is essential. Dstp emerges as an all-in-one solution, combining multiple network tests into a single command-line interface (CLI) tool. Designed for developers, system administrators, and tech enthusiasts, dstp allows for quick and effective analysis of websites or IP addresses.
What is dstp?
Dstp is a CLI tool that consolidates common network tests, such as DNS resolution, ping, and HTTPS/TLS connectivity checks, into one command. Its goal is to simplify network diagnostics and streamline issue identification for local or remote systems. This makes it an ideal tool for quickly verifying service functionality or troubleshooting network problems.
Key Features
- DNS Resolution: Checks the ability of a domain to resolve to an IP address.
- Ping Tests: Sends packets to a target to measure latency and connection stability, configurable by packet count and timeout duration.
- HTTPS/TLS Connectivity: Verifies secure connectivity on custom ports, useful for validating certificate and HTTPS configurations.
- Flexible Output Formats: Provides results in plaintext for quick reviews or JSON for integration into scripts or automated systems.
- Ease of Use: With simple and well-documented options, dstp enables users to run diagnostics without complex setups.
Use Cases
- Troubleshooting: Diagnose connectivity issues on servers and web services.
- Monitoring: Validate the status of services in real-time, especially in development environments.
- Automation: Integrate dstp into scripts for automated monitoring or deployment processes.
How to Use dstp
The tool is executed from the command line with a straightforward syntax:
dstp [OPTIONS] [ARGS]
Available Options:
-a
,--addr <URL or IP>
: Specifies the target for analysis (required).-o
,--out <format>
: Defines the output format:plaintext
(default) orjson
.-p <number>
: Number of ping packets (default: 3).-t <seconds>
: Timeout per ping packet (default: 2 seconds).--port <port>
: Sets the port for HTTPS/TLS tests (default: 443).-h
,--help
: Displays the help menu.
Example Usage:
To run a comprehensive diagnostic on a website with JSON output:
dstp -a example.com -o json -p 5
Installation
On macOS:
Using Homebrew:
brew install ycd/tap/dstp
On Linux:
Using NixOS:
nix-env -iA dstp
With Go:
For direct installation from source:
go install github.com/ycd/dstp/cmd/dstp@latest
For Arch Linux:
From the AUR:
git clone https://aur.archlinux.org/dstp.git
cd dstp
makepkg -sri
Binary Downloads:
Precompiled binaries are available for Windows, macOS, and Linux in the GitHub releases section.
Building from Source
For users who prefer to build the tool manually, follow these steps:
- Clone the Repository:
git clone https://github.com/ycd/dstp cd dstp
- Compile and Install:
- Linux/Unix:
go build cmd/dstp/main.go sudo cp dstp /usr/local/bin/dstp
- macOS:
make sudo cp dstp /usr/local/bin/dstp
- Linux/Unix:
- Verify the Installation:
dstp -h
Contributing
The dstp project is open to contributions. Whether it’s through bug reports, feature suggestions, or pull requests, developers are encouraged to collaborate via its GitHub repository.
Conclusion
Dstp is a powerful and versatile tool that consolidates key functionalities for quick and efficient network diagnostics. From developers to system administrators, it simplifies processes and enhances problem detection in both local and remote environments. With its intuitive design and advanced features, dstp stands as an essential tool for any IT professional’s toolkit.